From 340a2c651276d911285a6ff09944c5eba2384a51 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Thu, 27 Dec 2018 22:43:48 +0100 Subject: Post GPL cleanup --- MediaBrowser.Model/Channels/ChannelFeatures.cs | 9 +- MediaBrowser.Model/Configuration/LibraryOptions.cs | 21 ++-- .../Configuration/MetadataOptions.cs | 21 ++-- .../Configuration/MetadataPluginSummary.cs | 8 +- .../Configuration/ServerConfiguration.cs | 49 ++++----- .../Configuration/UserConfiguration.cs | 8 +- .../Connect/ConnectAuthenticationExchangeResult.cs | 17 --- .../Connect/ConnectAuthenticationResult.cs | 17 --- MediaBrowser.Model/Connect/ConnectAuthorization.cs | 4 +- .../Connect/ConnectAuthorizationRequest.cs | 19 ---- MediaBrowser.Model/Devices/DeviceInfo.cs | 16 --- MediaBrowser.Model/Devices/DeviceQuery.cs | 5 - MediaBrowser.Model/Devices/DevicesOptions.cs | 5 +- MediaBrowser.Model/Dlna/ContainerProfile.cs | 8 +- MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs | 3 +- MediaBrowser.Model/Dlna/ResolutionNormalizer.cs | 37 ++++--- MediaBrowser.Model/Dlna/StreamInfo.cs | 8 +- MediaBrowser.Model/Dlna/SubtitleProfile.cs | 4 +- MediaBrowser.Model/Dto/BaseItemDto.cs | 35 ------ MediaBrowser.Model/Dto/ChapterInfoDto.cs | 38 ------- MediaBrowser.Model/Dto/GameSystemSummary.cs | 5 +- MediaBrowser.Model/Dto/MediaSourceInfo.cs | 9 +- MediaBrowser.Model/Dto/MetadataEditorInfo.cs | 12 +-- MediaBrowser.Model/Dto/UserDto.cs | 1 - MediaBrowser.Model/Entities/LibraryUpdateInfo.cs | 12 +-- MediaBrowser.Model/Entities/VirtualFolderInfo.cs | 2 +- MediaBrowser.Model/Globalization/CultureDto.cs | 2 +- MediaBrowser.Model/Library/UserViewQuery.cs | 2 +- MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs | 2 +- MediaBrowser.Model/LiveTv/LiveTvInfo.cs | 6 +- MediaBrowser.Model/LiveTv/LiveTvOptions.cs | 18 ++-- MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs | 2 +- MediaBrowser.Model/LiveTv/ProgramQuery.cs | 117 --------------------- .../LiveTv/RecommendedProgramQuery.cs | 73 ------------- MediaBrowser.Model/MediaInfo/MediaInfo.cs | 16 ++- .../MediaInfo/PlaybackInfoRequest.cs | 1 - .../Notifications/NotificationOption.cs | 20 +--- .../Notifications/NotificationRequest.cs | 3 - .../Notifications/NotificationServiceInfo.cs | 8 -- .../Notifications/NotificationTypeInfo.cs | 16 +-- .../Playlists/PlaylistCreationRequest.cs | 5 +- MediaBrowser.Model/Providers/SubtitleOptions.cs | 4 +- MediaBrowser.Model/Querying/QueryFilters.cs | 12 +-- MediaBrowser.Model/Search/SearchQuery.cs | 6 +- MediaBrowser.Model/Session/ClientCapabilities.cs | 6 +- MediaBrowser.Model/Session/SessionInfoDto.cs | 117 --------------------- MediaBrowser.Model/Sync/SyncJob.cs | 4 +- MediaBrowser.Model/Users/UserPolicy.cs | 16 +-- 48 files changed, 149 insertions(+), 680 deletions(-) delete mode 100644 MediaBrowser.Model/Connect/ConnectAuthenticationExchangeResult.cs delete mode 100644 MediaBrowser.Model/Connect/ConnectAuthenticationResult.cs delete mode 100644 MediaBrowser.Model/Connect/ConnectAuthorizationRequest.cs delete mode 100644 MediaBrowser.Model/Dto/ChapterInfoDto.cs delete mode 100644 MediaBrowser.Model/LiveTv/ProgramQuery.cs delete mode 100644 MediaBrowser.Model/LiveTv/RecommendedProgramQuery.cs delete mode 100644 MediaBrowser.Model/Notifications/NotificationServiceInfo.cs delete mode 100644 MediaBrowser.Model/Session/SessionInfoDto.cs (limited to 'MediaBrowser.Model') diff --git a/MediaBrowser.Model/Channels/ChannelFeatures.cs b/MediaBrowser.Model/Channels/ChannelFeatures.cs index 39b40cabc4..d4caf499ba 100644 --- a/MediaBrowser.Model/Channels/ChannelFeatures.cs +++ b/MediaBrowser.Model/Channels/ChannelFeatures.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System; namespace MediaBrowser.Model.Channels { @@ -76,10 +76,9 @@ namespace MediaBrowser.Model.Channels public ChannelFeatures() { - MediaTypes = new ChannelMediaType[] { }; - ContentTypes = new ChannelMediaContentType[] { }; - - DefaultSortFields = new ChannelItemSortField[] { }; + MediaTypes = Array.Empty(); + ContentTypes = Array.Empty(); + DefaultSortFields = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs index a271d43afa..cc70cc8884 100644 --- a/MediaBrowser.Model/Configuration/LibraryOptions.cs +++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs @@ -6,7 +6,6 @@ namespace MediaBrowser.Model.Configuration { public class LibraryOptions { - public bool EnableArchiveMediaFiles { get; set; } public bool EnablePhotos { get; set; } public bool EnableRealtimeMonitor { get; set; } public bool EnableChapterImageExtraction { get; set; } @@ -65,10 +64,10 @@ namespace MediaBrowser.Model.Configuration public LibraryOptions() { - TypeOptions = new TypeOptions[] { }; - DisabledSubtitleFetchers = new string[] { }; - SubtitleFetcherOrder = new string[] { }; - DisabledLocalMetadataReaders = new string[] { }; + TypeOptions = Array.Empty(); + DisabledSubtitleFetchers = Array.Empty(); + SubtitleFetcherOrder = Array.Empty(); + DisabledLocalMetadataReaders = Array.Empty(); SkipSubtitlesIfAudioTrackMatches = true; RequirePerfectSubtitleMatch = true; @@ -76,7 +75,7 @@ namespace MediaBrowser.Model.Configuration EnablePhotos = true; SaveSubtitlesWithMedia = true; EnableRealtimeMonitor = true; - PathInfos = new MediaPathInfo[] { }; + PathInfos = Array.Empty(); EnableInternetProviders = true; EnableAutomaticSeriesGrouping = true; SeasonZeroDisplayName = "Specials"; @@ -141,11 +140,11 @@ namespace MediaBrowser.Model.Configuration public TypeOptions() { - MetadataFetchers = new string[] { }; - MetadataFetcherOrder = new string[] { }; - ImageFetchers = new string[] { }; - ImageFetcherOrder = new string[] { }; - ImageOptions = new ImageOption[] { }; + MetadataFetchers = Array.Empty(); + MetadataFetcherOrder = Array.Empty(); + ImageFetchers = Array.Empty(); + ImageFetcherOrder = Array.Empty(); + ImageOptions = Array.Empty(); } public static Dictionary DefaultImageOptions = new Dictionary diff --git a/MediaBrowser.Model/Configuration/MetadataOptions.cs b/MediaBrowser.Model/Configuration/MetadataOptions.cs index 26cfee0851..dde2bd090e 100644 --- a/MediaBrowser.Model/Configuration/MetadataOptions.cs +++ b/MediaBrowser.Model/Configuration/MetadataOptions.cs @@ -1,5 +1,4 @@ -using MediaBrowser.Model.Extensions; -using System; +using System; namespace MediaBrowser.Model.Configuration { @@ -21,18 +20,12 @@ namespace MediaBrowser.Model.Configuration public MetadataOptions() { - DisabledMetadataSavers = new string[] { }; - LocalMetadataReaderOrder = new string[] { }; - - DisabledMetadataFetchers = new string[] { }; - MetadataFetcherOrder = new string[] { }; - DisabledImageFetchers = new string[] { }; - ImageFetcherOrder = new string[] { }; - } - - public bool IsMetadataSaverEnabled(string name) - { - return !ListHelper.ContainsIgnoreCase(DisabledMetadataSavers, name); + DisabledMetadataSavers = Array.Empty(); + LocalMetadataReaderOrder = Array.Empty(); + DisabledMetadataFetchers = Array.Empty(); + MetadataFetcherOrder = Array.Empty(); + DisabledImageFetchers = Array.Empty(); + ImageFetcherOrder = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs b/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs index 80142cf434..0bd20f8379 100644 --- a/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs +++ b/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System; using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Configuration @@ -25,8 +25,8 @@ namespace MediaBrowser.Model.Configuration public MetadataPluginSummary() { - SupportedImageTypes = new ImageType[] { }; - Plugins = new MetadataPlugin[] { }; + SupportedImageTypes = Array.Empty(); + Plugins = Array.Empty(); } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 09b7835876..565d5f74b6 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -173,8 +173,6 @@ namespace MediaBrowser.Model.Configuration public int RemoteClientBitrateLimit { get; set; } - public int SchemaVersion { get; set; } - public bool EnableFolderView { get; set; } public bool EnableGroupingIntoCollections { get; set; } public bool DisplaySpecialsWithinSeasons { get; set; } @@ -201,13 +199,13 @@ namespace MediaBrowser.Model.Configuration /// public ServerConfiguration() { - UninstalledPlugins = new string[] { }; - RemoteIPFilter = new string[] { }; - LocalNetworkSubnets = new string[] { }; - LocalNetworkAddresses = new string[] { }; - CodecsUsed = new string[] { }; + UninstalledPlugins = Array.Empty(); + RemoteIPFilter = Array.Empty(); + LocalNetworkSubnets = Array.Empty(); + LocalNetworkAddresses = Array.Empty(); + CodecsUsed = Array.Empty(); ImageExtractionTimeoutMs = 0; - PathSubstitutions = new PathSubstitution[] { }; + PathSubstitutions = Array.Empty(); EnableSimpleArtistDetection = true; DisplaySpecialsWithinSeasons = true; @@ -235,7 +233,7 @@ namespace MediaBrowser.Model.Configuration LibraryMonitorDelay = 60; - ContentTypes = new NameValuePair[] { }; + ContentTypes = Array.Empty(); PreferredMetadataLanguage = "en"; MetadataCountryCode = "US"; @@ -248,56 +246,51 @@ namespace MediaBrowser.Model.Configuration MetadataOptions = new[] { - new MetadataOptions {ItemType = "Book"}, - - new MetadataOptions + new MetadataOptions() + { + ItemType = "Book" + }, + new MetadataOptions() { ItemType = "Movie" }, - new MetadataOptions { ItemType = "MusicVideo", - DisabledMetadataFetchers = new []{ "The Open Movie Database" }, - DisabledImageFetchers = new []{ "The Open Movie Database", "FanArt" } + DisabledMetadataFetchers = new [] { "The Open Movie Database" }, + DisabledImageFetchers = new [] { "The Open Movie Database", "FanArt" } }, - new MetadataOptions { ItemType = "Series", - DisabledMetadataFetchers = new []{ "TheMovieDb" }, - DisabledImageFetchers = new []{ "TheMovieDb" } + DisabledMetadataFetchers = new [] { "TheMovieDb" }, + DisabledImageFetchers = new [] { "TheMovieDb" } }, - new MetadataOptions { ItemType = "MusicAlbum", - DisabledMetadataFetchers = new []{ "TheAudioDB" } + DisabledMetadataFetchers = new [] { "TheAudioDB" } }, - new MetadataOptions { ItemType = "MusicArtist", - DisabledMetadataFetchers = new []{ "TheAudioDB" } + DisabledMetadataFetchers = new [] { "TheAudioDB" } }, - new MetadataOptions { ItemType = "BoxSet" }, - new MetadataOptions { ItemType = "Season", - DisabledMetadataFetchers = new []{ "TheMovieDb" }, + DisabledMetadataFetchers = new [] { "TheMovieDb" }, DisabledImageFetchers = new [] { "FanArt" } }, - new MetadataOptions { ItemType = "Episode", - DisabledMetadataFetchers = new []{ "The Open Movie Database", "TheMovieDb" }, - DisabledImageFetchers = new []{ "The Open Movie Database", "TheMovieDb" } + DisabledMetadataFetchers = new [] { "The Open Movie Database", "TheMovieDb" }, + DisabledImageFetchers = new [] { "The Open Movie Database", "TheMovieDb" } } }; } diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs index 34b0be0954..39b9561381 100644 --- a/MediaBrowser.Model/Configuration/UserConfiguration.cs +++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs @@ -57,10 +57,10 @@ namespace MediaBrowser.Model.Configuration HidePlayedInLatest = true; PlayDefaultAudioTrack = true; - LatestItemsExcludes = new string[] {}; - OrderedViews = new string[] {}; - MyMediaExcludes = new string[] {}; - GroupedFolders = new string[] {}; + LatestItemsExcludes = Array.Empty(); + OrderedViews = Array.Empty(); + MyMediaExcludes = Array.Empty(); + GroupedFolders = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Connect/ConnectAuthenticationExchangeResult.cs b/MediaBrowser.Model/Connect/ConnectAuthenticationExchangeResult.cs deleted file mode 100644 index c60224045f..0000000000 --- a/MediaBrowser.Model/Connect/ConnectAuthenticationExchangeResult.cs +++ /dev/null @@ -1,17 +0,0 @@ - -namespace MediaBrowser.Model.Connect -{ - public class ConnectAuthenticationExchangeResult - { - /// - /// Gets or sets the local user identifier. - /// - /// The local user identifier. - public string LocalUserId { get; set; } - /// - /// Gets or sets the access token. - /// - /// The access token. - public string AccessToken { get; set; } - } -} diff --git a/MediaBrowser.Model/Connect/ConnectAuthenticationResult.cs b/MediaBrowser.Model/Connect/ConnectAuthenticationResult.cs deleted file mode 100644 index 0df035e575..0000000000 --- a/MediaBrowser.Model/Connect/ConnectAuthenticationResult.cs +++ /dev/null @@ -1,17 +0,0 @@ - -namespace MediaBrowser.Model.Connect -{ - public class ConnectAuthenticationResult - { - /// - /// Gets or sets the user. - /// - /// The user. - public ConnectUser User { get; set; } - /// - /// Gets or sets the access token. - /// - /// The access token. - public string AccessToken { get; set; } - } -} diff --git a/MediaBrowser.Model/Connect/ConnectAuthorization.cs b/MediaBrowser.Model/Connect/ConnectAuthorization.cs index 84dbf5c363..a949612ab5 100644 --- a/MediaBrowser.Model/Connect/ConnectAuthorization.cs +++ b/MediaBrowser.Model/Connect/ConnectAuthorization.cs @@ -14,8 +14,8 @@ namespace MediaBrowser.Model.Connect public ConnectAuthorization() { - EnabledLibraries = new string[] {}; - EnabledChannels = new string[] {}; + EnabledLibraries = Array.Empty(); + EnabledChannels = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Connect/ConnectAuthorizationRequest.cs b/MediaBrowser.Model/Connect/ConnectAuthorizationRequest.cs deleted file mode 100644 index ba4e9f5cff..0000000000 --- a/MediaBrowser.Model/Connect/ConnectAuthorizationRequest.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; - -namespace MediaBrowser.Model.Connect -{ - public class ConnectAuthorizationRequest - { - public string SendingUserId { get; set; } - public string ConnectUserName { get; set; } - public string[] EnabledLibraries { get; set; } - public bool EnableLiveTv { get; set; } - public string[] EnabledChannels { get; set; } - - public ConnectAuthorizationRequest() - { - EnabledLibraries = new string[] {}; - EnabledChannels = new string[] {}; - } - } -} diff --git a/MediaBrowser.Model/Devices/DeviceInfo.cs b/MediaBrowser.Model/Devices/DeviceInfo.cs index 590dc5eb32..a588ce0295 100644 --- a/MediaBrowser.Model/Devices/DeviceInfo.cs +++ b/MediaBrowser.Model/Devices/DeviceInfo.cs @@ -5,22 +5,6 @@ namespace MediaBrowser.Model.Devices { public class DeviceInfo { - /// - /// Gets or sets the name of the reported. - /// - /// The name of the reported. - public string ReportedName { get; set; } - /// - /// Gets or sets the name of the custom. - /// - /// The name of the custom. - public string CustomName { get; set; } - /// - /// Gets or sets the camera upload path. - /// - /// The camera upload path. - public string CameraUploadPath { get; set; } - public string Name { get; set; } /// diff --git a/MediaBrowser.Model/Devices/DeviceQuery.cs b/MediaBrowser.Model/Devices/DeviceQuery.cs index fa2e11d4d8..2838239e40 100644 --- a/MediaBrowser.Model/Devices/DeviceQuery.cs +++ b/MediaBrowser.Model/Devices/DeviceQuery.cs @@ -5,11 +5,6 @@ namespace MediaBrowser.Model.Devices { public class DeviceQuery { - /// - /// Gets or sets a value indicating whether [supports unique identifier]. - /// - /// null if [supports unique identifier] contains no value, true if [supports unique identifier]; otherwise, false. - public bool? SupportsPersistentIdentifier { get; set; } /// /// Gets or sets a value indicating whether [supports synchronize]. /// diff --git a/MediaBrowser.Model/Devices/DevicesOptions.cs b/MediaBrowser.Model/Devices/DevicesOptions.cs index 5bcdd1a82a..8e478d005d 100644 --- a/MediaBrowser.Model/Devices/DevicesOptions.cs +++ b/MediaBrowser.Model/Devices/DevicesOptions.cs @@ -10,15 +10,12 @@ namespace MediaBrowser.Model.Devices public DevicesOptions() { - EnabledCameraUploadDevices = new string[] {}; + EnabledCameraUploadDevices = Array.Empty(); } } public class DeviceOptions { - public string[] EnabledCameraUploadDevices { get; set; } - public string CameraUploadPath { get; set; } - public bool EnableCameraUploadSubfolders { get; set; } public string CustomName { get; set; } } } diff --git a/MediaBrowser.Model/Dlna/ContainerProfile.cs b/MediaBrowser.Model/Dlna/ContainerProfile.cs index 3fb0682b03..ccad4cead4 100644 --- a/MediaBrowser.Model/Dlna/ContainerProfile.cs +++ b/MediaBrowser.Model/Dlna/ContainerProfile.cs @@ -1,7 +1,5 @@ using System; -using System.Collections.Generic; using System.Xml.Serialization; -using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Extensions; namespace MediaBrowser.Model.Dlna @@ -17,7 +15,7 @@ namespace MediaBrowser.Model.Dlna public ContainerProfile() { - Conditions = new ProfileCondition[] { }; + Conditions = Array.Empty(); } public string[] GetContainers() @@ -25,13 +23,11 @@ namespace MediaBrowser.Model.Dlna return SplitValue(Container); } - private static readonly string[] EmptyStringArray = Array.Empty(); - public static string[] SplitValue(string value) { if (string.IsNullOrEmpty(value)) { - return EmptyStringArray; + return Array.Empty(); } return value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); diff --git a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs index 966c4a8ce2..88d7573e60 100644 --- a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs +++ b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs @@ -1,7 +1,6 @@ using MediaBrowser.Model.MediaInfo; using System; using System.Collections.Generic; -using System.Linq; namespace MediaBrowser.Model.Dlna { @@ -28,7 +27,7 @@ namespace MediaBrowser.Model.Dlna DlnaFlags flagValue = DlnaFlags.BackgroundTransferMode | DlnaFlags.InteractiveTransferMode | DlnaFlags.DlnaV15; - + string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}", DlnaMaps.FlagsToString(flagValue)); diff --git a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs index 4fdf4972f6..4cde26a03c 100644 --- a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs +++ b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs @@ -1,13 +1,12 @@ using System; -using System.Collections.Generic; using MediaBrowser.Model.Extensions; namespace MediaBrowser.Model.Dlna { public class ResolutionNormalizer { - private static readonly ResolutionConfiguration[] Configurations = - new [] + private static readonly ResolutionConfiguration[] Configurations = + new[] { new ResolutionConfiguration(426, 320000), new ResolutionConfiguration(640, 400000), @@ -20,24 +19,24 @@ namespace MediaBrowser.Model.Dlna public static ResolutionOptions Normalize(int? inputBitrate, int? unused1, int? unused2, - int outputBitrate, - string inputCodec, + int outputBitrate, + string inputCodec, string outputCodec, int? maxWidth, int? maxHeight) { - // If the bitrate isn't changing, then don't downlscale the resolution - if (inputBitrate.HasValue && outputBitrate >= inputBitrate.Value) - { - if (maxWidth.HasValue || maxHeight.HasValue) - { - return new ResolutionOptions - { - MaxWidth = maxWidth, - MaxHeight = maxHeight - }; - } - } + // If the bitrate isn't changing, then don't downlscale the resolution + if (inputBitrate.HasValue && outputBitrate >= inputBitrate.Value) + { + if (maxWidth.HasValue || maxHeight.HasValue) + { + return new ResolutionOptions + { + MaxWidth = maxWidth, + MaxHeight = maxHeight + }; + } + } var resolutionConfig = GetResolutionConfiguration(outputBitrate); if (resolutionConfig != null) @@ -90,8 +89,8 @@ namespace MediaBrowser.Model.Dlna { var inputScaleFactor = GetVideoBitrateScaleFactor(inputVideoCodec); var outputScaleFactor = GetVideoBitrateScaleFactor(outputVideoCodec); - var scaleFactor = outputScaleFactor/inputScaleFactor; - var newBitrate = scaleFactor*bitrate; + var scaleFactor = outputScaleFactor / inputScaleFactor; + var newBitrate = scaleFactor * bitrate; return Convert.ToInt32(newBitrate); } diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index c927cd31cc..ba0ac04866 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -18,10 +18,10 @@ namespace MediaBrowser.Model.Dlna { public StreamInfo() { - AudioCodecs = new string[] { }; - VideoCodecs = new string[] { }; - SubtitleCodecs = new string[] { }; - TranscodeReasons = new TranscodeReason[] { }; + AudioCodecs = Array.Empty(); + VideoCodecs = Array.Empty(); + SubtitleCodecs = Array.Empty(); + TranscodeReasons = Array.Empty(); StreamOptions = new Dictionary(StringComparer.OrdinalIgnoreCase); } diff --git a/MediaBrowser.Model/Dlna/SubtitleProfile.cs b/MediaBrowser.Model/Dlna/SubtitleProfile.cs index a7e61e69a5..f85ba4a7a3 100644 --- a/MediaBrowser.Model/Dlna/SubtitleProfile.cs +++ b/MediaBrowser.Model/Dlna/SubtitleProfile.cs @@ -1,7 +1,5 @@ using MediaBrowser.Model.Extensions; -using System.Collections.Generic; using System.Xml.Serialization; -using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.Dlna { @@ -43,4 +41,4 @@ namespace MediaBrowser.Model.Dlna return languages.Length == 0 || ListHelper.ContainsIgnoreCase(languages, subLanguage); } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 3ddbc4150a..746d38679a 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -4,10 +4,8 @@ using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Library; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Providers; -using MediaBrowser.Model.Sync; using System; using System.Collections.Generic; -using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.Dto { @@ -67,7 +65,6 @@ namespace MediaBrowser.Model.Dto public int? AirsBeforeSeasonNumber { get; set; } public int? AirsAfterSeasonNumber { get; set; } public int? AirsBeforeEpisodeNumber { get; set; } - public bool? DisplaySpecialsWithSeasons { get; set; } public bool? CanDelete { get; set; } public bool? CanDownload { get; set; } @@ -156,7 +153,6 @@ namespace MediaBrowser.Model.Dto /// The channel identifier. public Guid ChannelId { get; set; } public string ChannelName { get; set; } - public string ServiceName { get; set; } /// /// Gets or sets the overview. @@ -479,26 +475,6 @@ namespace MediaBrowser.Model.Dto public int? PartCount { get; set; } public int? MediaSourceCount { get; set; } - /// - /// Determines whether the specified type is type. - /// - /// The type. - /// true if the specified type is type; otherwise, false. - public bool IsType(Type type) - { - return IsType(type.Name); - } - - /// - /// Determines whether the specified type is type. - /// - /// The type. - /// true if the specified type is type; otherwise, false. - public bool IsType(string type) - { - return StringHelper.EqualsIgnoreCase(Type, type); - } - /// /// Gets or sets the image tags. /// @@ -601,12 +577,6 @@ namespace MediaBrowser.Model.Dto /// The end date. public DateTime? EndDate { get; set; } - /// - /// Gets or sets the home page URL. - /// - /// The home page URL. - public string HomePageUrl { get; set; } - /// /// Gets or sets the locked fields. /// @@ -677,11 +647,6 @@ namespace MediaBrowser.Model.Dto public double? Altitude { get; set; } public int? IsoSpeedRating { get; set; } - /// - /// Used by RecordingGroup - /// - public int? RecordingCount { get; set; } - /// /// Gets or sets the series timer identifier. /// diff --git a/MediaBrowser.Model/Dto/ChapterInfoDto.cs b/MediaBrowser.Model/Dto/ChapterInfoDto.cs deleted file mode 100644 index b68b55e70c..0000000000 --- a/MediaBrowser.Model/Dto/ChapterInfoDto.cs +++ /dev/null @@ -1,38 +0,0 @@ -using MediaBrowser.Model.Serialization; - -namespace MediaBrowser.Model.Dto -{ - /// - /// Class ChapterInfo - /// - public class ChapterInfoDto - { - /// - /// Gets or sets the start position ticks. - /// - /// The start position ticks. - public long StartPositionTicks { get; set; } - - /// - /// Gets or sets the name. - /// - /// The name. - public string Name { get; set; } - - /// - /// Gets or sets the image tag. - /// - /// The image tag. - public string ImageTag { get; set; } - - /// - /// Gets a value indicating whether this instance has image. - /// - /// true if this instance has image; otherwise, false. - [IgnoreDataMember] - public bool HasImage - { - get { return ImageTag != null; } - } - } -} diff --git a/MediaBrowser.Model/Dto/GameSystemSummary.cs b/MediaBrowser.Model/Dto/GameSystemSummary.cs index 252868b66c..0f21533a0d 100644 --- a/MediaBrowser.Model/Dto/GameSystemSummary.cs +++ b/MediaBrowser.Model/Dto/GameSystemSummary.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using System; +using System; namespace MediaBrowser.Model.Dto { @@ -43,7 +42,7 @@ namespace MediaBrowser.Model.Dto /// public GameSystemSummary() { - GameFileExtensions = new string[] {}; + GameFileExtensions = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index d1d068fb6c..be9c2dff32 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -1,5 +1,4 @@ using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Extensions; using MediaBrowser.Model.MediaInfo; using System.Collections.Generic; using MediaBrowser.Model.Serialization; @@ -73,7 +72,7 @@ namespace MediaBrowser.Model.Dto public MediaSourceInfo() { - Formats = new string[] { }; + Formats = Array.Empty(); MediaStreams = new List(); RequiredHttpHeaders = new Dictionary(); SupportsTranscoding = true; @@ -115,12 +114,6 @@ namespace MediaBrowser.Model.Dto public int? DefaultAudioStreamIndex { get; set; } public int? DefaultSubtitleStreamIndex { get; set; } - [IgnoreDataMember] - public MediaStream DefaultAudioStream - { - get { return GetDefaultAudioStream(DefaultAudioStreamIndex); } - } - public MediaStream GetDefaultAudioStream(int? defaultIndex) { if (defaultIndex.HasValue) diff --git a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs index aa8b33c817..b7093da718 100644 --- a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs +++ b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs @@ -1,7 +1,7 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Providers; -using System.Collections.Generic; +using System; namespace MediaBrowser.Model.Dto { @@ -17,11 +17,11 @@ namespace MediaBrowser.Model.Dto public MetadataEditorInfo() { - ParentalRatingOptions = new ParentalRating[] { }; - Countries = new CountryInfo[] { }; - Cultures = new CultureDto[] { }; - ExternalIdInfos = new ExternalIdInfo[] { }; - ContentTypeOptions = new NameValuePair[] { }; + ParentalRatingOptions = Array.Empty(); + Countries = Array.Empty(); + Cultures = Array.Empty(); + ExternalIdInfos = Array.Empty(); + ContentTypeOptions = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Dto/UserDto.cs b/MediaBrowser.Model/Dto/UserDto.cs index f42c495ad8..8d7679fdb5 100644 --- a/MediaBrowser.Model/Dto/UserDto.cs +++ b/MediaBrowser.Model/Dto/UserDto.cs @@ -2,7 +2,6 @@ using MediaBrowser.Model.Connect; using MediaBrowser.Model.Users; using System; -using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs b/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs index dfab9add23..2ae7bead21 100644 --- a/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs +++ b/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs @@ -51,12 +51,12 @@ namespace MediaBrowser.Model.Entities /// public LibraryUpdateInfo() { - FoldersAddedTo = new string[] { }; - FoldersRemovedFrom = new string[] { }; - ItemsAdded = new string[] { }; - ItemsRemoved = new string[] { }; - ItemsUpdated = new string[] { }; - CollectionFolders = new string[] { }; + FoldersAddedTo = Array.Empty(); + FoldersRemovedFrom = Array.Empty(); + ItemsAdded = Array.Empty(); + ItemsRemoved = Array.Empty(); + ItemsUpdated = Array.Empty(); + CollectionFolders = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs index 68f713295d..c8374f6203 100644 --- a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs +++ b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs @@ -34,7 +34,7 @@ namespace MediaBrowser.Model.Entities /// public VirtualFolderInfo() { - Locations = new string[] {}; + Locations = Array.Empty(); } /// diff --git a/MediaBrowser.Model/Globalization/CultureDto.cs b/MediaBrowser.Model/Globalization/CultureDto.cs index 6d79aaebb1..c0eb8b2ad0 100644 --- a/MediaBrowser.Model/Globalization/CultureDto.cs +++ b/MediaBrowser.Model/Globalization/CultureDto.cs @@ -46,7 +46,7 @@ namespace MediaBrowser.Model.Globalization public CultureDto() { - ThreeLetterISOLanguageNames = new string[] {}; + ThreeLetterISOLanguageNames = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Library/UserViewQuery.cs b/MediaBrowser.Model/Library/UserViewQuery.cs index 8b60cfd983..9801b8e8ee 100644 --- a/MediaBrowser.Model/Library/UserViewQuery.cs +++ b/MediaBrowser.Model/Library/UserViewQuery.cs @@ -27,7 +27,7 @@ namespace MediaBrowser.Model.Library public UserViewQuery() { IncludeExternalContent = true; - PresetViews = new string[] {}; + PresetViews = Array.Empty(); } } } diff --git a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs index e3abd59748..5fe77d41ec 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs @@ -98,7 +98,7 @@ namespace MediaBrowser.Model.LiveTv public LiveTvChannelQuery() { EnableUserData = true; - SortBy = new string[] {}; + SortBy = Array.Empty(); } } } diff --git a/MediaBrowser.Model/LiveTv/LiveTvInfo.cs b/MediaBrowser.Model/LiveTv/LiveTvInfo.cs index 331b1101b0..68281d79bf 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvInfo.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvInfo.cs @@ -25,8 +25,8 @@ namespace MediaBrowser.Model.LiveTv public LiveTvInfo() { - Services = new LiveTvServiceInfo[] { }; - EnabledUsers = new string[] {}; + Services = Array.Empty(); + EnabledUsers = Array.Empty(); } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs index eb4f20f9e8..6a688c7b49 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs @@ -25,9 +25,9 @@ namespace MediaBrowser.Model.LiveTv public LiveTvOptions() { - TunerHosts = new TunerHostInfo[] { }; - ListingProviders = new ListingsProviderInfo[] { }; - MediaLocationsCreated = new string[] { }; + TunerHosts = Array.Empty(); + ListingProviders = Array.Empty(); + MediaLocationsCreated = Array.Empty(); RecordingPostProcessorArguments = "\"{path}\""; } } @@ -76,13 +76,13 @@ namespace MediaBrowser.Model.LiveTv public ListingsProviderInfo() { - NewsCategories = new string[] { "news", "journalism", "documentary", "current affairs" }; - SportsCategories = new string[] { "sports", "basketball", "baseball", "football" }; - KidsCategories = new string[] { "kids", "family", "children", "childrens", "disney" }; - MovieCategories = new string[] { "movie" }; - EnabledTuners = new string[] { }; + 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(); EnableAllTuners = true; - ChannelMappings = new NameValuePair[] {}; + ChannelMappings = Array.Empty(); } } } diff --git a/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs b/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs index 23eedfc889..4b7ee971c0 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs @@ -52,7 +52,7 @@ namespace MediaBrowser.Model.LiveTv public LiveTvServiceInfo() { - Tuners = new string[] { }; + Tuners = Array.Empty(); } } } diff --git a/MediaBrowser.Model/LiveTv/ProgramQuery.cs b/MediaBrowser.Model/LiveTv/ProgramQuery.cs deleted file mode 100644 index 89160948c9..0000000000 --- a/MediaBrowser.Model/LiveTv/ProgramQuery.cs +++ /dev/null @@ -1,117 +0,0 @@ -using MediaBrowser.Model.Entities; -using System; -using MediaBrowser.Model.Querying; - -namespace MediaBrowser.Model.LiveTv -{ - /// - /// Class ProgramQuery. - /// - public class ProgramQuery - { - public ProgramQuery() - { - ChannelIds = new Guid[] { }; - OrderBy = new Tuple[] { }; - Genres = new string[] {}; - GenreIds = new Guid[] { }; - EnableTotalRecordCount = true; - EnableUserData = true; - } - - public bool EnableTotalRecordCount { get; set; } - public bool EnableUserData { get; set; } - - /// - /// Fields to return within the items, in addition to basic information - /// - /// The fields. - public ItemFields[] Fields { get; set; } - public bool? EnableImages { get; set; } - public int? ImageTypeLimit { get; set; } - public ImageType[] EnableImageTypes { get; set; } - - /// - /// Gets or sets the channel ids. - /// - /// The channel ids. - public Guid[] ChannelIds { get; set; } - - /// - /// Gets or sets the user identifier. - /// - /// The user identifier. - public string UserId { get; set; } - public string SeriesTimerId { get; set; } - public string Name { get; set; } - - /// - /// The earliest date for which a program starts to return - /// - public DateTime? MinStartDate { get; set; } - - /// - /// The latest date for which a program starts to return - /// - public DateTime? MaxStartDate { get; set; } - - /// - /// The earliest date for which a program ends to return - /// - public DateTime? MinEndDate { get; set; } - - /// - /// The latest date for which a program ends to return - /// - public DateTime? MaxEndDate { get; set; } - - /// - /// Used to specific whether to return news or not - /// - /// If set to null, all programs will be returned - public bool? IsNews { get; set; } - - /// - /// Used to specific whether to return movies or not - /// - /// If set to null, all programs will be returned - public bool? IsMovie { get; set; } - - /// - /// Gets or sets a value indicating whether this instance is kids. - /// - /// null if [is kids] contains no value, true if [is kids]; otherwise, false. - public bool? IsKids { get; set; } - /// - /// Gets or sets a value indicating whether this instance is sports. - /// - /// null if [is sports] contains no value, true if [is sports]; otherwise, false. - public bool? IsSports { get; set; } - - /// - /// Skips over a given number of items within the results. Use for paging. - /// - public int? StartIndex { get; set; } - public bool? IsSeries { get; set; } - - /// - /// Gets or sets a value indicating whether this instance has aired. - /// - /// null if [has aired] contains no value, true if [has aired]; otherwise, false. - public bool? HasAired { get; set; } - - /// - /// The maximum number of items to return - /// - public int? Limit { get; set; } - - public Tuple[] OrderBy { get; set; } - - /// - /// Limit results to items containing specific genres - /// - /// The genres. - public Guid[] GenreIds { get; set; } - public string[] Genres { get; set; } - } -} \ No newline at end of file diff --git a/MediaBrowser.Model/LiveTv/RecommendedProgramQuery.cs b/MediaBrowser.Model/LiveTv/RecommendedProgramQuery.cs deleted file mode 100644 index 9972c4c3f6..0000000000 --- a/MediaBrowser.Model/LiveTv/RecommendedProgramQuery.cs +++ /dev/null @@ -1,73 +0,0 @@ -using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Querying; -using System; - -namespace MediaBrowser.Model.LiveTv -{ - public class RecommendedProgramQuery - { - /// - /// Fields to return within the items, in addition to basic information - /// - /// The fields. - public ItemFields[] Fields { get; set; } - public bool? EnableImages { get; set; } - public int? ImageTypeLimit { get; set; } - public ImageType[] EnableImageTypes { get; set; } - public Guid[] GenreIds { get; set; } - - public bool EnableTotalRecordCount { get; set; } - - public RecommendedProgramQuery() - { - EnableTotalRecordCount = true; - GenreIds = new Guid[] { }; - } - - /// - /// Gets or sets the user identifier. - /// - /// The user identifier. - public string UserId { get; set; } - - /// - /// Gets or sets a value indicating whether this instance is airing. - /// - /// true if this instance is airing; otherwise, false. - public bool? IsAiring { get; set; } - - /// - /// Gets or sets a value indicating whether this instance has aired. - /// - /// null if [has aired] contains no value, true if [has aired]; otherwise, false. - public bool? HasAired { get; set; } - - /// - /// The maximum number of items to return - /// - /// The limit. - public int? Limit { get; set; } - - /// - /// Gets or sets a value indicating whether this instance is movie. - /// - /// null if [is movie] contains no value, true if [is movie]; otherwise, false. - public bool? IsNews { get; set; } - /// - /// Gets or sets a value indicating whether this instance is movie. - /// - /// null if [is movie] contains no value, true if [is movie]; otherwise, false. - public bool? IsMovie { get; set; } - public bool? IsSeries { get; set; } - /// - /// Gets or sets a value indicating whether this instance is kids. - /// - /// null if [is kids] contains no value, true if [is kids]; otherwise, false. - public bool? IsKids { get; set; } - /// - /// Gets or sets a value indicating whether this instance is sports. - /// - /// null if [is sports] contains no value, true if [is sports]; otherwise, false. - public bool? IsSports { get; set; } - } -} \ No newline at end of file diff --git a/MediaBrowser.Model/MediaInfo/MediaInfo.cs b/MediaBrowser.Model/MediaInfo/MediaInfo.cs index 55545e23a8..eb8a4434e9 100644 --- a/MediaBrowser.Model/MediaInfo/MediaInfo.cs +++ b/MediaBrowser.Model/MediaInfo/MediaInfo.cs @@ -7,8 +7,6 @@ namespace MediaBrowser.Model.MediaInfo { public class MediaInfo : MediaSourceInfo, IHasProviderIds { - private static readonly string[] EmptyStringArray = new string[] {}; - public ChapterInfo[] Chapters { get; set; } /// @@ -56,13 +54,13 @@ namespace MediaBrowser.Model.MediaInfo public MediaInfo() { - Chapters = new ChapterInfo[] { }; - Artists = new string[] {}; - AlbumArtists = EmptyStringArray; - Studios = new string[] {}; - Genres = new string[] {}; - People = new BaseItemPerson[] { }; + Chapters = Array.Empty(); + Artists = Array.Empty(); + AlbumArtists = Array.Empty(); + Studios = Array.Empty(); + Genres = Array.Empty(); + People = Array.Empty(); ProviderIds = new Dictionary(StringComparer.OrdinalIgnoreCase); } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs index c68c047f63..91673da9e1 100644 --- a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs +++ b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs @@ -1,5 +1,4 @@ using MediaBrowser.Model.Dlna; -using System.Collections.Generic; using System; namespace MediaBrowser.Model.MediaInfo diff --git a/MediaBrowser.Model/Notifications/NotificationOption.cs b/MediaBrowser.Model/Notifications/NotificationOption.cs index cda9e311df..ce49ae2090 100644 --- a/MediaBrowser.Model/Notifications/NotificationOption.cs +++ b/MediaBrowser.Model/Notifications/NotificationOption.cs @@ -21,18 +21,6 @@ namespace MediaBrowser.Model.Notifications /// /// true if enabled; otherwise, false. public bool Enabled { get; set; } - - /// - /// Gets or sets the title format string. - /// - /// The title format string. - public string Title { get; set; } - - /// - /// Gets or sets the description. - /// - /// The description. - public string Description { get; set; } /// /// Gets or sets the disabled services. @@ -48,9 +36,9 @@ namespace MediaBrowser.Model.Notifications public NotificationOption() { - DisabledServices = new string[] {}; - DisabledMonitorUsers = new string[] {}; - SendToUsers = new string[] {}; + DisabledServices = Array.Empty(); + DisabledMonitorUsers = Array.Empty(); + SendToUsers = Array.Empty(); } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Notifications/NotificationRequest.cs b/MediaBrowser.Model/Notifications/NotificationRequest.cs index 9c89e40fbd..7fa57ca9a3 100644 --- a/MediaBrowser.Model/Notifications/NotificationRequest.cs +++ b/MediaBrowser.Model/Notifications/NotificationRequest.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; namespace MediaBrowser.Model.Notifications { @@ -22,8 +21,6 @@ namespace MediaBrowser.Model.Notifications /// public string NotificationType { get; set; } - public Dictionary Variables { get; set; } - public SendToUserType? SendToUserMode { get; set; } public NotificationRequest() diff --git a/MediaBrowser.Model/Notifications/NotificationServiceInfo.cs b/MediaBrowser.Model/Notifications/NotificationServiceInfo.cs deleted file mode 100644 index 0ffe7d4ae9..0000000000 --- a/MediaBrowser.Model/Notifications/NotificationServiceInfo.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace MediaBrowser.Model.Notifications -{ - public class NotificationServiceInfo - { - public string Name { get; set; } - public string Id { get; set; } - } -} \ No newline at end of file diff --git a/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs b/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs index 4c3283d8e9..203712fa8c 100644 --- a/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs +++ b/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using System; +using System; namespace MediaBrowser.Model.Notifications { @@ -14,16 +13,5 @@ namespace MediaBrowser.Model.Notifications public string Category { get; set; } public bool IsBasedOnUserEvent { get; set; } - - public string DefaultTitle { get; set; } - - public string DefaultDescription { get; set; } - - public string[] Variables { get; set; } - - public NotificationTypeInfo() - { - Variables = new string[] {}; - } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs b/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs index 4c5c8bf512..db2724efae 100644 --- a/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs +++ b/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs @@ -1,11 +1,10 @@ -using System.Collections.Generic; -using System; +using System; namespace MediaBrowser.Model.Playlists { public class PlaylistCreationRequest { - public string Name { get; set; } + public string Name { get; set; } public Guid[] ItemIdList { get; set; } diff --git a/MediaBrowser.Model/Providers/SubtitleOptions.cs b/MediaBrowser.Model/Providers/SubtitleOptions.cs index f67b8870dd..fde816dd36 100644 --- a/MediaBrowser.Model/Providers/SubtitleOptions.cs +++ b/MediaBrowser.Model/Providers/SubtitleOptions.cs @@ -18,10 +18,10 @@ namespace MediaBrowser.Model.Providers public SubtitleOptions() { - DownloadLanguages = new string[] {}; + DownloadLanguages = Array.Empty(); SkipIfAudioTrackMatches = true; RequirePerfectMatch = true; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Querying/QueryFilters.cs b/MediaBrowser.Model/Querying/QueryFilters.cs index 992bba303d..f46650a035 100644 --- a/MediaBrowser.Model/Querying/QueryFilters.cs +++ b/MediaBrowser.Model/Querying/QueryFilters.cs @@ -12,10 +12,10 @@ namespace MediaBrowser.Model.Querying public QueryFiltersLegacy() { - Genres = new string[] {}; - Tags = new string[] {}; - OfficialRatings = new string[] {}; - Years = new int[] { }; + Genres = Array.Empty(); + Tags = Array.Empty(); + OfficialRatings = Array.Empty(); + Years = Array.Empty(); } } public class QueryFilters @@ -25,8 +25,8 @@ namespace MediaBrowser.Model.Querying public QueryFilters() { - Tags = new string[] {}; - Genres = new NameGuidPair[] { }; + Tags = Array.Empty(); + Genres = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Search/SearchQuery.cs b/MediaBrowser.Model/Search/SearchQuery.cs index 6a1861c8e7..9ed2f4ffb8 100644 --- a/MediaBrowser.Model/Search/SearchQuery.cs +++ b/MediaBrowser.Model/Search/SearchQuery.cs @@ -57,9 +57,9 @@ namespace MediaBrowser.Model.Search IncludePeople = true; IncludeStudios = true; - MediaTypes = new string[] {}; - IncludeItemTypes = new string[] {}; - ExcludeItemTypes = new string[] {}; + MediaTypes = Array.Empty(); + IncludeItemTypes = Array.Empty(); + ExcludeItemTypes = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Session/ClientCapabilities.cs b/MediaBrowser.Model/Session/ClientCapabilities.cs index 0a780b9103..ded4c0e842 100644 --- a/MediaBrowser.Model/Session/ClientCapabilities.cs +++ b/MediaBrowser.Model/Session/ClientCapabilities.cs @@ -25,9 +25,9 @@ namespace MediaBrowser.Model.Session public ClientCapabilities() { - PlayableMediaTypes = new string[] {}; - SupportedCommands = new string[] {}; + PlayableMediaTypes = Array.Empty(); + SupportedCommands = Array.Empty(); SupportsPersistentIdentifier = true; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Session/SessionInfoDto.cs b/MediaBrowser.Model/Session/SessionInfoDto.cs deleted file mode 100644 index ca14107df2..0000000000 --- a/MediaBrowser.Model/Session/SessionInfoDto.cs +++ /dev/null @@ -1,117 +0,0 @@ -using MediaBrowser.Model.Dto; -using System; -using System.Collections.Generic; - -namespace MediaBrowser.Model.Session -{ - public class SessionInfoDto - { - /// - /// Gets or sets the supported commands. - /// - /// The supported commands. - public string[] SupportedCommands { get; set; } - - /// - /// Gets or sets the playable media types. - /// - /// The playable media types. - public string[] PlayableMediaTypes { get; set; } - - /// - /// Gets or sets the id. - /// - /// The id. - public string Id { get; set; } - - public string ServerId { get; set; } - - /// - /// Gets or sets the user id. - /// - /// The user id. - public string UserId { get; set; } - - /// - /// Gets or sets the user primary image tag. - /// - /// The user primary image tag. - public string UserPrimaryImageTag { get; set; } - - public string RemoteEndPoint { get; set; } - - /// - /// Gets or sets the name of the user. - /// - /// The name of the user. - public string UserName { get; set; } - - /// - /// Gets or sets the additional users present. - /// - /// The additional users present. - public SessionUserInfo[] AdditionalUsers { get; set; } - - /// - /// Gets or sets the application version. - /// - /// The application version. - public string ApplicationVersion { get; set; } - - /// - /// Gets or sets the type of the client. - /// - /// The type of the client. - public string Client { get; set; } - - /// - /// Gets or sets the last activity date. - /// - /// The last activity date. - public DateTime LastActivityDate { get; set; } - - /// - /// Gets or sets the name of the device. - /// - /// The name of the device. - public string DeviceName { get; set; } - - public string DeviceType { get; set; } - - /// - /// Gets or sets the now playing item. - /// - /// The now playing item. - public BaseItemDto NowPlayingItem { get; set; } - - /// - /// Gets or sets the device id. - /// - /// The device id. - public string DeviceId { get; set; } - - /// - /// Gets or sets the application icon URL. - /// - /// The application icon URL. - public string AppIconUrl { get; set; } - - /// - /// Gets or sets a value indicating whether [supports remote control]. - /// - /// true if [supports remote control]; otherwise, false. - public bool SupportsRemoteControl { get; set; } - - public PlayerStateInfo PlayState { get; set; } - - public TranscodingInfo TranscodingInfo { get; set; } - - public SessionInfoDto() - { - AdditionalUsers = new SessionUserInfo[] { }; - - PlayableMediaTypes = new string[] {}; - SupportedCommands = new string[] {}; - } - } -} diff --git a/MediaBrowser.Model/Sync/SyncJob.cs b/MediaBrowser.Model/Sync/SyncJob.cs index 0cf9312a11..3b2e30d702 100644 --- a/MediaBrowser.Model/Sync/SyncJob.cs +++ b/MediaBrowser.Model/Sync/SyncJob.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using MediaBrowser.Model.Sync; namespace MediaBrowser.Model.Sync { @@ -108,7 +106,7 @@ namespace MediaBrowser.Model.Sync public SyncJob() { - RequestedItemIds = new Guid[] { }; + RequestedItemIds = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Users/UserPolicy.cs b/MediaBrowser.Model/Users/UserPolicy.cs index 8bddafb5a9..e3f6d8620a 100644 --- a/MediaBrowser.Model/Users/UserPolicy.cs +++ b/MediaBrowser.Model/Users/UserPolicy.cs @@ -78,7 +78,7 @@ namespace MediaBrowser.Model.Users public UserPolicy() { EnableContentDeletion = true; - EnableContentDeletionFromFolders = new string[] { }; + EnableContentDeletionFromFolders = Array.Empty(); EnableSyncTranscoding = true; EnableMediaConversion = true; @@ -97,20 +97,20 @@ namespace MediaBrowser.Model.Users EnableSharedDeviceControl = true; - BlockedTags = new string[] { }; - BlockUnratedItems = new UnratedItem[] { }; + BlockedTags = Array.Empty(); + BlockUnratedItems = Array.Empty(); EnableUserPreferenceAccess = true; - AccessSchedules = new AccessSchedule[] { }; + AccessSchedules = Array.Empty(); EnableAllChannels = true; - EnabledChannels = new string[] { }; + EnabledChannels = Array.Empty(); EnableAllFolders = true; - EnabledFolders = new string[] { }; + EnabledFolders = Array.Empty(); - EnabledDevices = new string[] { }; + EnabledDevices = Array.Empty(); EnableAllDevices = true; EnableContentDownloading = true; @@ -118,4 +118,4 @@ namespace MediaBrowser.Model.Users EnableRemoteAccess = true; } } -} \ No newline at end of file +} -- cgit v1.2.3