Remove pieces
This commit is contained in:
parent
fc200c4ce7
commit
49341ce3cf
|
@ -15,7 +15,7 @@ export default function selectTorrent(ids, action, navigate=true) {
|
||||||
const next = new Set(state.selection);
|
const next = new Set(state.selection);
|
||||||
const filter_subscriptions = state.filter_subscribe;
|
const filter_subscriptions = state.filter_subscribe;
|
||||||
const subscriptions = state.subscribe;
|
const subscriptions = state.subscribe;
|
||||||
const { peers, files, pieces, trackers } = state;
|
const { peers, files, trackers } = state;
|
||||||
|
|
||||||
const added = next.difference(previous);
|
const added = next.difference(previous);
|
||||||
const removed = previous.difference(next);
|
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("peer", criteria));
|
||||||
dispatch(filter_subscribe("file", criteria));
|
dispatch(filter_subscribe("file", criteria));
|
||||||
dispatch(filter_subscribe("piece", criteria));
|
|
||||||
dispatch(filter_subscribe("tracker", criteria));
|
dispatch(filter_subscribe("tracker", criteria));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -47,9 +46,6 @@ export default function selectTorrent(ids, action, navigate=true) {
|
||||||
//...Object.values(trackers)
|
//...Object.values(trackers)
|
||||||
// .filter(tracker => tracker.torrent_id === t)
|
// .filter(tracker => tracker.torrent_id === t)
|
||||||
// .map(tracker => tracker.id),
|
// .map(tracker => tracker.id),
|
||||||
//...Object.values(pieces)
|
|
||||||
// .filter(piece => piece.torrent_id === t)
|
|
||||||
// .map(piece => piece.id),
|
|
||||||
];
|
];
|
||||||
if (_ids.length > 0) {
|
if (_ids.length > 0) {
|
||||||
dispatch(unsubscribe(..._ids));
|
dispatch(unsubscribe(..._ids));
|
||||||
|
|
|
@ -9,7 +9,6 @@ import torrents from './torrents';
|
||||||
import files from './files';
|
import files from './files';
|
||||||
import peers from './peers';
|
import peers from './peers';
|
||||||
import trackers from './trackers';
|
import trackers from './trackers';
|
||||||
import pieces from './pieces';
|
|
||||||
|
|
||||||
const root = combineReducers({
|
const root = combineReducers({
|
||||||
socket,
|
socket,
|
||||||
|
@ -21,7 +20,6 @@ const root = combineReducers({
|
||||||
files,
|
files,
|
||||||
peers,
|
peers,
|
||||||
trackers,
|
trackers,
|
||||||
pieces,
|
|
||||||
router: routerReducer
|
router: routerReducer
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
import reducer from './resource';
|
|
||||||
const pieces = reducer("piece");
|
|
||||||
export default pieces;
|
|
Loading…
Reference in New Issue
Block a user