aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs32
-rw-r--r--MediaBrowser.Model/System/PublicSystemInfo.cs8
2 files changed, 30 insertions, 10 deletions
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index d64ea35eb9..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,8 +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; 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; }
@@ -244,7 +270,7 @@ namespace MediaBrowser.Model.Configuration
SortRemoveCharacters = new[] { ",", "&", "-", "{", "}", "'" };
SortRemoveWords = new[] { "the", "a", "an" };
- BaseUrl = "jellyfin";
+ BaseUrl = string.Empty;
UICulture = "en-US";
MetadataOptions = new[]
diff --git a/MediaBrowser.Model/System/PublicSystemInfo.cs b/MediaBrowser.Model/System/PublicSystemInfo.cs
index d6e031e427..23f6d378c1 100644
--- a/MediaBrowser.Model/System/PublicSystemInfo.cs
+++ b/MediaBrowser.Model/System/PublicSystemInfo.cs
@@ -9,12 +9,6 @@ namespace MediaBrowser.Model.System
public string LocalAddress { get; set; }
/// <summary>
- /// Gets or sets the wan address.
- /// </summary>
- /// <value>The wan address.</value>
- public string WanAddress { get; set; }
-
- /// <summary>
/// Gets or sets the name of the server.
/// </summary>
/// <value>The name of the server.</value>
@@ -25,7 +19,7 @@ namespace MediaBrowser.Model.System
/// </summary>
/// <value>The version.</value>
public string Version { get; set; }
-
+
/// <summary>
/// The product name. This is the AssemblyProduct name.
/// </summary>