< Summary - Jellyfin

Information
Class: MediaBrowser.Model.Configuration.ServerConfiguration
Assembly: MediaBrowser.Model
File(s): /srv/git/jellyfin/MediaBrowser.Model/Configuration/ServerConfiguration.cs
Line coverage
100%
Covered lines: 51
Uncovered lines: 0
Coverable lines: 51
Total lines: 284
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%

File(s)

/srv/git/jellyfin/MediaBrowser.Model/Configuration/ServerConfiguration.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2#pragma warning disable CA1819
 3
 4using System;
 5using MediaBrowser.Model.Drawing;
 6using MediaBrowser.Model.Dto;
 7using MediaBrowser.Model.System;
 8using MediaBrowser.Model.Updates;
 9
 10namespace MediaBrowser.Model.Configuration;
 11
 12/// <summary>
 13/// Represents the server configuration.
 14/// </summary>
 15public class ServerConfiguration : BaseApplicationConfiguration
 16{
 17    /// <summary>
 18    /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
 19    /// </summary>
 16020    public ServerConfiguration()
 21    {
 16022        MetadataOptions = new[]
 16023        {
 16024            new MetadataOptions()
 16025            {
 16026                ItemType = "Book"
 16027            },
 16028            new MetadataOptions()
 16029            {
 16030                ItemType = "Movie"
 16031            },
 16032            new MetadataOptions
 16033            {
 16034                ItemType = "MusicVideo",
 16035                DisabledMetadataFetchers = new[] { "The Open Movie Database" },
 16036                DisabledImageFetchers = new[] { "The Open Movie Database" }
 16037            },
 16038            new MetadataOptions
 16039            {
 16040                ItemType = "Series",
 16041            },
 16042            new MetadataOptions
 16043            {
 16044                ItemType = "MusicAlbum",
 16045                DisabledMetadataFetchers = new[] { "TheAudioDB" }
 16046            },
 16047            new MetadataOptions
 16048            {
 16049                ItemType = "MusicArtist",
 16050                DisabledMetadataFetchers = new[] { "TheAudioDB" }
 16051            },
 16052            new MetadataOptions
 16053            {
 16054                ItemType = "BoxSet"
 16055            },
 16056            new MetadataOptions
 16057            {
 16058                ItemType = "Season",
 16059            },
 16060            new MetadataOptions
 16061            {
 16062                ItemType = "Episode",
 16063            }
 16064        };
 16065    }
 66
 67    /// <summary>
 68    /// Gets or sets a value indicating whether to enable prometheus metrics exporting.
 69    /// </summary>
 70    public bool EnableMetrics { get; set; } = false;
 71
 72    public bool EnableNormalizedItemByNameIds { get; set; } = true;
 73
 74    /// <summary>
 75    /// Gets or sets a value indicating whether this instance is port authorized.
 76    /// </summary>
 77    /// <value><c>true</c> if this instance is port authorized; otherwise, <c>false</c>.</value>
 78    public bool IsPortAuthorized { get; set; }
 79
 80    /// <summary>
 81    /// Gets or sets a value indicating whether quick connect is available for use on this server.
 82    /// </summary>
 83    public bool QuickConnectAvailable { get; set; } = true;
 84
 85    /// <summary>
 86    /// Gets or sets a value indicating whether [enable case sensitive item ids].
 87    /// </summary>
 88    /// <value><c>true</c> if [enable case sensitive item ids]; otherwise, <c>false</c>.</value>
 89    public bool EnableCaseSensitiveItemIds { get; set; } = true;
 90
 91    public bool DisableLiveTvChannelUserDataName { get; set; } = true;
 92
 93    /// <summary>
 94    /// Gets or sets the metadata path.
 95    /// </summary>
 96    /// <value>The metadata path.</value>
 97    public string MetadataPath { get; set; } = string.Empty;
 98
 99    /// <summary>
 100    /// Gets or sets the preferred metadata language.
 101    /// </summary>
 102    /// <value>The preferred metadata language.</value>
 103    public string PreferredMetadataLanguage { get; set; } = "en";
 104
 105    /// <summary>
 106    /// Gets or sets the metadata country code.
 107    /// </summary>
 108    /// <value>The metadata country code.</value>
 109    public string MetadataCountryCode { get; set; } = "US";
 110
 111    /// <summary>
 112    /// Gets or sets characters to be replaced with a ' ' in strings to create a sort name.
 113    /// </summary>
 114    /// <value>The sort replace characters.</value>
 160115    public string[] SortReplaceCharacters { get; set; } = new[] { ".", "+", "%" };
 116
 117    /// <summary>
 118    /// Gets or sets characters to be removed from strings to create a sort name.
 119    /// </summary>
 120    /// <value>The sort remove characters.</value>
 160121    public string[] SortRemoveCharacters { get; set; } = new[] { ",", "&", "-", "{", "}", "'" };
 122
 123    /// <summary>
 124    /// Gets or sets words to be removed from strings to create a sort name.
 125    /// </summary>
 126    /// <value>The sort remove words.</value>
 160127    public string[] SortRemoveWords { get; set; } = new[] { "the", "a", "an" };
 128
 129    /// <summary>
 130    /// Gets or sets the minimum percentage of an item that must be played in order for playstate to be updated.
 131    /// </summary>
 132    /// <value>The min resume PCT.</value>
 133    public int MinResumePct { get; set; } = 5;
 134
 135    /// <summary>
 136    /// Gets or sets the maximum percentage of an item that can be played while still saving playstate. If this percenta
 137    /// </summary>
 138    /// <value>The max resume PCT.</value>
 139    public int MaxResumePct { get; set; } = 90;
 140
 141    /// <summary>
 142    /// Gets or sets the minimum duration that an item must have in order to be eligible for playstate updates..
 143    /// </summary>
 144    /// <value>The min resume duration seconds.</value>
 145    public int MinResumeDurationSeconds { get; set; } = 300;
 146
 147    /// <summary>
 148    /// Gets or sets the minimum minutes of a book that must be played in order for playstate to be updated.
 149    /// </summary>
 150    /// <value>The min resume in minutes.</value>
 151    public int MinAudiobookResume { get; set; } = 5;
 152
 153    /// <summary>
 154    /// Gets or sets the remaining minutes of a book that can be played while still saving playstate. If this percentage
 155    /// </summary>
 156    /// <value>The remaining time in minutes.</value>
 157    public int MaxAudiobookResume { get; set; } = 5;
 158
 159    /// <summary>
 160    /// Gets or sets the threshold in minutes after a inactive session gets closed automatically.
 161    /// If set to 0 the check for inactive sessions gets disabled.
 162    /// </summary>
 163    /// <value>The close inactive session threshold in minutes. 0 to disable.</value>
 164    public int InactiveSessionThreshold { get; set; }
 165
 166    /// <summary>
 167    /// Gets or sets the delay in seconds that we will wait after a file system change to try and discover what has been
 168    /// Some delay is necessary with some items because their creation is not atomic.  It involves the creation of sever
 169    /// different directories and files.
 170    /// </summary>
 171    /// <value>The file watcher delay.</value>
 172    public int LibraryMonitorDelay { get; set; } = 60;
 173
 174    /// <summary>
 175    /// Gets or sets the duration in seconds that we will wait after a library updated event before executing the librar
 176    /// </summary>
 177    /// <value>The library update duration.</value>
 178    public int LibraryUpdateDuration { get; set; } = 30;
 179
 180    /// <summary>
 181    /// Gets or sets the image saving convention.
 182    /// </summary>
 183    /// <value>The image saving convention.</value>
 184    public ImageSavingConvention ImageSavingConvention { get; set; }
 185
 186    public MetadataOptions[] MetadataOptions { get; set; }
 187
 188    public bool SkipDeserializationForBasicTypes { get; set; } = true;
 189
 190    public string ServerName { get; set; } = string.Empty;
 191
 192    public string UICulture { get; set; } = "en-US";
 193
 194    public bool SaveMetadataHidden { get; set; } = false;
 195
 196    public NameValuePair[] ContentTypes { get; set; } = Array.Empty<NameValuePair>();
 197
 198    public int RemoteClientBitrateLimit { get; set; }
 199
 200    public bool EnableFolderView { get; set; } = false;
 201
 202    public bool EnableGroupingIntoCollections { get; set; } = false;
 203
 204    public bool DisplaySpecialsWithinSeasons { get; set; } = true;
 205
 206    public string[] CodecsUsed { get; set; } = Array.Empty<string>();
 207
 208    public RepositoryInfo[] PluginRepositories { get; set; } = Array.Empty<RepositoryInfo>();
 209
 210    public bool EnableExternalContentInSuggestions { get; set; } = true;
 211
 212    public int ImageExtractionTimeoutMs { get; set; }
 213
 214    public PathSubstitution[] PathSubstitutions { get; set; } = Array.Empty<PathSubstitution>();
 215
 216    /// <summary>
 217    /// Gets or sets a value indicating whether slow server responses should be logged as a warning.
 218    /// </summary>
 219    public bool EnableSlowResponseWarning { get; set; } = true;
 220
 221    /// <summary>
 222    /// Gets or sets the threshold for the slow response time warning in ms.
 223    /// </summary>
 160224    public long SlowResponseThresholdMs { get; set; } = 500;
 225
 226    /// <summary>
 227    /// Gets or sets the cors hosts.
 228    /// </summary>
 160229    public string[] CorsHosts { get; set; } = new[] { "*" };
 230
 231    /// <summary>
 232    /// Gets or sets the number of days we should retain activity logs.
 233    /// </summary>
 160234    public int? ActivityLogRetentionDays { get; set; } = 30;
 235
 236    /// <summary>
 237    /// Gets or sets the how the library scan fans out.
 238    /// </summary>
 239    public int LibraryScanFanoutConcurrency { get; set; }
 240
 241    /// <summary>
 242    /// Gets or sets the how many metadata refreshes can run concurrently.
 243    /// </summary>
 244    public int LibraryMetadataRefreshConcurrency { get; set; }
 245
 246    /// <summary>
 247    /// Gets or sets a value indicating whether older plugins should automatically be deleted from the plugin folder.
 248    /// </summary>
 249    public bool RemoveOldPlugins { get; set; }
 250
 251    /// <summary>
 252    /// Gets or sets a value indicating whether clients should be allowed to upload logs.
 253    /// </summary>
 254    public bool AllowClientLogUpload { get; set; } = true;
 255
 256    /// <summary>
 257    /// Gets or sets the dummy chapter duration in seconds, use 0 (zero) or less to disable generation alltogether.
 258    /// </summary>
 259    /// <value>The dummy chapters duration.</value>
 260    public int DummyChapterDuration { get; set; }
 261
 262    /// <summary>
 263    /// Gets or sets the chapter image resolution.
 264    /// </summary>
 265    /// <value>The chapter image resolution.</value>
 266    public ImageResolution ChapterImageResolution { get; set; } = ImageResolution.MatchSource;
 267
 268    /// <summary>
 269    /// Gets or sets the limit for parallel image encoding.
 270    /// </summary>
 271    /// <value>The limit for parallel image encoding.</value>
 272    public int ParallelImageEncodingLimit { get; set; }
 273
 274    /// <summary>
 275    /// Gets or sets the list of cast receiver applications.
 276    /// </summary>
 277    public CastReceiverApplication[] CastReceiverApplications { get; set; } = Array.Empty<CastReceiverApplication>();
 278
 279    /// <summary>
 280    /// Gets or sets the trickplay options.
 281    /// </summary>
 282    /// <value>The trickplay options.</value>
 283    public TrickplayOptions TrickplayOptions { get; set; } = new TrickplayOptions();
 284}

Methods/Properties

.ctor()