Still add unplayable torrents to __all__
This commit is contained in:
@@ -590,12 +590,20 @@ func (t *TorrentManager) canCapacityHandle() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *TorrentManager) markAsUnplayable(torrent *Torrent) {
|
func (t *TorrentManager) markAsUnplayable(torrent *Torrent) {
|
||||||
|
accessKey := t.GetKey(torrent)
|
||||||
for _, directory := range t.Config.GetDirectories() {
|
for _, directory := range t.Config.GetDirectories() {
|
||||||
|
if directory == config.DOWNLOADS || directory == config.DUMPED_TORRENTS {
|
||||||
|
return
|
||||||
|
}
|
||||||
torrents, _ := t.DirectoryMap.Get(directory)
|
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) {
|
func (t *TorrentManager) markAsUnfixable(torrent *Torrent, reason string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user