aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Dto
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-23 19:58:28 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-23 19:58:28 -0400
commit1e532d4f53bd65fc1dca3ec8cc6408f1b1efdc02 (patch)
treee02408b59e4fc1a058f6e31e996c5a954d0f1448 /MediaBrowser.Server.Implementations/Dto
parent40836f194bc43b6d03277d70e6fb3c79732132a8 (diff)
factor device pixel ratio into downloaded image size
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto')
-rw-r--r--MediaBrowser.Server.Implementations/Dto/MediaStreamSelector.cs18
1 files changed, 7 insertions, 11 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/MediaStreamSelector.cs b/MediaBrowser.Server.Implementations/Dto/MediaStreamSelector.cs
index e5a859cdc..10c78b300 100644
--- a/MediaBrowser.Server.Implementations/Dto/MediaStreamSelector.cs
+++ b/MediaBrowser.Server.Implementations/Dto/MediaStreamSelector.cs
@@ -64,7 +64,7 @@ namespace MediaBrowser.Server.Implementations.Dto
// always load the most suitable full subtitles
stream = full.FirstOrDefault();
}
-
+
// load forced subs if we have found no suitable full subtitles
stream = stream ?? forced.FirstOrDefault();
@@ -86,17 +86,13 @@ namespace MediaBrowser.Server.Implementations.Dto
var orderStreams = streams
.Where(i => i.Type == type);
- if (languagePreferences.Count == 0)
- {
- return orderStreams.OrderBy(i => i.IsDefault)
- .ThenBy(i => i.Index)
- .ToList();
- }
-
+ // Give some preferance to external text subs for better performance
return orderStreams.OrderBy(i => languagePreferences.FindIndex(l => string.Equals(i.Language, l, StringComparison.OrdinalIgnoreCase)))
- .ThenBy(i => i.IsDefault)
- .ThenBy(i => i.Index)
- .ToList();
+ .ThenBy(i => i.IsDefault)
+ .ThenBy(i => !i.IsGraphicalSubtitleStream)
+ .ThenBy(i => i.IsExternal)
+ .ThenBy(i => i.Index)
+ .ToList();
}
}
}