Separate mark as unfixable and unplayable torrents
This commit is contained in:
@@ -191,6 +191,7 @@ func (t *TorrentManager) repair(torrent *Torrent) {
|
|||||||
}
|
}
|
||||||
torrent.SelectedFiles.Set(unassigned.Filename, newFile)
|
torrent.SelectedFiles.Set(unassigned.Filename, newFile)
|
||||||
}
|
}
|
||||||
|
t.markAsUnfixable(torrent)
|
||||||
t.markAsUnplayable(torrent)
|
t.markAsUnplayable(torrent)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@@ -355,7 +356,6 @@ func (t *TorrentManager) canCapacityHandle() bool {
|
|||||||
|
|
||||||
func (t *TorrentManager) markAsUnplayable(torrent *Torrent) {
|
func (t *TorrentManager) markAsUnplayable(torrent *Torrent) {
|
||||||
t.log.Warnf("Marking torrent %s as unplayable", torrent.AccessKey)
|
t.log.Warnf("Marking torrent %s as unplayable", torrent.AccessKey)
|
||||||
t.markAsUnfixable(torrent)
|
|
||||||
t.DirectoryMap.IterCb(func(directory string, torrents cmap.ConcurrentMap[string, *Torrent]) {
|
t.DirectoryMap.IterCb(func(directory string, torrents cmap.ConcurrentMap[string, *Torrent]) {
|
||||||
torrents.Remove(torrent.AccessKey)
|
torrents.Remove(torrent.AccessKey)
|
||||||
})
|
})
|
||||||
@@ -364,6 +364,7 @@ func (t *TorrentManager) markAsUnplayable(torrent *Torrent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *TorrentManager) markAsUnfixable(torrent *Torrent) {
|
func (t *TorrentManager) markAsUnfixable(torrent *Torrent) {
|
||||||
|
t.log.Warnf("Marking torrent %s as unfixable", torrent.AccessKey)
|
||||||
torrent.Unfixable = true
|
torrent.Unfixable = true
|
||||||
infoCache, _ := t.DirectoryMap.Get(INT_INFO_CACHE)
|
infoCache, _ := t.DirectoryMap.Get(INT_INFO_CACHE)
|
||||||
torrent.DownloadedIDs.Each(func(id string) bool {
|
torrent.DownloadedIDs.Each(func(id string) bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user