diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index bcf484463b..84c1dda971 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Development Jellyfin Server", - "image":"mcr.microsoft.com/devcontainers/dotnet:9.0-bookworm", + "image": "mcr.microsoft.com/devcontainers/dotnet:9.0-bookworm", // restores nuget packages, installs the dotnet workloads and installs the dev https certificate "postStartCommand": "sudo dotnet restore; sudo dotnet workload update; sudo dotnet dev-certs https --trust; sudo bash \"./.devcontainer/install-ffmpeg.sh\"", // reads the extensions list and installs them @@ -13,7 +13,9 @@ }, "ghcr.io/devcontainers-contrib/features/apt-packages:1": { "preserve_apt_list": false, - "packages": ["libfontconfig1"] + "packages": [ + "libfontconfig1" + ] }, "ghcr.io/devcontainers/features/docker-in-docker:2": { "dockerDashComposeVersion": "v2" @@ -24,19 +26,5 @@ "hostRequirements": { "memory": "8gb", "cpus": 4 - }, "remoteEnv": { - "JELLYFIN_DATA_DIR": "/config" - }, - "mounts": [ - "source=/opt/docker/data/jellyfin/testConfig/,target=/config,type=bind,consistency=cached", - "source=/opt/docker/data/jellyfin/config10.9.11/metadata,target=/config/metadata,type=bind,consistency=cached", - "source=/mnt/video,target=/media,type=bind,consistency=cached" - ], - "customizations": { - "vscode": { - "extensions": [ - "alexcvzz.vscode-sqlite" - ] - } } } diff --git a/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs similarity index 100% rename from Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs diff --git a/Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/PostgreSqlOptions.cs similarity index 100% rename from Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/PostgreSqlOptions.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj index ae1497403b..785a3c63ab 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj @@ -45,7 +45,6 @@ - diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs index 8f5e2e82b2..bf949d570b 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs @@ -1,4 +1,3 @@ -using Jellyfin.Database.Providers.SqLite; using Jellyfin.Server.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; @@ -20,7 +19,7 @@ namespace Jellyfin.Database.Providers.PgSql return new JellyfinDbContext( optionsBuilder.Options, NullLogger.Instance, - new SqliteDatabaseProvider(null!, NullLogger.Instance)); + new PgSqlDatabaseProvider(null!, NullLogger.Instance)); } } } diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs index 091ecee987..7936c6fd98 100644 --- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs +++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; +using Jellyfin.Database.Providers.PgSql; using Jellyfin.Database.Providers.SqLite; using Jellyfin.Server.Implementations.DatabaseConfiguration; using MediaBrowser.Common.Configuration; @@ -22,6 +23,7 @@ public static class ServiceCollectionExtensions private static IEnumerable DatabaseProviderTypes() { yield return typeof(SqliteDatabaseProvider); + yield return typeof(PgSqlDatabaseProvider); } private static IDictionary GetSupportedDbProviders() @@ -75,6 +77,7 @@ public static class ServiceCollectionExtensions { DatabaseType = "Jellyfin-SqLite", }; + configurationManager.SaveConfiguration("database", efCoreConfiguration); } } diff --git a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj index b566b3489b..01d9dcf64d 100644 --- a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj +++ b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj @@ -37,6 +37,7 @@ +