mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 18:14:42 +01:00
update hls params
This commit is contained in:
@@ -324,7 +324,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
if (directPlayProfile != null)
|
||||
{
|
||||
// While options takes the network and other factors into account. Only applies to direct stream
|
||||
if (item.SupportsDirectStream && IsAudioEligibleForDirectPlay(item, options.GetMaxBitrate(true)) && options.EnableDirectStream)
|
||||
if (item.SupportsDirectStream && IsAudioEligibleForDirectPlay(item, options.GetMaxBitrate(true), PlayMethod.DirectStream) && options.EnableDirectStream)
|
||||
{
|
||||
playMethods.Add(PlayMethod.DirectStream);
|
||||
}
|
||||
@@ -332,7 +332,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
// The profile describes what the device supports
|
||||
// If device requirements are satisfied then allow both direct stream and direct play
|
||||
if (item.SupportsDirectPlay &&
|
||||
IsAudioEligibleForDirectPlay(item, GetBitrateForDirectPlayCheck(item, options, true)) && options.EnableDirectPlay)
|
||||
IsAudioEligibleForDirectPlay(item, GetBitrateForDirectPlayCheck(item, options, true), PlayMethod.DirectPlay) && options.EnableDirectPlay)
|
||||
{
|
||||
playMethods.Add(PlayMethod.DirectPlay);
|
||||
}
|
||||
@@ -905,7 +905,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
}
|
||||
|
||||
return IsAudioEligibleForDirectPlay(item, maxBitrate);
|
||||
return IsAudioEligibleForDirectPlay(item, maxBitrate, playMethod);
|
||||
}
|
||||
|
||||
public static SubtitleProfile GetSubtitleProfile(MediaStream subtitleStream, SubtitleProfile[] subtitleProfiles, PlayMethod playMethod, string transcodingSubProtocol, string transcodingContainer)
|
||||
@@ -1035,7 +1035,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
return null;
|
||||
}
|
||||
|
||||
private bool IsAudioEligibleForDirectPlay(MediaSourceInfo item, long? maxBitrate)
|
||||
private bool IsAudioEligibleForDirectPlay(MediaSourceInfo item, long? maxBitrate, PlayMethod playMethod)
|
||||
{
|
||||
// Don't restrict by bitrate if coming from an external domain
|
||||
if (item.IsRemote)
|
||||
@@ -1045,19 +1045,19 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (!maxBitrate.HasValue)
|
||||
{
|
||||
_logger.Info("Cannot direct play due to unknown supported bitrate");
|
||||
_logger.Info("Cannot "+ playMethod + " due to unknown supported bitrate");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!item.Bitrate.HasValue)
|
||||
{
|
||||
_logger.Info("Cannot direct play due to unknown content bitrate");
|
||||
_logger.Info("Cannot " + playMethod + " due to unknown content bitrate");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.Bitrate.Value > maxBitrate.Value)
|
||||
{
|
||||
_logger.Info("Bitrate exceeds DirectPlay limit: media bitrate: {0}, max bitrate: {1}", item.Bitrate.Value.ToString(CultureInfo.InvariantCulture), maxBitrate.Value.ToString(CultureInfo.InvariantCulture));
|
||||
_logger.Info("Bitrate exceeds " + playMethod + " limit: media bitrate: {0}, max bitrate: {1}", item.Bitrate.Value.ToString(CultureInfo.InvariantCulture), maxBitrate.Value.ToString(CultureInfo.InvariantCulture));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user