aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/DbConfiguration
diff options
context:
space:
mode:
authorJPVenson <github@jpb.email>2025-01-27 17:43:34 +0000
committerJPVenson <github@jpb.email>2025-01-27 17:43:34 +0000
commit433640d98534667602bfaac08ce7cdb600a8377b (patch)
tree39377893e80ba8d2708a295bbbe11cd9834c3094 /Jellyfin.Server.Implementations/DbConfiguration
parent844646e2fe6d726edc8e086cc465396303d24f29 (diff)
Added pgsql support for jellyfin 🎉
Diffstat (limited to 'Jellyfin.Server.Implementations/DbConfiguration')
-rw-r--r--Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs5
-rw-r--r--Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs39
2 files changed, 44 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs
index af2ede701..d49d8536a 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.
/// </summary>
public required string DatabaseType { get; set; }
+
+ /// <summary>
+ /// Gets or Sets the settings to run jellyfin with Postgres.
+ /// </summary>
+ 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 000000000..1f7c30b09
--- /dev/null
+++ b/Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs
@@ -0,0 +1,39 @@
+using System;
+
+namespace Jellyfin.Server.Implementations.DatabaseConfiguration;
+
+/// <summary>
+/// Options specific to run jellyfin on a postgreSql database.
+/// </summary>
+public class PostgreSqlOptions
+{
+ /// <summary>
+ /// Gets or Sets the Port. Defaults to 5432.
+ /// </summary>
+ public required int Port { get; set; } = 5432;
+
+ /// <summary>
+ /// Gets or Sets the Server name.
+ /// </summary>
+ public required string ServerName { get; set; }
+
+ /// <summary>
+ /// Gets or Sets the username.
+ /// </summary>
+ public required string Username { get; set; }
+
+ /// <summary>
+ /// Gets or Sets the password.
+ /// </summary>
+ public required string Password { get; set; }
+
+ /// <summary>
+ /// Gets or Sets the database name. Defaults to "Jellyfin".
+ /// </summary>
+ public string DatabaseName { get; set; } = "Jellyfin";
+
+ /// <summary>
+ /// Gets or Sets the timeout in secounds before a running command is terminated. Defaults to 30.
+ /// </summary>
+ public int Timeout { get; set; } = 30;
+}