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

@@ -10,6 +10,17 @@ namespace MediaBrowser.Model.MediaInfo
{
public class MediaInfo : MediaSourceInfo, IHasProviderIds
{
public MediaInfo()
{
Chapters = Array.Empty<ChapterInfo>();
Artists = Array.Empty<string>();
AlbumArtists = Array.Empty<string>();
Studios = Array.Empty<string>();
Genres = Array.Empty<string>();
People = Array.Empty<BaseItemPerson>();
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
}
public ChapterInfo[] Chapters { get; set; }
/// <summary>
@@ -69,16 +80,5 @@ namespace MediaBrowser.Model.MediaInfo
/// </summary>
/// <value>The overview.</value>
public string Overview { get; set; }
public MediaInfo()
{
Chapters = Array.Empty<ChapterInfo>();
Artists = Array.Empty<string>();
AlbumArtists = Array.Empty<string>();
Studios = Array.Empty<string>();
Genres = Array.Empty<string>();
People = Array.Empty<BaseItemPerson>();
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
}
}
}

View File

@@ -8,6 +8,17 @@ namespace MediaBrowser.Model.MediaInfo
{
public class PlaybackInfoRequest
{
public PlaybackInfoRequest()
{
EnableDirectPlay = true;
EnableDirectStream = true;
EnableTranscoding = true;
AllowVideoStreamCopy = true;
AllowAudioStreamCopy = true;
IsPlayback = true;
DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http };
}
public Guid Id { get; set; }
public Guid UserId { get; set; }
@@ -43,16 +54,5 @@ namespace MediaBrowser.Model.MediaInfo
public bool AutoOpenLiveStream { get; set; }
public MediaProtocol[] DirectPlayProtocols { get; set; }
public PlaybackInfoRequest()
{
EnableDirectPlay = true;
EnableDirectStream = true;
EnableTranscoding = true;
AllowVideoStreamCopy = true;
AllowAudioStreamCopy = true;
IsPlayback = true;
DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http };
}
}
}

View File

@@ -10,6 +10,14 @@ namespace MediaBrowser.Model.MediaInfo
/// </summary>
public class PlaybackInfoResponse
{
/// <summary>
/// Initializes a new instance of the <see cref="PlaybackInfoResponse" /> class.
/// </summary>
public PlaybackInfoResponse()
{
MediaSources = Array.Empty<MediaSourceInfo>();
}
/// <summary>
/// Gets or sets the media sources.
/// </summary>
@@ -27,13 +35,5 @@ namespace MediaBrowser.Model.MediaInfo
/// </summary>
/// <value>The error code.</value>
public PlaybackErrorCode? ErrorCode { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="PlaybackInfoResponse" /> class.
/// </summary>
public PlaybackInfoResponse()
{
MediaSources = Array.Empty<MediaSourceInfo>();
}
}
}

View File

@@ -7,11 +7,11 @@ namespace MediaBrowser.Model.MediaInfo
{
public class SubtitleTrackInfo
{
public IReadOnlyList<SubtitleTrackEvent> TrackEvents { get; set; }
public SubtitleTrackInfo()
{
TrackEvents = Array.Empty<SubtitleTrackEvent>();
}
public IReadOnlyList<SubtitleTrackEvent> TrackEvents { get; set; }
}
}