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

@@ -9,7 +9,7 @@ namespace MediaBrowser.Model.LiveTv
public class BaseTimerInfoDto : IHasServerId
{
/// <summary>
/// Id of the recording.
/// Gets or sets the Id of the recording.
/// </summary>
public string Id { get; set; }
@@ -28,7 +28,7 @@ namespace MediaBrowser.Model.LiveTv
public string ExternalId { get; set; }
/// <summary>
/// ChannelId of the recording.
/// Gets or sets the channel id of the recording.
/// </summary>
public Guid ChannelId { get; set; }
@@ -39,7 +39,7 @@ namespace MediaBrowser.Model.LiveTv
public string ExternalChannelId { get; set; }
/// <summary>
/// ChannelName of the recording.
/// Gets or sets the channel name of the recording.
/// </summary>
public string ChannelName { get; set; }
@@ -58,22 +58,22 @@ namespace MediaBrowser.Model.LiveTv
public string ExternalProgramId { get; set; }
/// <summary>
/// Name of the recording.
/// Gets or sets the name of the recording.
/// </summary>
public string Name { get; set; }
/// <summary>
/// Description of the recording.
/// Gets or sets the description of the recording.
/// </summary>
public string Overview { get; set; }
/// <summary>
/// The start date of the recording, in UTC.
/// Gets or sets the start date of the recording, in UTC.
/// </summary>
public DateTime StartDate { get; set; }
/// <summary>
/// The end date of the recording, in UTC.
/// Gets or sets the end date of the recording, in UTC.
/// </summary>
public DateTime EndDate { get; set; }
@@ -108,7 +108,7 @@ namespace MediaBrowser.Model.LiveTv
public bool IsPrePaddingRequired { get; set; }
/// <summary>
/// If the item does not have any backdrops, this will hold the Id of the Parent that has one.
/// Gets or sets the Id of the Parent that has a backdrop if the item does not have one.
/// </summary>
/// <value>The parent backdrop item id.</value>
public string ParentBackdropItemId { get; set; }

View File

@@ -0,0 +1,58 @@
#nullable disable
#pragma warning disable CS1591
using System;
using MediaBrowser.Model.Dto;
namespace MediaBrowser.Model.LiveTv
{
public class ListingsProviderInfo
{
public ListingsProviderInfo()
{
NewsCategories = new[] { "news", "journalism", "documentary", "current affairs" };
SportsCategories = new[] { "sports", "basketball", "baseball", "football" };
KidsCategories = new[] { "kids", "family", "children", "childrens", "disney" };
MovieCategories = new[] { "movie" };
EnabledTuners = Array.Empty<string>();
EnableAllTuners = true;
ChannelMappings = Array.Empty<NameValuePair>();
}
public string Id { get; set; }
public string Type { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string ListingsId { get; set; }
public string ZipCode { get; set; }
public string Country { get; set; }
public string Path { get; set; }
public string[] EnabledTuners { get; set; }
public bool EnableAllTuners { get; set; }
public string[] NewsCategories { get; set; }
public string[] SportsCategories { get; set; }
public string[] KidsCategories { get; set; }
public string[] MovieCategories { get; set; }
public NameValuePair[] ChannelMappings { get; set; }
public string MoviePrefix { get; set; }
public string PreferredLanguage { get; set; }
public string UserAgent { get; set; }
}
}

View File

@@ -11,6 +11,12 @@ namespace MediaBrowser.Model.LiveTv
/// </summary>
public class LiveTvChannelQuery
{
public LiveTvChannelQuery()
{
EnableUserData = true;
SortBy = Array.Empty<string>();
}
/// <summary>
/// Gets or sets the type of the channel.
/// </summary>
@@ -48,13 +54,13 @@ namespace MediaBrowser.Model.LiveTv
public Guid UserId { get; set; }
/// <summary>
/// Skips over a given number of items within the results. Use for paging.
/// gets or sets the start index. Used for paging.
/// </summary>
/// <value>The start index.</value>
public int? StartIndex { get; set; }
/// <summary>
/// The maximum number of items to return.
/// Gets or sets the maximum number of items to return.
/// </summary>
/// <value>The limit.</value>
public int? Limit { get; set; }
@@ -68,15 +74,15 @@ namespace MediaBrowser.Model.LiveTv
public bool EnableUserData { get; set; }
/// <summary>
/// Used to specific whether to return news or not.
/// Gets or sets a value whether to return news or not.
/// </summary>
/// <remarks>If set to null, all programs will be returned</remarks>
/// <remarks>If set to <c>null</c>, all programs will be returned.</remarks>
public bool? IsNews { get; set; }
/// <summary>
/// Used to specific whether to return movies or not.
/// Gets or sets a value whether to return movies or not.
/// </summary>
/// <remarks>If set to null, all programs will be returned</remarks>
/// <remarks>If set to <c>null</c>, all programs will be returned.</remarks>
public bool? IsMovie { get; set; }
/// <summary>
@@ -96,15 +102,9 @@ namespace MediaBrowser.Model.LiveTv
public string[] SortBy { get; set; }
/// <summary>
/// The sort order to return results with.
/// Gets or sets the sort order to return results with.
/// </summary>
/// <value>The sort order.</value>
public SortOrder? SortOrder { get; set; }
public LiveTvChannelQuery()
{
EnableUserData = true;
SortBy = Array.Empty<string>();
}
}
}

View File

@@ -2,12 +2,19 @@
#pragma warning disable CS1591
using System;
using MediaBrowser.Model.Dto;
namespace MediaBrowser.Model.LiveTv
{
public class LiveTvOptions
{
public LiveTvOptions()
{
TunerHosts = Array.Empty<TunerHostInfo>();
ListingProviders = Array.Empty<ListingsProviderInfo>();
MediaLocationsCreated = Array.Empty<string>();
RecordingPostProcessorArguments = "\"{path}\"";
}
public int? GuideDays { get; set; }
public string RecordingPath { get; set; }
@@ -33,93 +40,5 @@ namespace MediaBrowser.Model.LiveTv
public string RecordingPostProcessor { get; set; }
public string RecordingPostProcessorArguments { get; set; }
public LiveTvOptions()
{
TunerHosts = Array.Empty<TunerHostInfo>();
ListingProviders = Array.Empty<ListingsProviderInfo>();
MediaLocationsCreated = Array.Empty<string>();
RecordingPostProcessorArguments = "\"{path}\"";
}
}
public class TunerHostInfo
{
public string Id { get; set; }
public string Url { get; set; }
public string Type { get; set; }
public string DeviceId { get; set; }
public string FriendlyName { get; set; }
public bool ImportFavoritesOnly { get; set; }
public bool AllowHWTranscoding { get; set; }
public bool EnableStreamLooping { get; set; }
public string Source { get; set; }
public int TunerCount { get; set; }
public string UserAgent { get; set; }
public TunerHostInfo()
{
AllowHWTranscoding = true;
}
}
public class ListingsProviderInfo
{
public string Id { get; set; }
public string Type { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string ListingsId { get; set; }
public string ZipCode { get; set; }
public string Country { get; set; }
public string Path { get; set; }
public string[] EnabledTuners { get; set; }
public bool EnableAllTuners { get; set; }
public string[] NewsCategories { get; set; }
public string[] SportsCategories { get; set; }
public string[] KidsCategories { get; set; }
public string[] MovieCategories { get; set; }
public NameValuePair[] ChannelMappings { get; set; }
public string MoviePrefix { get; set; }
public string PreferredLanguage { get; set; }
public string UserAgent { get; set; }
public ListingsProviderInfo()
{
NewsCategories = new[] { "news", "journalism", "documentary", "current affairs" };
SportsCategories = new[] { "sports", "basketball", "baseball", "football" };
KidsCategories = new[] { "kids", "family", "children", "childrens", "disney" };
MovieCategories = new[] { "movie" };
EnabledTuners = Array.Empty<string>();
EnableAllTuners = true;
ChannelMappings = Array.Empty<NameValuePair>();
}
}
}

View File

@@ -10,6 +10,11 @@ namespace MediaBrowser.Model.LiveTv
/// </summary>
public class LiveTvServiceInfo
{
public LiveTvServiceInfo()
{
Tuners = Array.Empty<string>();
}
/// <summary>
/// Gets or sets the name.
/// </summary>
@@ -53,10 +58,5 @@ namespace MediaBrowser.Model.LiveTv
public bool IsVisible { get; set; }
public string[] Tuners { get; set; }
public LiveTvServiceInfo()
{
Tuners = Array.Empty<string>();
}
}
}

View File

@@ -12,6 +12,11 @@ namespace MediaBrowser.Model.LiveTv
/// </summary>
public class RecordingQuery
{
public RecordingQuery()
{
EnableTotalRecordCount = true;
}
/// <summary>
/// Gets or sets the channel identifier.
/// </summary>
@@ -31,13 +36,13 @@ namespace MediaBrowser.Model.LiveTv
public string Id { get; set; }
/// <summary>
/// Skips over a given number of items within the results. Use for paging.
/// Gets or sets the start index. Use for paging.
/// </summary>
/// <value>The start index.</value>
public int? StartIndex { get; set; }
/// <summary>
/// The maximum number of items to return.
/// Gets or sets the maximum number of items to return.
/// </summary>
/// <value>The limit.</value>
public int? Limit { get; set; }
@@ -61,7 +66,7 @@ namespace MediaBrowser.Model.LiveTv
public string SeriesTimerId { get; set; }
/// <summary>
/// Fields to return within the items, in addition to basic information.
/// Gets or sets the fields to return within the items, in addition to basic information.
/// </summary>
/// <value>The fields.</value>
public ItemFields[] Fields { get; set; }
@@ -85,10 +90,5 @@ namespace MediaBrowser.Model.LiveTv
public ImageType[] EnableImageTypes { get; set; }
public bool EnableTotalRecordCount { get; set; }
public RecordingQuery()
{
EnableTotalRecordCount = true;
}
}
}

