Fixed postgres sql provider

This commit is contained in:
JPVenson
2025-01-27 18:21:47 +00:00
parent 433640d985
commit ce00bc076e
7 changed files with 9 additions and 19 deletions

View File

@@ -0,0 +1,19 @@
using System;
namespace Jellyfin.Server.Implementations.DatabaseConfiguration;
/// <summary>
/// Options to configure jellyfins managed database.
/// </summary>
public class DatabaseConfigurationOptions
{
/// <summary>
/// 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; }
}

View File

@@ -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;
}