diff --git a/src/renderer/controllers/torrent-list-controller.js b/src/renderer/controllers/torrent-list-controller.js index bf374ef0..46c163c7 100644 --- a/src/renderer/controllers/torrent-list-controller.js +++ b/src/renderer/controllers/torrent-list-controller.js @@ -227,6 +227,11 @@ module.exports = class TorrentListController { } deleteAllTorrents (deleteData) { + // Go back to list before the current playing torrent is deleted + if (this.state.location.url() === 'player') { + dispatch('backToList') + } + this.state.saved.torrents.forEach((summary) => deleteTorrentFile(summary, deleteData)) this.state.saved.torrents = []