Remove pieces

This commit is contained in:
Drew DeVault 2017-09-12 14:33:40 -04:00
parent fc200c4ce7
commit 49341ce3cf
3 changed files with 1 additions and 10 deletions

View File

@ -15,7 +15,7 @@ export default function selectTorrent(ids, action, navigate=true) {
const next = new Set(state.selection);
const filter_subscriptions = state.filter_subscribe;
const subscriptions = state.subscribe;
const { peers, files, pieces, trackers } = state;
const { peers, files, trackers } = state;
const added = next.difference(previous);
const removed = previous.difference(next);
@ -26,7 +26,6 @@ export default function selectTorrent(ids, action, navigate=true) {
];
dispatch(filter_subscribe("peer", criteria));
dispatch(filter_subscribe("file", criteria));
dispatch(filter_subscribe("piece", criteria));
dispatch(filter_subscribe("tracker", criteria));
});
@ -47,9 +46,6 @@ export default function selectTorrent(ids, action, navigate=true) {
//...Object.values(trackers)
// .filter(tracker => tracker.torrent_id === t)
// .map(tracker => tracker.id),
//...Object.values(pieces)
// .filter(piece => piece.torrent_id === t)
// .map(piece => piece.id),
];
if (_ids.length > 0) {
dispatch(unsubscribe(..._ids));

View File

@ -9,7 +9,6 @@ import torrents from './torrents';
import files from './files';
import peers from './peers';
import trackers from './trackers';
import pieces from './pieces';
const root = combineReducers({
socket,
@ -21,7 +20,6 @@ const root = combineReducers({
files,
peers,
trackers,
pieces,
router: routerReducer
});

View File

@ -1,3 +0,0 @@
import reducer from './resource';
const pieces = reducer("piece");
export default pieces;