mirror of https://github.com/jellyfin/jellyfin.git
Fix .Net 7 compatibility
This commit is contained in:
parent
8e8a085b7e
commit
0834dc58c1
|
@ -11,7 +11,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
public class MediaOptions
|
public class MediaOptions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new instance of the <see cref="MediaOptions"/> class.
|
/// Initializes a new instance of the <see cref="MediaOptions"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public MediaOptions()
|
public MediaOptions()
|
||||||
{
|
{
|
||||||
|
@ -22,32 +22,32 @@ namespace MediaBrowser.Model.Dlna
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a boolean to allow/forbid direct playback.
|
/// Gets or sets a value indicating whether direct playback is allowed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool EnableDirectPlay { get; set; }
|
public bool EnableDirectPlay { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a boolean to allow/forbid direct streaming.
|
/// Gets or sets a value indicating whether direct streaming is allowed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool EnableDirectStream { get; set; }
|
public bool EnableDirectStream { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a boolean to force direct playback.
|
/// Gets or sets a value indicating whether direct playback is forced.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ForceDirectPlay { get; set; }
|
public bool ForceDirectPlay { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a boolean to force direct streaming.
|
/// Gets or sets a value indicating whether direct streaming is forced.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ForceDirectStream { get; set; }
|
public bool ForceDirectStream { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public bool AllowAudioStreamCopy { get; set; }
|
public bool AllowAudioStreamCopy { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public bool AllowVideoStreamCopy { get; set; }
|
public bool AllowVideoStreamCopy { get; set; }
|
||||||
|
|
||||||
|
@ -64,7 +64,6 @@ namespace MediaBrowser.Model.Dlna
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the device profile.
|
/// Gets or sets the device profile.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public DeviceProfile Profile { get; set; }
|
public DeviceProfile Profile { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1483,7 +1483,6 @@ namespace MediaBrowser.Model.Dlna
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
long requestedMaxBitrate = maxBitrate > 0 ? maxBitrate : 1000000;
|
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
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ValidateMediaOptions(MediaOptions options, Boolean IsMediaSource)
|
private static void ValidateMediaOptions(MediaOptions options, bool isMediaSource)
|
||||||
{
|
{
|
||||||
if (options.ItemId.Equals(default))
|
if (options.ItemId.Equals(default))
|
||||||
{
|
{
|
||||||
|
@ -1518,7 +1517,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
throw new ArgumentException("MediaSources is required");
|
throw new ArgumentException("MediaSources is required");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsMediaSource)
|
if (isMediaSource)
|
||||||
{
|
{
|
||||||
if (options.AudioStreamIndex.HasValue && string.IsNullOrEmpty(options.MediaSourceId))
|
if (options.AudioStreamIndex.HasValue && string.IsNullOrEmpty(options.MediaSourceId))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue