aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Configuration
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Configuration')
-rw-r--r--MediaBrowser.Model/Configuration/EncodingOptions.cs4
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs30
2 files changed, 32 insertions, 2 deletions
diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs
index 285ff4ba58..9ae10d9809 100644
--- a/MediaBrowser.Model/Configuration/EncodingOptions.cs
+++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs
@@ -18,7 +18,8 @@ namespace MediaBrowser.Model.Configuration
public string EncoderAppPathDisplay { get; set; }
public string VaapiDevice { get; set; }
public int H264Crf { get; set; }
- public string H264Preset { get; set; }
+ public int H265Crf { get; set; }
+ public string EncoderPreset { get; set; }
public string DeinterlaceMethod { get; set; }
public bool EnableHardwareEncoding { get; set; }
public bool EnableSubtitleExtraction { get; set; }
@@ -34,6 +35,7 @@ namespace MediaBrowser.Model.Configuration
// This is a DRM device that is almost guaranteed to be there on every intel platform, plus it's the default one in ffmpeg if you don't specify anything
VaapiDevice = "/dev/dri/renderD128";
H264Crf = 23;
+ H265Crf = 28;
EnableHardwareEncoding = true;
EnableSubtitleExtraction = true;
HardwareDecodingCodecs = new string[] { "h264", "vc1" };
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index 2673597caa..b8abe49e3e 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -10,6 +10,7 @@ namespace MediaBrowser.Model.Configuration
{
public const int DefaultHttpPort = 8096;
public const int DefaultHttpsPort = 8920;
+ private string _baseUrl;
/// <summary>
/// Gets or sets a value indicating whether [enable u pn p].
@@ -162,7 +163,33 @@ namespace MediaBrowser.Model.Configuration
public bool SkipDeserializationForBasicTypes { get; set; }
public string ServerName { get; set; }
- public string WanDdns { get; set; }
+ public string BaseUrl
+ {
+ get => _baseUrl;
+ set
+ {
+ // Normalize the start of the string
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ // If baseUrl is empty, set an empty prefix string
+ value = string.Empty;
+ }
+ else if (!value.StartsWith("/"))
+ {
+ // If baseUrl was not configured with a leading slash, append one for consistency
+ value = "/" + value;
+ }
+
+ // Normalize the end of the string
+ if (value.EndsWith("/"))
+ {
+ // If baseUrl was configured with a trailing slash, remove it for consistency
+ value = value.Remove(value.Length - 1);
+ }
+
+ _baseUrl = value;
+ }
+ }
public string UICulture { get; set; }
@@ -243,6 +270,7 @@ namespace MediaBrowser.Model.Configuration
SortRemoveCharacters = new[] { ",", "&", "-", "{", "}", "'" };
SortRemoveWords = new[] { "the", "a", "an" };
+ BaseUrl = string.Empty;
UICulture = "en-US";
MetadataOptions = new[]