Add accidental removal fix
This commit is contained in:
@@ -590,13 +590,10 @@ func (t *TorrentManager) canCapacityHandle() bool {
|
||||
}
|
||||
|
||||
func (t *TorrentManager) markAsUnplayable(torrent *Torrent) {
|
||||
// reassign to unplayable torrents directory
|
||||
t.DirectoryMap.IterCb(func(directory string, torrents cmap.ConcurrentMap[string, *Torrent]) {
|
||||
if strings.HasPrefix(directory, "int__") {
|
||||
return
|
||||
}
|
||||
for _, directory := range t.Config.GetDirectories() {
|
||||
torrents, _ := t.DirectoryMap.Get(directory)
|
||||
torrents.Remove(t.GetKey(torrent))
|
||||
})
|
||||
}
|
||||
torrents, _ := t.DirectoryMap.Get(config.UNPLAYABLE_TORRENTS)
|
||||
torrents.Set(t.GetKey(torrent), torrent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user