set MediaSource SupportsDirectStream

This commit is contained in:
Luke Pulverenti
2015-03-16 23:51:35 -04:00
parent ae6792a436
commit 814c38abfc
3 changed files with 17 additions and 2 deletions

View File

@@ -275,7 +275,7 @@ namespace MediaBrowser.Model.Dlna
if (directPlayProfile != null)
{
// While options takes the network and other factors into account. Only applies to direct stream
if (IsAudioEligibleForDirectPlay(item, options.GetMaxBitrate()))
if (item.SupportsDirectStream && IsAudioEligibleForDirectPlay(item, options.GetMaxBitrate()))
{
playMethods.Add(PlayMethod.DirectStream);
}
@@ -581,6 +581,11 @@ namespace MediaBrowser.Model.Dlna
return PlayMethod.DirectPlay;
}
}
if (!mediaSource.SupportsDirectStream)
{
return null;
}
return PlayMethod.DirectStream;
}

View File

@@ -23,6 +23,7 @@ namespace MediaBrowser.Model.Dto
public long? RunTimeTicks { get; set; }
public bool ReadAtNativeFramerate { get; set; }
public bool SupportsTranscoding { get; set; }
public bool SupportsDirectStream { get; set; }
public VideoType? VideoType { get; set; }
@@ -47,6 +48,7 @@ namespace MediaBrowser.Model.Dto
RequiredHttpHeaders = new Dictionary<string, string>();
PlayableStreamFileNames = new List<string>();
SupportsTranscoding = true;
SupportsDirectStream = true;
}
public int? DefaultAudioStreamIndex { get; set; }