Explorar o código

Make 'Always' subtitle mode prioritise full tracks

jgriff6 %!s(int64=2) %!d(string=hai) anos
pai
achega
a83d4b03dc
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      Emby.Server.Implementations/Library/MediaStreamSelector.cs

+ 2 - 2
Emby.Server.Implementations/Library/MediaStreamSelector.cs

@@ -71,8 +71,8 @@ namespace Emby.Server.Implementations.Library
             }
             else if (mode == SubtitlePlaybackMode.Always)
             {
-                // Always load subtitles of the user's preferred subtitle language if possible, otherwise default behaviour.
-                stream = sortedStreams.FirstOrDefault(x => preferredLanguages.Contains(x.Language, StringComparison.OrdinalIgnoreCase)) ??
+                // Always load (full/non-forced) subtitles of the user's preferred subtitle language if possible, otherwise default behaviour.
+                stream = sortedStreams.FirstOrDefault(x => !x.IsForced && preferredLanguages.Contains(x.Language, StringComparison.OrdinalIgnoreCase)) ??
                     sortedStreams.FirstOrDefault(x => x.IsExternal || x.IsForced || x.IsDefault);
             }
             else if (mode == SubtitlePlaybackMode.OnlyForced)