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) }