diff --git a/internal/torrent/repair.go b/internal/torrent/repair.go index d421b4b..cdf0b38 100644 --- a/internal/torrent/repair.go +++ b/internal/torrent/repair.go @@ -590,12 +590,20 @@ func (t *TorrentManager) canCapacityHandle() bool { } func (t *TorrentManager) markAsUnplayable(torrent *Torrent) { + accessKey := t.GetKey(torrent) for _, directory := range t.Config.GetDirectories() { + if directory == config.DOWNLOADS || directory == config.DUMPED_TORRENTS { + return + } torrents, _ := t.DirectoryMap.Get(directory) - torrents.Remove(t.GetKey(torrent)) + torrents.Remove(accessKey) } - torrents, _ := t.DirectoryMap.Get(config.UNPLAYABLE_TORRENTS) - torrents.Set(t.GetKey(torrent), torrent) + + torrents, _ := t.DirectoryMap.Get(config.ALL_TORRENTS) + torrents.Set(accessKey, torrent) + + torrents, _ = t.DirectoryMap.Get(config.UNPLAYABLE_TORRENTS) + torrents.Set(accessKey, torrent) } func (t *TorrentManager) markAsUnfixable(torrent *Torrent, reason string) {