View File

@@ -7,6 +7,14 @@ using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.LiveTv
{
public enum KeepUntil
{
UntilDeleted,
UntilSpaceNeeded,
UntilWatched,
UntilDate
}
/// <summary>
/// Class SeriesTimerInfoDto.
/// </summary>
@@ -83,12 +91,4 @@ namespace MediaBrowser.Model.LiveTv
/// <value>The parent primary image tag.</value>
public string ParentPrimaryImageTag { get; set; }
}
public enum KeepUntil
{
UntilDeleted,
UntilSpaceNeeded,
UntilWatched,
UntilDate
}
}

View File

@@ -0,0 +1,38 @@
#nullable disable
#pragma warning disable CS1591
using System;
using MediaBrowser.Model.Dto;
namespace MediaBrowser.Model.LiveTv
{
public class TunerHostInfo
{
public TunerHostInfo()
{
AllowHWTranscoding = true;
}
public string Id { get; set; }
public string Url { get; set; }
public string Type { get; set; }
public string DeviceId { get; set; }
public string FriendlyName { get; set; }
public bool ImportFavoritesOnly { get; set; }
public bool AllowHWTranscoding { get; set; }
public bool EnableStreamLooping { get; set; }
public string Source { get; set; }
public int TunerCount { get; set; }
public string UserAgent { get; set; }
}
}