From 14f61696019f03496a3f088f9fb05cb37974dc31 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Sat, 20 Jan 2024 05:09:49 +0100 Subject: [PATCH] Revert to old deletion method --- internal/torrent/repair.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/torrent/repair.go b/internal/torrent/repair.go index dfb0b4c..21a1c02 100644 --- a/internal/torrent/repair.go +++ b/internal/torrent/repair.go @@ -325,7 +325,9 @@ func (t *TorrentManager) redownloadTorrent(torrent *Torrent, brokenFiles string) if info.Progress != 100 { t.log.Infof("Torrent %s (id=%s) is not cached anymore so we have to wait until completion (this should fix the issue already)", t.GetKey(torrent), info.ID) if len(oldTorrentIDs) > 0 { - t.Delete(t.GetKey(torrent), true) + for _, id := range oldTorrentIDs { + t.Api.DeleteTorrent(id) + } } else { t.fixers.Set(newTorrentID, torrent) } @@ -340,7 +342,9 @@ func (t *TorrentManager) redownloadTorrent(torrent *Torrent, brokenFiles string) if len(oldTorrentIDs) > 0 { // only triggered when brokenFiles == "" - t.Delete(t.GetKey(torrent), true) + for _, id := range oldTorrentIDs { + t.Api.DeleteTorrent(id) + } } else { t.fixers.Set(newTorrentID, torrent) }