diff --git a/internal/torrent/refresh.go b/internal/torrent/refresh.go index f2ff66e..aa8d5fd 100644 --- a/internal/torrent/refresh.go +++ b/internal/torrent/refresh.go @@ -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