diff --git a/internal/config/v1.go b/internal/config/v1.go index e2c4b57..8346154 100644 --- a/internal/config/v1.go +++ b/internal/config/v1.go @@ -396,7 +396,11 @@ func (z *ZurgConfigV1) matchFilter(torrentName string, torrentSize int64, torren if stream.CodecType != "audio" { continue } - if strings.EqualFold(stream.Tags.Language, filter.MediaInfoWithAudioLanguage) { + language, err := stream.TagList.GetString("language") + if err != nil { + continue + } + if strings.EqualFold(language, filter.MediaInfoWithAudioLanguage) { return true } } @@ -409,7 +413,11 @@ func (z *ZurgConfigV1) matchFilter(torrentName string, torrentSize int64, torren if stream.CodecType != "audio" { continue } - if strings.EqualFold(stream.Tags.Language, filter.MediaInfoWithoutAudioLanguage) { + language, err := stream.TagList.GetString("language") + if err != nil { + continue + } + if strings.EqualFold(language, filter.MediaInfoWithoutAudioLanguage) { return false } } @@ -422,7 +430,11 @@ func (z *ZurgConfigV1) matchFilter(torrentName string, torrentSize int64, torren if stream.CodecType != "subtitle" { continue } - if strings.EqualFold(stream.Tags.Language, filter.MediaInfoWithSubtitleLanguage) { + language, err := stream.TagList.GetString("language") + if err != nil { + continue + } + if strings.EqualFold(language, filter.MediaInfoWithSubtitleLanguage) { return true } } @@ -435,7 +447,11 @@ func (z *ZurgConfigV1) matchFilter(torrentName string, torrentSize int64, torren if stream.CodecType != "subtitle" { continue } - if strings.EqualFold(stream.Tags.Language, filter.MediaInfoWithoutSubtitleLanguage) { + language, err := stream.TagList.GetString("language") + if err != nil { + continue + } + if strings.EqualFold(language, filter.MediaInfoWithoutSubtitleLanguage) { return false } }