aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Configuration
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Configuration')
-rw-r--r--MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs8
-rw-r--r--MediaBrowser.Model/Configuration/LibraryOptions.cs21
-rw-r--r--MediaBrowser.Model/Configuration/MetadataOptions.cs21
-rw-r--r--MediaBrowser.Model/Configuration/MetadataPluginSummary.cs8
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs51
-rw-r--r--MediaBrowser.Model/Configuration/UserConfiguration.cs8
6 files changed, 48 insertions, 69 deletions
diff --git a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs
index b5b0101cb..08bf2379f 100644
--- a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs
@@ -9,6 +9,7 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
public class BaseApplicationConfiguration
{
+ // TODO: @bond Remove?
/// <summary>
/// Gets or sets a value indicating whether [enable debug level logging].
/// </summary>
@@ -21,6 +22,7 @@ namespace MediaBrowser.Model.Configuration
/// <value><c>true</c> if [enable auto update]; otherwise, <c>false</c>.</value>
public bool EnableAutoUpdate { get; set; }
+ // TODO: @bond Remove?
/// <summary>
/// The number of days we should retain log files
/// </summary>
@@ -28,12 +30,6 @@ namespace MediaBrowser.Model.Configuration
public int LogFileRetentionDays { get; set; }
/// <summary>
- /// Gets or sets a value indicating whether [run at startup].
- /// </summary>
- /// <value><c>true</c> if [run at startup]; otherwise, <c>false</c>.</value>
- public bool RunAtStartup { get; set; }
-
- /// <summary>
/// Gets or sets a value indicating whether this instance is first run.
/// </summary>
/// <value><c>true</c> if this instance is first run; otherwise, <c>false</c>.</value>
diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs
index a271d43af..cc70cc888 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<TypeOptions>();
+ DisabledSubtitleFetchers = Array.Empty<string>();
+ SubtitleFetcherOrder = Array.Empty<string>();
+ DisabledLocalMetadataReaders = Array.Empty<string>();
SkipSubtitlesIfAudioTrackMatches = true;
RequirePerfectSubtitleMatch = true;
@@ -76,7 +75,7 @@ namespace MediaBrowser.Model.Configuration
EnablePhotos = true;
SaveSubtitlesWithMedia = true;
EnableRealtimeMonitor = true;
- PathInfos = new MediaPathInfo[] { };
+ PathInfos = Array.Empty<MediaPathInfo>();
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<string>();
+ MetadataFetcherOrder = Array.Empty<string>();
+ ImageFetchers = Array.Empty<string>();
+ ImageFetcherOrder = Array.Empty<string>();
+ ImageOptions = Array.Empty<ImageOption>();
}
public static Dictionary<string, ImageOption[]> DefaultImageOptions = new Dictionary<string, ImageOption[]>
diff --git a/MediaBrowser.Model/Configuration/MetadataOptions.cs b/MediaBrowser.Model/Configuration/MetadataOptions.cs
index 26cfee085..dde2bd090 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<string>();
+ LocalMetadataReaderOrder = Array.Empty<string>();
+ DisabledMetadataFetchers = Array.Empty<string>();
+ MetadataFetcherOrder = Array.Empty<string>();
+ DisabledImageFetchers = Array.Empty<string>();
+ ImageFetcherOrder = Array.Empty<string>();
}
}
}
diff --git a/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs b/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs
index 80142cf43..0bd20f837 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<ImageType>();
+ Plugins = Array.Empty<MetadataPlugin>();
}
}
-} \ No newline at end of file
+}
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index cc1275035..565d5f74b 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -173,9 +173,6 @@ namespace MediaBrowser.Model.Configuration
public int RemoteClientBitrateLimit { get; set; }
- public int SchemaVersion { get; set; }
-
- public bool EnableAnonymousUsageReporting { get; set; }
public bool EnableFolderView { get; set; }
public bool EnableGroupingIntoCollections { get; set; }
public bool DisplaySpecialsWithinSeasons { get; set; }
@@ -202,13 +199,13 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
public ServerConfiguration()
{
- UninstalledPlugins = new string[] { };
- RemoteIPFilter = new string[] { };
- LocalNetworkSubnets = new string[] { };
- LocalNetworkAddresses = new string[] { };
- CodecsUsed = new string[] { };
+ UninstalledPlugins = Array.Empty<string>();
+ RemoteIPFilter = Array.Empty<string>();
+ LocalNetworkSubnets = Array.Empty<string>();
+ LocalNetworkAddresses = Array.Empty<string>();
+ CodecsUsed = Array.Empty<string>();
ImageExtractionTimeoutMs = 0;
- PathSubstitutions = new PathSubstitution[] { };
+ PathSubstitutions = Array.Empty<PathSubstitution>();
EnableSimpleArtistDetection = true;
DisplaySpecialsWithinSeasons = true;
@@ -221,7 +218,6 @@ namespace MediaBrowser.Model.Configuration
HttpsPortNumber = DefaultHttpsPort;
EnableHttps = true;
EnableDashboardResponseCaching = true;
- EnableAnonymousUsageReporting = true;
EnableCaseSensitiveItemIds = true;
EnableAutomaticRestart = true;
@@ -237,7 +233,7 @@ namespace MediaBrowser.Model.Configuration
LibraryMonitorDelay = 60;
- ContentTypes = new NameValuePair[] { };
+ ContentTypes = Array.Empty<NameValuePair>();
PreferredMetadataLanguage = "en";
MetadataCountryCode = "US";
@@ -250,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 34b0be095..39b956138 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<string>();
+ OrderedViews = Array.Empty<string>();
+ MyMediaExcludes = Array.Empty<string>();
+ GroupedFolders = Array.Empty<string>();
}
}
}