Enable TreatWarningsAsErrors for MediaBrowser.Model

This commit is contained in:
Bond_009
2021-02-20 23:13:04 +01:00
parent 13d65318eb
commit 141efafd3d
98 changed files with 1800 additions and 1784 deletions

View File

@@ -7,6 +7,7 @@ namespace MediaBrowser.Model.Session
public class BrowseRequest
{
/// <summary>
/// Gets or sets the item type.
/// Artist, Genre, Studio, Person, or any kind of BaseItem.
/// </summary>
/// <value>The type of the item.</value>

View File

@@ -9,6 +9,13 @@ namespace MediaBrowser.Model.Session
{
public class ClientCapabilities
{
public ClientCapabilities()
{
PlayableMediaTypes = Array.Empty<string>();
SupportedCommands = Array.Empty<GeneralCommandType>();
SupportsPersistentIdentifier = true;
}
public IReadOnlyList<string> PlayableMediaTypes { get; set; }
public IReadOnlyList<GeneralCommandType> SupportedCommands { get; set; }
@@ -28,12 +35,5 @@ namespace MediaBrowser.Model.Session
public string AppStoreUrl { get; set; }
public string IconUrl { get; set; }
public ClientCapabilities()
{
PlayableMediaTypes = Array.Empty<string>();
SupportedCommands = Array.Empty<GeneralCommandType>();
SupportsPersistentIdentifier = true;
}
}
}

View File

@@ -1,4 +1,3 @@
#nullable disable
#pragma warning disable CS1591
using System;
@@ -8,15 +7,15 @@ namespace MediaBrowser.Model.Session
{
public class GeneralCommand
{
public GeneralCommandType Name { get; set; }
public Guid ControllingUserId { get; set; }
public Dictionary<string, string> Arguments { get; set; }
public GeneralCommand()
{
Arguments = new Dictionary<string, string>();
}
public GeneralCommandType Name { get; set; }
public Guid ControllingUserId { get; set; }
public Dictionary<string, string> Arguments { get; }
}
}

View File

@@ -111,18 +111,4 @@ namespace MediaBrowser.Model.Session
public string PlaylistItemId { get; set; }
}
public enum RepeatMode
{
RepeatNone = 0,
RepeatAll = 1,
RepeatOne = 2
}
public class QueueItem
{
public Guid Id { get; set; }
public string PlaylistItemId { get; set; }
}
}

View File

@@ -1,5 +1,3 @@
#pragma warning disable CS1591
namespace MediaBrowser.Model.Session
{
/// <summary>
@@ -46,6 +44,10 @@ namespace MediaBrowser.Model.Session
/// The fast forward.
/// </summary>
FastForward,
/// <summary>
/// The play pause.
/// </summary>
PlayPause
}
}

View File

@@ -0,0 +1,14 @@
#nullable disable
#pragma warning disable CS1591
using System;
namespace MediaBrowser.Model.Session
{
public class QueueItem
{
public Guid Id { get; set; }
public string PlaylistItemId { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
#pragma warning disable CS1591
namespace MediaBrowser.Model.Session
{
public enum RepeatMode
{
RepeatNone = 0,
RepeatAll = 1,
RepeatOne = 2
}
}

View File

@@ -0,0 +1,31 @@
#pragma warning disable CS1591
namespace MediaBrowser.Model.Session
{
public enum TranscodeReason
{
ContainerNotSupported = 0,
VideoCodecNotSupported = 1,
AudioCodecNotSupported = 2,
ContainerBitrateExceedsLimit = 3,
AudioBitrateNotSupported = 4,
AudioChannelsNotSupported = 5,
VideoResolutionNotSupported = 6,
UnknownVideoStreamInfo = 7,
UnknownAudioStreamInfo = 8,
AudioProfileNotSupported = 9,
AudioSampleRateNotSupported = 10,
AnamorphicVideoNotSupported = 11,
InterlacedVideoNotSupported = 12,
SecondaryAudioNotSupported = 13,
RefFramesNotSupported = 14,
VideoBitDepthNotSupported = 15,
VideoBitrateNotSupported = 16,
VideoFramerateNotSupported = 17,
VideoLevelNotSupported = 18,
VideoProfileNotSupported = 19,
AudioBitDepthNotSupported = 20,
SubtitleCodecNotSupported = 21,
DirectPlayError = 22
}
}

View File

@@ -7,6 +7,11 @@ namespace MediaBrowser.Model.Session
{
public class TranscodingInfo
{
public TranscodingInfo()
{
TranscodeReasons = Array.Empty<TranscodeReason>();
}
public string AudioCodec { get; set; }
public string VideoCodec { get; set; }
@@ -30,37 +35,5 @@ namespace MediaBrowser.Model.Session
public int? AudioChannels { get; set; }
public TranscodeReason[] TranscodeReasons { get; set; }
public TranscodingInfo()
{
TranscodeReasons = Array.Empty<TranscodeReason>();
}
}
public enum TranscodeReason
{
ContainerNotSupported = 0,
VideoCodecNotSupported = 1,
AudioCodecNotSupported = 2,
ContainerBitrateExceedsLimit = 3,
AudioBitrateNotSupported = 4,
AudioChannelsNotSupported = 5,
VideoResolutionNotSupported = 6,
UnknownVideoStreamInfo = 7,
UnknownAudioStreamInfo = 8,
AudioProfileNotSupported = 9,
AudioSampleRateNotSupported = 10,
AnamorphicVideoNotSupported = 11,
InterlacedVideoNotSupported = 12,
SecondaryAudioNotSupported = 13,
RefFramesNotSupported = 14,
VideoBitDepthNotSupported = 15,
VideoBitrateNotSupported = 16,
VideoFramerateNotSupported = 17,
VideoLevelNotSupported = 18,
VideoProfileNotSupported = 19,
AudioBitDepthNotSupported = 20,
SubtitleCodecNotSupported = 21,
DirectPlayError = 22
}
}