From bb85253e3be57cf8dab471fa371fc71932814436 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 7 May 2014 16:28:28 -0400 Subject: [PATCH] add audio track check --- MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs b/MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs index b9a23449a..a20dc4d29 100644 --- a/MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs +++ b/MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs @@ -89,8 +89,11 @@ namespace MediaBrowser.Providers.MediaInfo return false; } - var internalAudioStreams = internalMediaStreams.Where(i => i.Type == MediaStreamType.Audio) - .ToList(); + // There's already an audio stream for this language + if (internalMediaStreams.Any(i => i.Type == MediaStreamType.Audio && string.Equals(i.Language, language, StringComparison.OrdinalIgnoreCase))) + { + return false; + } // There's an internal subtitle stream for this language if (!forceExternal &&