Fix language filters
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user