Add accidental removal fix
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package torrent
|
||||
|
||||
import (
|
||||
"github.com/debridmediamanager/zurg/internal/config"
|
||||
cmap "github.com/orcaman/concurrent-map/v2"
|
||||
)
|
||||
|
||||
@@ -32,8 +33,12 @@ func (t *TorrentManager) Delete(accessKey string, deleteInRD bool) {
|
||||
}
|
||||
// t.log.Infof("Removing torrent %s from zurg database (not real-debrid)", accessKey)
|
||||
t.DirectoryMap.IterCb(func(directory string, torrents cmap.ConcurrentMap[string, *Torrent]) {
|
||||
if directory == config.DOWNLOADS || directory == config.DUMPED_TORRENTS {
|
||||
return
|
||||
}
|
||||
torrents.Remove(accessKey)
|
||||
})
|
||||
|
||||
allTorrents.Remove(accessKey)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user