Fix .Net 7 compatibility

This commit is contained in:
Shadowghost 2022-12-07 18:06:04 +01:00
parent 8e8a085b7e
commit 0834dc58c1
2 changed files with 9 additions and 11 deletions

View File

@ -11,7 +11,7 @@ namespace MediaBrowser.Model.Dlna
public class MediaOptions
{
/// <summary>
/// Creates a new instance of the <see cref="MediaOptions"/> class.
/// Initializes a new instance of the <see cref="MediaOptions"/> class.
/// </summary>
public MediaOptions()
{
@ -22,32 +22,32 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
/// Gets or sets a boolean to allow/forbid direct playback.
/// Gets or sets a value indicating whether direct playback is allowed.
/// </summary>
public bool EnableDirectPlay { get; set; }
/// <summary>
/// Gets or sets a boolean to allow/forbid direct streaming.
/// Gets or sets a value indicating whether direct streaming is allowed.
/// </summary>
public bool EnableDirectStream { get; set; }
/// <summary>
/// Gets or sets a boolean to force direct playback.
/// Gets or sets a value indicating whether direct playback is forced.
/// </summary>
public bool ForceDirectPlay { get; set; }
/// <summary>
/// Gets or sets a boolean to force direct streaming.
/// Gets or sets a value indicating whether direct streaming is forced.
/// </summary>
public bool ForceDirectStream { get; set; }
/// <summary>
/// Gets or sets a boolean to allow/forbid audio stream copy.
/// Gets or sets a value indicating whether audio stream copy is allowed.
/// </summary>
public bool AllowAudioStreamCopy { get; set; }
/// <summary>
/// Gets or sets a boolean to allow/forbid video stream copy.
/// Gets or sets a value indicating whether video stream copy is allowed.
/// </summary>
public bool AllowVideoStreamCopy { get; set; }
@ -64,7 +64,6 @@ namespace MediaBrowser.Model.Dlna
/// <summary>
/// Gets or sets the device profile.
/// </summary>
public DeviceProfile Profile { get; set; }
/// <summary>

View File

@ -1483,7 +1483,6 @@ namespace MediaBrowser.Model.Dlna
return false;
}
long requestedMaxBitrate = maxBitrate > 0 ? maxBitrate : 1000000;
// If we don't know the bitrate, then force a transcode if requested max bitrate is under 40 mbps
@ -1501,7 +1500,7 @@ namespace MediaBrowser.Model.Dlna
return false;
}
private static void ValidateMediaOptions(MediaOptions options, Boolean IsMediaSource)
private static void ValidateMediaOptions(MediaOptions options, bool isMediaSource)
{
if (options.ItemId.Equals(default))
{
@ -1518,7 +1517,7 @@ namespace MediaBrowser.Model.Dlna
throw new ArgumentException("MediaSources is required");
}
if (IsMediaSource)
if (isMediaSource)
{
if (options.AudioStreamIndex.HasValue && string.IsNullOrEmpty(options.MediaSourceId))
{