Mark as unplayable instead of assigning to unplayable
This commit is contained in:
@@ -338,16 +338,18 @@ func (t *TorrentManager) assignedDirectoryCb(tor *Torrent, cb func(string)) {
|
||||
unplayable = false
|
||||
}
|
||||
})
|
||||
|
||||
if unplayable {
|
||||
t.markAsUnplayable(tor, "no playable files")
|
||||
return
|
||||
}
|
||||
|
||||
// Map torrents to directories
|
||||
switch t.Config.GetVersion() {
|
||||
case "v1":
|
||||
configV1 := t.Config.(*config.ZurgConfigV1)
|
||||
for _, directories := range configV1.GetGroupMap() {
|
||||
for _, directory := range directories {
|
||||
if unplayable {
|
||||
cb(config.UNPLAYABLE_TORRENTS)
|
||||
break
|
||||
}
|
||||
if t.Config.MeetsConditions(directory, t.GetKey(tor), tor.ComputeTotalSize(), torrentIDs, filenames, fileSizes) {
|
||||
cb(directory)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user