aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api
diff options
context:
space:
mode:
authorBill Thornton <billt2006@gmail.com>2025-04-11 13:58:34 -0400
committerBill Thornton <billt2006@gmail.com>2025-04-11 13:58:34 -0400
commit874f6895a216fdd9274c1e8a720a8b843274d75c (patch)
tree2630e532c4c17fbd38606e6bde143d99a2927439 /Jellyfin.Api
parentc9720475662fc47f7059d62f3ccc43f58e12c817 (diff)
Add ServerName to startup configuration
Diffstat (limited to 'Jellyfin.Api')
-rw-r--r--Jellyfin.Api/Controllers/StartupController.cs2
-rw-r--r--Jellyfin.Api/Models/StartupDtos/StartupConfigurationDto.cs5
2 files changed, 7 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.cs
index a6bc84311..2278468d9 100644
--- a/Jellyfin.Api/Controllers/StartupController.cs
+++ b/Jellyfin.Api/Controllers/StartupController.cs
@@ -58,6 +58,7 @@ public class StartupController : BaseJellyfinApiController
{
return new StartupConfigurationDto
{
+ ServerName = _config.Configuration.ServerName,
UICulture = _config.Configuration.UICulture,
MetadataCountryCode = _config.Configuration.MetadataCountryCode,
PreferredMetadataLanguage = _config.Configuration.PreferredMetadataLanguage
@@ -74,6 +75,7 @@ public class StartupController : BaseJellyfinApiController
[ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult UpdateInitialConfiguration([FromBody, Required] StartupConfigurationDto startupConfiguration)
{
+ _config.Configuration.ServerName = startupConfiguration.ServerName ?? string.Empty;
_config.Configuration.UICulture = startupConfiguration.UICulture ?? string.Empty;
_config.Configuration.MetadataCountryCode = startupConfiguration.MetadataCountryCode ?? string.Empty;
_config.Configuration.PreferredMetadataLanguage = startupConfiguration.PreferredMetadataLanguage ?? string.Empty;
diff --git a/Jellyfin.Api/Models/StartupDtos/StartupConfigurationDto.cs b/Jellyfin.Api/Models/StartupDtos/StartupConfigurationDto.cs
index 402707819..1ba23339d 100644
--- a/Jellyfin.Api/Models/StartupDtos/StartupConfigurationDto.cs
+++ b/Jellyfin.Api/Models/StartupDtos/StartupConfigurationDto.cs
@@ -6,6 +6,11 @@ namespace Jellyfin.Api.Models.StartupDtos;
public class StartupConfigurationDto
{
/// <summary>
+ /// Gets or sets the server name.
+ /// </summary>
+ public string? ServerName { get; set; }
+
+ /// <summary>
/// Gets or sets UI language culture.
/// </summary>
public string? UICulture { get; set; }