From 11ccef2287b77cb879dddcc3b2b40d1f06e1fcbf Mon Sep 17 00:00:00 2001 From: ThaUnknown <6506529+ThaUnknown@users.noreply.github.com> Date: Mon, 5 Aug 2024 18:49:30 +0200 Subject: [PATCH] fix: destroy store correctly --- common/modules/webtorrent.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/modules/webtorrent.js b/common/modules/webtorrent.js index 21db346..e500e27 100644 --- a/common/modules/webtorrent.js +++ b/common/modules/webtorrent.js @@ -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