Fix logic of fetching torrents

This commit is contained in:
Ben Sarmiento
2024-05-06 10:48:01 +02:00
parent b6b59b22e6
commit ae94252156
11 changed files with 205 additions and 49 deletions

View File

@@ -33,7 +33,7 @@ func (t *TorrentManager) Delete(accessKey string, deleteInRD bool) {
if torrent, ok := allTorrents.Get(accessKey); ok {
torrent.DownloadedIDs.Union(torrent.InProgressIDs).Each(func(id string) bool {
t.log.Debugf("Deleting torrent %s (id=%s) in RD", accessKey, id)
t.Api.DeleteTorrent(id)
t.api.DeleteTorrent(id)
infoCache.Remove(id)
t.deleteTorrentFile(id)
return false