mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-16 07:12:18 +01:00
Apply review suggestions
This commit is contained in:
@@ -407,10 +407,9 @@ namespace MediaBrowser.Model.Dlna
|
||||
continue;
|
||||
}
|
||||
|
||||
var formatStr = format.ToString();
|
||||
if (directPlayProfile.SupportsContainer(formatStr))
|
||||
if (directPlayProfile.SupportsContainer(format))
|
||||
{
|
||||
return formatStr;
|
||||
return format;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1317,6 +1316,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
|
||||
var containerSupported = false;
|
||||
TranscodeReason[] rankings = [TranscodeReason.VideoCodecNotSupported, VideoCodecReasons, TranscodeReason.AudioCodecNotSupported, AudioCodecReasons, ContainerReasons];
|
||||
|
||||
// Check DirectPlay profiles to see if it can be direct played
|
||||
var analyzedProfiles = profile.DirectPlayProfiles
|
||||
@@ -1382,7 +1382,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
playMethod = PlayMethod.DirectStream;
|
||||
}
|
||||
|
||||
TranscodeReason[] rankings = [TranscodeReason.VideoCodecNotSupported, VideoCodecReasons, TranscodeReason.AudioCodecNotSupported, AudioCodecReasons, ContainerReasons];
|
||||
var ranked = GetRank(ref failureReasons, rankings);
|
||||
|
||||
return (Result: (Profile: directPlayProfile, PlayMethod: playMethod, AudioStreamIndex: selectedAudioStream?.Index, TranscodeReason: failureReasons), Order: order, Rank: ranked);
|
||||
|
||||
@@ -91,7 +91,7 @@ public static class ContainerHelper
|
||||
{
|
||||
foreach (var profile in allProfileContainers)
|
||||
{
|
||||
if (container.Equals(profile, StringComparison.OrdinalIgnoreCase))
|
||||
if (!profile.IsEmpty && container.Equals(profile, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return !isNegativeList;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public static class ContainerHelper
|
||||
return true;
|
||||
}
|
||||
|
||||
var allInputContainers = inputContainer.Split(',');
|
||||
var allInputContainers = Split(inputContainer);
|
||||
foreach (var container in allInputContainers)
|
||||
{
|
||||
foreach (var profile in profileContainers)
|
||||
|
||||
Reference in New Issue
Block a user