The Free Software Media System - Server Backend & API
Fixed postgres sql provider
JPVensonce00bc076e9a
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.jsonindex 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.cssimilarity index 100%rename from Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.csrename to Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.csdiff --git a/Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/PostgreSqlOptions.cssimilarity index 100%rename from Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.csrename to Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/PostgreSqlOptions.csdiff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csprojindex 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 @@<ProjectReference Include="..\..\Jellyfin.Data\Jellyfin.Data.csproj" /><ProjectReference Include="..\..\MediaBrowser.Controller\MediaBrowser.Controller.csproj" /><ProjectReference Include="..\..\MediaBrowser.Model\MediaBrowser.Model.csproj" />- <ProjectReference Include="..\..\Jellyfin.Server.Implementations\Jellyfin.Server.Implementations.csproj" /></ItemGroup></Project>diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.csindex 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.PgSqlreturn new JellyfinDbContext(optionsBuilder.Options,NullLogger<JellyfinDbContext>.Instance,- new SqliteDatabaseProvider(null!, NullLogger<SqliteDatabaseProvider>.Instance));+ new PgSqlDatabaseProvider(null!, NullLogger<PgSqlDatabaseProvider>.Instance));}}}diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.csindex 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 ServiceCollectionExtensionsprivate static IEnumerable<Type> DatabaseProviderTypes(){yield return typeof(SqliteDatabaseProvider);+ yield return typeof(PgSqlDatabaseProvider);}private static IDictionary<string, JellyfinDbProviderFactory> 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.csprojindex b566b3489b..01d9dcf64d 100644--- a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj+++ b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj@@ -37,6 +37,7 @@<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" /><ProjectReference Include="..\Jellyfin.Database\Jellyfin.Database.Implementations\Jellyfin.Database.Implementations.csproj" /><ProjectReference Include="..\Jellyfin.Database\Jellyfin.Database.Providers.SqLite\Jellyfin.Database.Providers.SqLite.csproj" />+ <ProjectReference Include="..\Jellyfin.Database\Jellyfin.Database.Providers.PgSql\Jellyfin.Database.Providers.PgSql.csproj" /></ItemGroup></Project>