add remuxing permission

pull/702/head
Luke Pulverenti 9 years ago
parent 8508e07bb9
commit 6e9828ddad

@ -284,6 +284,13 @@ namespace MediaBrowser.Api.Playback
options.ForceDirectPlay = true; options.ForceDirectPlay = true;
} }
} }
else if (item is Video)
{
if (!user.Policy.EnableAudioPlaybackTranscoding && !user.Policy.EnableVideoPlaybackTranscoding && !user.Policy.EnablePlaybackRemuxing)
{
options.ForceDirectPlay = true;
}
}
// The MediaSource supports direct stream, now test to see if the client supports it // The MediaSource supports direct stream, now test to see if the client supports it
var streamInfo = string.Equals(item.MediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase) ? var streamInfo = string.Equals(item.MediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase) ?
@ -315,6 +322,13 @@ namespace MediaBrowser.Api.Playback
options.ForceDirectStream = true; options.ForceDirectStream = true;
} }
} }
else if (item is Video)
{
if (!user.Policy.EnableAudioPlaybackTranscoding && !user.Policy.EnableVideoPlaybackTranscoding && !user.Policy.EnablePlaybackRemuxing)
{
options.ForceDirectStream = true;
}
}
// The MediaSource supports direct stream, now test to see if the client supports it // The MediaSource supports direct stream, now test to see if the client supports it
var streamInfo = string.Equals(item.MediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase) ? var streamInfo = string.Equals(item.MediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase) ?

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using MediaBrowser.Model.Extensions;
namespace MediaBrowser.Model.Dlna namespace MediaBrowser.Model.Dlna
{ {
@ -59,8 +60,8 @@ namespace MediaBrowser.Model.Dlna
private static double GetVideoBitrateScaleFactor(string codec) private static double GetVideoBitrateScaleFactor(string codec)
{ {
if (string.Equals(codec, "h265", StringComparison.OrdinalIgnoreCase) || if (StringHelper.EqualsIgnoreCase(codec, "h265") ||
string.Equals(codec, "hevc", StringComparison.OrdinalIgnoreCase)) StringHelper.EqualsIgnoreCase(codec, "hevc"))
{ {
return .5; return .5;
} }

@ -41,6 +41,7 @@ namespace MediaBrowser.Model.Users
public bool EnableMediaPlayback { get; set; } public bool EnableMediaPlayback { get; set; }
public bool EnableAudioPlaybackTranscoding { get; set; } public bool EnableAudioPlaybackTranscoding { get; set; }
public bool EnableVideoPlaybackTranscoding { get; set; } public bool EnableVideoPlaybackTranscoding { get; set; }
public bool EnablePlaybackRemuxing { get; set; }
public bool EnableContentDeletion { get; set; } public bool EnableContentDeletion { get; set; }
public bool EnableContentDownloading { get; set; } public bool EnableContentDownloading { get; set; }
@ -76,6 +77,7 @@ namespace MediaBrowser.Model.Users
EnableMediaPlayback = true; EnableMediaPlayback = true;
EnableAudioPlaybackTranscoding = true; EnableAudioPlaybackTranscoding = true;
EnableVideoPlaybackTranscoding = true; EnableVideoPlaybackTranscoding = true;
EnablePlaybackRemuxing = true;
EnableLiveTvManagement = true; EnableLiveTvManagement = true;
EnableLiveTvAccess = true; EnableLiveTvAccess = true;

Loading…
Cancel
Save