Jellyfin 11.0.0-PostgreSQL PREVIEW: version bump & defaults
- Update version to 11.0.0-PostgreSQL-PREVIEW in assemblies, installer, and build scripts - Default web directory is now "wwwroot" across all platforms - Configuration manager now creates .example files if missing - Set PostgreSQL as default database with sensible options - Postgres provider ensures database exists before table checks - Add docs for marker conflict fixes and startup.json path issues - Version string in logs/UI uses informational version - Installer output filename and wizard show PREVIEW suffix - Documentation summarizes version bump and verification steps
This commit is contained in:
+22
-2
@@ -17,9 +17,29 @@ public class DatabaseConfigurationOptions
|
||||
/// </summary>
|
||||
public DatabaseConfigurationOptions()
|
||||
{
|
||||
// Default to SQLite if not specified
|
||||
DatabaseType = "Jellyfin-SQLite";
|
||||
// Default to PostgreSQL
|
||||
DatabaseType = "Jellyfin-PostgreSQL";
|
||||
LockingBehavior = DatabaseLockingBehaviorTypes.NoLock;
|
||||
|
||||
// Set up default PostgreSQL configuration
|
||||
CustomProviderOptions = new CustomDatabaseOptions
|
||||
{
|
||||
PluginName = "Jellyfin-PostgreSQL",
|
||||
PluginAssembly = "Jellyfin.Database.Providers.Postgres",
|
||||
ConnectionString = "Host=localhost;Port=5432;Database=jellyfin;Username=jellyfin;Password=jellyfin"
|
||||
};
|
||||
|
||||
// Set up default backup options
|
||||
BackupOptions = new DatabaseBackupOptions
|
||||
{
|
||||
PgDumpPath = "pg_dump",
|
||||
PgRestorePath = "pg_restore",
|
||||
BackupFormat = "custom",
|
||||
IncludeBlobs = true,
|
||||
CompressionLevel = 6,
|
||||
TimeoutSeconds = 1800,
|
||||
VerboseOutput = true
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+14
@@ -34,6 +34,7 @@ public sealed class PostgresDatabaseProvider : IJellyfinDatabaseProvider
|
||||
private readonly IConfigurationManager? configurationManager;
|
||||
private PostgresBackupService? backupService;
|
||||
private string? currentHost;
|
||||
private DatabaseConfigurationOptions? databaseConfig;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PostgresDatabaseProvider"/> class.
|
||||
@@ -93,6 +94,9 @@ public sealed class PostgresDatabaseProvider : IJellyfinDatabaseProvider
|
||||
/// <inheritdoc/>
|
||||
public void Initialise(DbContextOptionsBuilder options, DatabaseConfigurationOptions databaseConfiguration)
|
||||
{
|
||||
// Store the configuration for later use
|
||||
databaseConfig = databaseConfiguration;
|
||||
|
||||
static T? GetOption<T>(ICollection<CustomDatabaseOption>? options, string key, Func<string, T> converter, Func<T>? defaultValue = null)
|
||||
{
|
||||
if (options is null)
|
||||
@@ -337,6 +341,16 @@ public sealed class PostgresDatabaseProvider : IJellyfinDatabaseProvider
|
||||
{
|
||||
try
|
||||
{
|
||||
// First ensure the database itself exists
|
||||
if (databaseConfig is not null)
|
||||
{
|
||||
await EnsureDatabaseExistsAsync(databaseConfig, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogWarning("Database configuration not available. Database existence check skipped.");
|
||||
}
|
||||
|
||||
logger.LogInformation("Checking PostgreSQL database for missing tables...");
|
||||
|
||||
var context = await DbContextFactory!.CreateDbContextAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user