|
|
|
@ -172,24 +172,16 @@ namespace Emby.Server.Implementations.Library
|
|
|
|
|
|
|
|
|
|
foreach (var source in dynamicMediaSources)
|
|
|
|
|
{
|
|
|
|
|
if (user != null)
|
|
|
|
|
{
|
|
|
|
|
SetDefaultAudioAndSubtitleStreamIndexes(item, source, user);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Validate that this is actually possible
|
|
|
|
|
if (source.SupportsDirectStream)
|
|
|
|
|
{
|
|
|
|
|
source.SupportsDirectStream = SupportsDirectStream(source.Path, source.Protocol);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
list.Add(source);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (user != null)
|
|
|
|
|
{
|
|
|
|
|
foreach (var source in list)
|
|
|
|
|
if (user != null)
|
|
|
|
|
{
|
|
|
|
|
SetDefaultAudioAndSubtitleStreamIndexes(item, source, user);
|
|
|
|
|
|
|
|
|
|
if (string.Equals(item.MediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
source.SupportsTranscoding = user.HasPermission(PermissionKind.EnableAudioPlaybackTranscoding);
|
|
|
|
@ -200,6 +192,8 @@ namespace Emby.Server.Implementations.Library
|
|
|
|
|
source.SupportsDirectStream = user.HasPermission(PermissionKind.EnablePlaybackRemuxing);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
list.Add(source);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return SortMediaSources(list);
|
|
|
|
@ -338,6 +332,16 @@ namespace Emby.Server.Implementations.Library
|
|
|
|
|
foreach (var source in sources)
|
|
|
|
|
{
|
|
|
|
|
SetDefaultAudioAndSubtitleStreamIndexes(item, source, user);
|
|
|
|
|
|
|
|
|
|
if (string.Equals(item.MediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
source.SupportsTranscoding = user.HasPermission(PermissionKind.EnableAudioPlaybackTranscoding);
|
|
|
|
|
}
|
|
|
|
|
else if (string.Equals(item.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
source.SupportsTranscoding = user.HasPermission(PermissionKind.EnableVideoPlaybackTranscoding);
|
|
|
|
|
source.SupportsDirectStream = user.HasPermission(PermissionKind.EnablePlaybackRemuxing);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|