Repair check is now sync

This commit is contained in:
Ben Sarmiento
2024-01-20 03:11:01 +01:00
parent ccd260db6a
commit d906230514
2 changed files with 13 additions and 16 deletions

View File

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