aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Configuration
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Configuration')
-rw-r--r--MediaBrowser.Model/Configuration/EncodingOptionsDto.cs309
-rw-r--r--MediaBrowser.Model/Configuration/MetadataConfigurationDto.cs12
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfigurationDto.cs177
-rw-r--r--MediaBrowser.Model/Configuration/XbmcMetadataOptionsDto.cs32
4 files changed, 530 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Configuration/EncodingOptionsDto.cs b/MediaBrowser.Model/Configuration/EncodingOptionsDto.cs
new file mode 100644
index 0000000000..755ba577ca
--- /dev/null
+++ b/MediaBrowser.Model/Configuration/EncodingOptionsDto.cs
@@ -0,0 +1,309 @@
+#pragma warning disable CA1819
+
+#nullable disable
+using System.ComponentModel;
+using MediaBrowser.Model.Entities;
+
+namespace MediaBrowser.Model.Configuration;
+
+/// <summary>
+/// The encoding options DTO for API use.
+/// </summary>
+public class EncodingOptionsDto
+{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="EncodingOptionsDto" /> class.
+ /// </summary>
+ public EncodingOptionsDto()
+ {
+ EnableFallbackFont = false;
+ EnableAudioVbr = false;
+ DownMixAudioBoost = 2;
+ DownMixStereoAlgorithm = DownMixStereoAlgorithms.None;
+ MaxMuxingQueueSize = 2048;
+ EnableThrottling = false;
+ ThrottleDelaySeconds = 180;
+ EnableSegmentDeletion = false;
+ SegmentKeepSeconds = 720;
+ EncodingThreadCount = -1;
+ VaapiDevice = "/dev/dri/renderD128";
+ QsvDevice = string.Empty;
+ EnableTonemapping = false;
+ EnableVppTonemapping = false;
+ EnableVideoToolboxTonemapping = false;
+ TonemappingAlgorithm = TonemappingAlgorithm.bt2390;
+ TonemappingMode = TonemappingMode.auto;
+ TonemappingRange = TonemappingRange.auto;
+ TonemappingDesat = 0;
+ TonemappingPeak = 100;
+ TonemappingParam = 0;
+ VppTonemappingBrightness = 16;
+ VppTonemappingContrast = 1;
+ H264Crf = 23;
+ H265Crf = 28;
+ DeinterlaceDoubleRate = false;
+ DeinterlaceMethod = DeinterlaceMethod.yadif;
+ EnableDecodingColorDepth10Hevc = true;
+ EnableDecodingColorDepth10Vp9 = true;
+ EnableDecodingColorDepth10HevcRext = false;
+ EnableDecodingColorDepth12HevcRext = false;
+ EnableEnhancedNvdecDecoder = true;
+ PreferSystemNativeHwDecoder = true;
+ EnableIntelLowPowerH264HwEncoder = false;
+ EnableIntelLowPowerHevcHwEncoder = false;
+ EnableHardwareEncoding = true;
+ AllowHevcEncoding = false;
+ AllowAv1Encoding = false;
+ EnableSubtitleExtraction = true;
+ SubtitleExtractionTimeoutMinutes = 30;
+ AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = ["mkv"];
+ HardwareDecodingCodecs = ["h264", "vc1"];
+ HlsAudioSeekStrategy = HlsAudioSeekStrategy.DisableAccurateSeek;
+ }
+
+ /// <summary>
+ /// Gets or sets the thread count used for encoding.
+ /// </summary>
+ public int EncodingThreadCount { get; set; }
+
+ /// <summary>
+ /// Gets or sets the temporary transcoding path.
+ /// </summary>
+ public string TranscodingTempPath { get; set; }
+
+ /// <summary>
+ /// Gets or sets the path to the fallback font.
+ /// </summary>
+ public string FallbackFontPath { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to use the fallback font.
+ /// </summary>
+ public bool EnableFallbackFont { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether audio VBR is enabled.
+ /// </summary>
+ public bool EnableAudioVbr { get; set; }
+
+ /// <summary>
+ /// Gets or sets the audio boost applied when downmixing audio.
+ /// </summary>
+ public double DownMixAudioBoost { get; set; }
+
+ /// <summary>
+ /// Gets or sets the algorithm used for downmixing audio to stereo.
+ /// </summary>
+ public DownMixStereoAlgorithms DownMixStereoAlgorithm { get; set; }
+
+ /// <summary>
+ /// Gets or sets the maximum size of the muxing queue.
+ /// </summary>
+ public int MaxMuxingQueueSize { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether throttling is enabled.
+ /// </summary>
+ public bool EnableThrottling { get; set; }
+
+ /// <summary>
+ /// Gets or sets the delay after which throttling happens.
+ /// </summary>
+ public int ThrottleDelaySeconds { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether segment deletion is enabled.
+ /// </summary>
+ public bool EnableSegmentDeletion { get; set; }
+
+ /// <summary>
+ /// Gets or sets seconds for which segments should be kept before being deleted.
+ /// </summary>
+ public int SegmentKeepSeconds { get; set; }
+
+ /// <summary>
+ /// Gets or sets the hardware acceleration type.
+ /// </summary>
+ public HardwareAccelerationType HardwareAccelerationType { get; set; }
+
+ /// <summary>
+ /// Gets or sets the FFmpeg path as set by the user via the UI.
+ /// </summary>
+ public string EncoderAppPath { get; set; }
+
+ /// <summary>
+ /// Gets or sets the current FFmpeg path being used by the system and displayed on the transcode page.
+ /// </summary>
+ public string EncoderAppPathDisplay { get; set; }
+
+ /// <summary>
+ /// Gets or sets the VA-API device.
+ /// </summary>
+ public string VaapiDevice { get; set; }
+
+ /// <summary>
+ /// Gets or sets the QSV device.
+ /// </summary>
+ public string QsvDevice { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether tonemapping is enabled.
+ /// </summary>
+ public bool EnableTonemapping { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether VPP tonemapping is enabled.
+ /// </summary>
+ public bool EnableVppTonemapping { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether videotoolbox tonemapping is enabled.
+ /// </summary>
+ public bool EnableVideoToolboxTonemapping { get; set; }
+
+ /// <summary>
+ /// Gets or sets the tone-mapping algorithm.
+ /// </summary>
+ public TonemappingAlgorithm TonemappingAlgorithm { get; set; }
+
+ /// <summary>
+ /// Gets or sets the tone-mapping mode.
+ /// </summary>
+ public TonemappingMode TonemappingMode { get; set; }
+
+ /// <summary>
+ /// Gets or sets the tone-mapping range.
+ /// </summary>
+ public TonemappingRange TonemappingRange { get; set; }
+
+ /// <summary>
+ /// Gets or sets the tone-mapping desaturation.
+ /// </summary>
+ public double TonemappingDesat { get; set; }
+
+ /// <summary>
+ /// Gets or sets the tone-mapping peak.
+ /// </summary>
+ public double TonemappingPeak { get; set; }
+
+ /// <summary>
+ /// Gets or sets the tone-mapping parameters.
+ /// </summary>
+ public double TonemappingParam { get; set; }
+
+ /// <summary>
+ /// Gets or sets the VPP tone-mapping brightness.
+ /// </summary>
+ public double VppTonemappingBrightness { get; set; }
+
+ /// <summary>
+ /// Gets or sets the VPP tone-mapping contrast.
+ /// </summary>
+ public double VppTonemappingContrast { get; set; }
+
+ /// <summary>
+ /// Gets or sets the H264 CRF.
+ /// </summary>
+ public int H264Crf { get; set; }
+
+ /// <summary>
+ /// Gets or sets the H265 CRF.
+ /// </summary>
+ public int H265Crf { get; set; }
+
+ /// <summary>
+ /// Gets or sets the encoder preset.
+ /// </summary>
+ public EncoderPreset? EncoderPreset { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the framerate is doubled when deinterlacing.
+ /// </summary>
+ public bool DeinterlaceDoubleRate { get; set; }
+
+ /// <summary>
+ /// Gets or sets the deinterlace method.
+ /// </summary>
+ public DeinterlaceMethod DeinterlaceMethod { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether 10bit HEVC decoding is enabled.
+ /// </summary>
+ public bool EnableDecodingColorDepth10Hevc { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether 10bit VP9 decoding is enabled.
+ /// </summary>
+ public bool EnableDecodingColorDepth10Vp9 { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether 8/10bit HEVC RExt decoding is enabled.
+ /// </summary>
+ public bool EnableDecodingColorDepth10HevcRext { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether 12bit HEVC RExt decoding is enabled.
+ /// </summary>
+ public bool EnableDecodingColorDepth12HevcRext { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the enhanced NVDEC is enabled.
+ /// </summary>
+ public bool EnableEnhancedNvdecDecoder { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the system native hardware decoder should be used.
+ /// </summary>
+ public bool PreferSystemNativeHwDecoder { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the Intel H264 low-power hardware encoder should be used.
+ /// </summary>
+ public bool EnableIntelLowPowerH264HwEncoder { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the Intel HEVC low-power hardware encoder should be used.
+ /// </summary>
+ public bool EnableIntelLowPowerHevcHwEncoder { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether hardware encoding is enabled.
+ /// </summary>
+ public bool EnableHardwareEncoding { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether HEVC encoding is enabled.
+ /// </summary>
+ public bool AllowHevcEncoding { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether AV1 encoding is enabled.
+ /// </summary>
+ public bool AllowAv1Encoding { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether subtitle extraction is enabled.
+ /// </summary>
+ public bool EnableSubtitleExtraction { get; set; }
+
+ /// <summary>
+ /// Gets or sets the timeout for subtitle extraction in minutes.
+ /// </summary>
+ public int SubtitleExtractionTimeoutMinutes { get; set; }
+
+ /// <summary>
+ /// Gets or sets the codecs hardware encoding is used for.
+ /// </summary>
+ public string[] HardwareDecodingCodecs { get; set; }
+
+ /// <summary>
+ /// Gets or sets the file extensions on-demand metadata based keyframe extraction is enabled for.
+ /// </summary>
+ public string[] AllowOnDemandMetadataBasedKeyframeExtractionForExtensions { get; set; }
+
+ /// <summary>
+ /// Gets or sets the method used for audio seeking in HLS.
+ /// </summary>
+ [DefaultValue(HlsAudioSeekStrategy.DisableAccurateSeek)]
+ public HlsAudioSeekStrategy HlsAudioSeekStrategy { get; set; }
+}
diff --git a/MediaBrowser.Model/Configuration/MetadataConfigurationDto.cs b/MediaBrowser.Model/Configuration/MetadataConfigurationDto.cs
new file mode 100644
index 0000000000..8b39523bc7
--- /dev/null
+++ b/MediaBrowser.Model/Configuration/MetadataConfigurationDto.cs
@@ -0,0 +1,12 @@
+namespace MediaBrowser.Model.Configuration;
+
+/// <summary>
+/// The metadata configuration DTO for API use.
+/// </summary>
+public class MetadataConfigurationDto
+{
+ /// <summary>
+ /// Gets or sets a value indicating whether to use file creation time for date added.
+ /// </summary>
+ public bool UseFileCreationTimeForDateAdded { get; set; } = true;
+}
diff --git a/MediaBrowser.Model/Configuration/ServerConfigurationDto.cs b/MediaBrowser.Model/Configuration/ServerConfigurationDto.cs
new file mode 100644
index 0000000000..62af8b9626
--- /dev/null
+++ b/MediaBrowser.Model/Configuration/ServerConfigurationDto.cs
@@ -0,0 +1,177 @@
+#pragma warning disable CS1591
+#pragma warning disable CA1819
+
+using System;
+using MediaBrowser.Model.Drawing;
+using MediaBrowser.Model.Dto;
+using MediaBrowser.Model.System;
+using MediaBrowser.Model.Updates;
+
+namespace MediaBrowser.Model.Configuration;
+
+/// <summary>
+/// The server configuration DTO for API use.
+/// </summary>
+public class ServerConfigurationDto
+{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ServerConfigurationDto" /> class.
+ /// </summary>
+ public ServerConfigurationDto()
+ {
+ LogFileRetentionDays = 3;
+ MetadataOptions = new[]
+ {
+ new MetadataOptions()
+ {
+ ItemType = "Book"
+ },
+ new MetadataOptions()
+ {
+ ItemType = "Movie"
+ },
+ new MetadataOptions
+ {
+ ItemType = "MusicVideo",
+ DisabledMetadataFetchers = new[] { "The Open Movie Database" },
+ DisabledImageFetchers = new[] { "The Open Movie Database" }
+ },
+ new MetadataOptions
+ {
+ ItemType = "Series",
+ },
+ new MetadataOptions
+ {
+ ItemType = "MusicAlbum",
+ DisabledMetadataFetchers = new[] { "TheAudioDB" }
+ },
+ new MetadataOptions
+ {
+ ItemType = "MusicArtist",
+ DisabledMetadataFetchers = new[] { "TheAudioDB" }
+ },
+ new MetadataOptions
+ {
+ ItemType = "BoxSet"
+ },
+ new MetadataOptions
+ {
+ ItemType = "Season",
+ },
+ new MetadataOptions
+ {
+ ItemType = "Episode",
+ }
+ };
+ }
+
+ public int LogFileRetentionDays { get; set; }
+
+ public bool IsStartupWizardCompleted { get; set; }
+
+ public string? CachePath { get; set; }
+
+ public string? PreviousVersionStr { get; set; }
+
+ public bool EnableMetrics { get; set; } = false;
+
+ public bool EnableNormalizedItemByNameIds { get; set; } = true;
+
+ public bool IsPortAuthorized { get; set; }
+
+ public bool QuickConnectAvailable { get; set; } = true;
+
+ public bool EnableCaseSensitiveItemIds { get; set; } = true;
+
+ public bool DisableLiveTvChannelUserDataName { get; set; } = true;
+
+ public string MetadataPath { get; set; } = string.Empty;
+
+ public string PreferredMetadataLanguage { get; set; } = "en";
+
+ public string MetadataCountryCode { get; set; } = "US";
+
+ public string[] SortReplaceCharacters { get; set; } = new[] { ".", "+", "%" };
+
+ public string[] SortRemoveCharacters { get; set; } = new[] { ",", "&", "-", "{", "}", "'" };
+
+ public string[] SortRemoveWords { get; set; } = new[] { "the", "a", "an" };
+
+ public int MinResumePct { get; set; } = 5;
+
+ public int MaxResumePct { get; set; } = 90;
+
+ public int MinResumeDurationSeconds { get; set; } = 300;
+
+ public int MinAudiobookResume { get; set; } = 5;
+
+ public int MaxAudiobookResume { get; set; } = 5;
+
+ public int InactiveSessionThreshold { get; set; }
+
+ public int LibraryMonitorDelay { get; set; } = 60;
+
+ public int LibraryUpdateDuration { get; set; } = 30;
+
+ public int CacheSize { get; set; } = Environment.ProcessorCount * 100;
+
+ public ImageSavingConvention ImageSavingConvention { get; set; }
+
+ public MetadataOptions[] MetadataOptions { get; set; }
+
+ public bool SkipDeserializationForBasicTypes { get; set; } = true;
+
+ public string ServerName { get; set; } = string.Empty;
+
+ public string UICulture { get; set; } = "en-US";
+
+ public bool SaveMetadataHidden { get; set; } = false;
+
+ public NameValuePair[] ContentTypes { get; set; } = Array.Empty<NameValuePair>();
+
+ public int RemoteClientBitrateLimit { get; set; }
+
+ public bool EnableFolderView { get; set; } = false;
+
+ public bool EnableGroupingMoviesIntoCollections { get; set; } = false;
+
+ public bool EnableGroupingShowsIntoCollections { get; set; } = false;
+
+ public bool DisplaySpecialsWithinSeasons { get; set; } = true;
+
+ public string[] CodecsUsed { get; set; } = Array.Empty<string>();
+
+ public RepositoryInfo[] PluginRepositories { get; set; } = Array.Empty<RepositoryInfo>();
+
+ public bool EnableExternalContentInSuggestions { get; set; } = true;
+
+ public int ImageExtractionTimeoutMs { get; set; }
+
+ public PathSubstitution[] PathSubstitutions { get; set; } = Array.Empty<PathSubstitution>();
+
+ public bool EnableSlowResponseWarning { get; set; } = true;
+
+ public long SlowResponseThresholdMs { get; set; } = 500;
+
+ public string[] CorsHosts { get; set; } = new[] { "*" };
+
+ public int? ActivityLogRetentionDays { get; set; } = 30;
+
+ public int LibraryScanFanoutConcurrency { get; set; }
+
+ public int LibraryMetadataRefreshConcurrency { get; set; }
+
+ public bool AllowClientLogUpload { get; set; } = true;
+
+ public int DummyChapterDuration { get; set; }
+
+ public ImageResolution ChapterImageResolution { get; set; } = ImageResolution.MatchSource;
+
+ public int ParallelImageEncodingLimit { get; set; }
+
+ public CastReceiverApplication[] CastReceiverApplications { get; set; } = Array.Empty<CastReceiverApplication>();
+
+ public TrickplayOptions TrickplayOptions { get; set; } = new TrickplayOptions();
+
+ public bool EnableLegacyAuthorization { get; set; }
+}
diff --git a/MediaBrowser.Model/Configuration/XbmcMetadataOptionsDto.cs b/MediaBrowser.Model/Configuration/XbmcMetadataOptionsDto.cs
new file mode 100644
index 0000000000..ba27381dae
--- /dev/null
+++ b/MediaBrowser.Model/Configuration/XbmcMetadataOptionsDto.cs
@@ -0,0 +1,32 @@
+namespace MediaBrowser.Model.Configuration;
+
+/// <summary>
+/// The XBMC metadata options DTO for API use.
+/// </summary>
+public class XbmcMetadataOptionsDto
+{
+ /// <summary>
+ /// Gets or sets the user id.
+ /// </summary>
+ public string? UserId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the release date format.
+ /// </summary>
+ public string ReleaseDateFormat { get; set; } = "yyyy-MM-dd";
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to save image paths in NFO.
+ /// </summary>
+ public bool SaveImagePathsInNfo { get; set; } = true;
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to enable path substitution.
+ /// </summary>
+ public bool EnablePathSubstitution { get; set; } = true;
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to enable extra thumbs duplication.
+ /// </summary>
+ public bool EnableExtraThumbsDuplication { get; set; }
+}