From 433640d98534667602bfaac08ce7cdb600a8377b Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 27 Jan 2025 17:43:34 +0000 Subject: Added pgsql support for jellyfin 🎉 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DatabaseConfigurationOptions.cs | 5 +++ .../DbConfiguration/PostgreSqlOptions.cs | 39 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs (limited to 'Jellyfin.Server.Implementations/DbConfiguration') diff --git a/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs index af2ede7010..d49d8536a3 100644 --- a/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs +++ b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs @@ -11,4 +11,9 @@ public class DatabaseConfigurationOptions /// Gets or Sets the type of database jellyfin should use. /// public required string DatabaseType { get; set; } + + /// + /// Gets or Sets the settings to run jellyfin with Postgres. + /// + public PostgreSqlOptions? PostgreSql { get; set; } } diff --git a/Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs b/Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs new file mode 100644 index 0000000000..1f7c30b098 --- /dev/null +++ b/Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs @@ -0,0 +1,39 @@ +using System; + +namespace Jellyfin.Server.Implementations.DatabaseConfiguration; + +/// +/// Options specific to run jellyfin on a postgreSql database. +/// +public class PostgreSqlOptions +{ + /// + /// Gets or Sets the Port. Defaults to 5432. + /// + public required int Port { get; set; } = 5432; + + /// + /// Gets or Sets the Server name. + /// + public required string ServerName { get; set; } + + /// + /// Gets or Sets the username. + /// + public required string Username { get; set; } + + /// + /// Gets or Sets the password. + /// + public required string Password { get; set; } + + /// + /// Gets or Sets the database name. Defaults to "Jellyfin". + /// + public string DatabaseName { get; set; } = "Jellyfin"; + + /// + /// Gets or Sets the timeout in secounds before a running command is terminated. Defaults to 30. + /// + public int Timeout { get; set; } = 30; +} -- cgit v1.2.3