Skip to content

Commit

Permalink
fix: destroy store correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaUnknown committed Aug 5, 2024
1 parent 4f9fbb8 commit 11ccef2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common/modules/webtorrent.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,12 @@ export default class TorrentClient extends WebTorrent {
return
}
localStorage.setItem('lastFinished', 'false')
if (this.torrents.length) await this.remove(this.torrents[0])
if (this.torrents.length) {
await this.remove(this.torrents[0], { destroyStore: !this.settings.torrentPersist })
}
const torrent = await this.add(data, {
private: this.settings.torrentPeX,
path: this.torrentPath || undefined,
destroyStoreOnDestroy: !this.settings.torrentPersist,
skipVerify,
announce,
deselect: this.settings.torrentStreamedDownload
Expand Down

0 comments on commit 11ccef2

Please sign in to comment.