fix: resume torrents after deletion (#1974)

* fix: resume torrents after deletion

* Update torrent-list-controller.js

Co-authored-by: Diego Rodríguez Baquero <github@diegorbaquero.com>
This commit is contained in:
Alex
2021-09-23 02:56:00 +02:00
committed by GitHub
parent c7647440ba
commit e9d72ebb17

View File

@@ -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 = []