mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-07 00:08:29 +01:00
Fix SA 1116 warnings
This commit is contained in:
@@ -38,7 +38,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
";DLNA.ORG_FLAGS={0}",
|
||||
DlnaMaps.FlagsToString(flagValue));
|
||||
|
||||
ResponseProfile mediaProfile = _profile.GetImageMediaProfile(container,
|
||||
ResponseProfile mediaProfile = _profile.GetImageMediaProfile(
|
||||
container,
|
||||
width,
|
||||
height);
|
||||
|
||||
@@ -160,7 +161,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
string dlnaflags = string.Format(CultureInfo.InvariantCulture, ";DLNA.ORG_FLAGS={0}",
|
||||
DlnaMaps.FlagsToString(flagValue));
|
||||
|
||||
ResponseProfile mediaProfile = _profile.GetVideoMediaProfile(container,
|
||||
ResponseProfile mediaProfile = _profile.GetVideoMediaProfile(
|
||||
container,
|
||||
audioCodec,
|
||||
videoCodec,
|
||||
width,
|
||||
@@ -221,7 +223,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
private static string GetImageOrgPnValue(string container, int? width, int? height)
|
||||
{
|
||||
MediaFormatProfile? format = new MediaFormatProfileResolver()
|
||||
.ResolveImageFormat(container,
|
||||
.ResolveImageFormat(
|
||||
container,
|
||||
width,
|
||||
height);
|
||||
|
||||
@@ -231,7 +234,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
private static string GetAudioOrgPnValue(string container, int? audioBitrate, int? audioSampleRate, int? audioChannels)
|
||||
{
|
||||
MediaFormatProfile? format = new MediaFormatProfileResolver()
|
||||
.ResolveAudioFormat(container,
|
||||
.ResolveAudioFormat(
|
||||
container,
|
||||
audioBitrate,
|
||||
audioSampleRate,
|
||||
audioChannels);
|
||||
|
||||
@@ -277,7 +277,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
return null;
|
||||
}
|
||||
|
||||
public ResponseProfile GetVideoMediaProfile(string container,
|
||||
public ResponseProfile GetVideoMediaProfile(
|
||||
string container,
|
||||
string audioCodec,
|
||||
string videoCodec,
|
||||
int? width,
|
||||
|
||||
@@ -455,7 +455,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (directPlayProfile == null)
|
||||
{
|
||||
_logger.LogInformation("Profile: {0}, No audio direct play profiles found for {1} with codec {2}",
|
||||
_logger.LogInformation(
|
||||
"Profile: {0}, No audio direct play profiles found for {1} with codec {2}",
|
||||
options.Profile.Name ?? "Unknown Profile",
|
||||
item.Path ?? "Unknown path",
|
||||
audioStream.Codec ?? "Unknown codec");
|
||||
@@ -679,7 +680,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
bool isEligibleForDirectPlay = options.EnableDirectPlay && (options.ForceDirectPlay || directPlayEligibilityResult.Item1);
|
||||
bool isEligibleForDirectStream = options.EnableDirectStream && (options.ForceDirectStream || directStreamEligibilityResult.Item1);
|
||||
|
||||
_logger.LogInformation("Profile: {0}, Path: {1}, isEligibleForDirectPlay: {2}, isEligibleForDirectStream: {3}",
|
||||
_logger.LogInformation(
|
||||
"Profile: {0}, Path: {1}, isEligibleForDirectPlay: {2}, isEligibleForDirectStream: {3}",
|
||||
options.Profile.Name ?? "Unknown Profile",
|
||||
item.Path ?? "Unknown path",
|
||||
isEligibleForDirectPlay,
|
||||
@@ -973,7 +975,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (directPlay == null)
|
||||
{
|
||||
_logger.LogInformation("Profile: {0}, No video direct play profiles found for {1} with codec {2}",
|
||||
_logger.LogInformation(
|
||||
"Profile: {0}, No video direct play profiles found for {1} with codec {2}",
|
||||
profile.Name ?? "Unknown Profile",
|
||||
mediaSource.Path ?? "Unknown path",
|
||||
videoStream.Codec ?? "Unknown codec");
|
||||
@@ -1137,7 +1140,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
private void LogConditionFailure(DeviceProfile profile, string type, ProfileCondition condition, MediaSourceInfo mediaSource)
|
||||
{
|
||||
_logger.LogInformation("Profile: {0}, DirectPlay=false. Reason={1}.{2} Condition: {3}. ConditionValue: {4}. IsRequired: {5}. Path: {6}",
|
||||
_logger.LogInformation(
|
||||
"Profile: {0}, DirectPlay=false. Reason={1}.{2} Condition: {3}. ConditionValue: {4}. IsRequired: {5}. Path: {6}",
|
||||
type,
|
||||
profile.Name ?? "Unknown Profile",
|
||||
condition.Property,
|
||||
@@ -1342,7 +1346,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (itemBitrate > requestedMaxBitrate)
|
||||
{
|
||||
_logger.LogInformation("Bitrate exceeds {PlayBackMethod} limit: media bitrate: {MediaBitrate}, max bitrate: {MaxBitrate}",
|
||||
_logger.LogInformation(
|
||||
"Bitrate exceeds {PlayBackMethod} limit: media bitrate: {MediaBitrate}, max bitrate: {MaxBitrate}",
|
||||
playMethod, itemBitrate, requestedMaxBitrate);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user