diff options
Diffstat (limited to 'Jellyfin.Server')
| -rw-r--r-- | Jellyfin.Server/Helpers/StartupHelpers.cs | 3 | ||||
| -rw-r--r-- | Jellyfin.Server/Migrations/MigrationRunner.cs | 3 | ||||
| -rw-r--r-- | Jellyfin.Server/Migrations/Routines/UpdateDefaultPluginRepository.cs | 52 |
3 files changed, 57 insertions, 1 deletions
diff --git a/Jellyfin.Server/Helpers/StartupHelpers.cs b/Jellyfin.Server/Helpers/StartupHelpers.cs index 66d393dec..5311a30e4 100644 --- a/Jellyfin.Server/Helpers/StartupHelpers.cs +++ b/Jellyfin.Server/Helpers/StartupHelpers.cs @@ -57,6 +57,9 @@ public static class StartupHelpers logger.LogInformation("User Interactive: {IsUserInteractive}", Environment.UserInteractive); logger.LogInformation("Processor count: {ProcessorCount}", Environment.ProcessorCount); logger.LogInformation("Program data path: {ProgramDataPath}", appPaths.ProgramDataPath); + logger.LogInformation("Log directory path: {LogDirectoryPath}", appPaths.LogDirectoryPath); + logger.LogInformation("Config directory path: {ConfigurationDirectoryPath}", appPaths.ConfigurationDirectoryPath); + logger.LogInformation("Cache path: {CachePath}", appPaths.CachePath); logger.LogInformation("Web resources path: {WebPath}", appPaths.WebPath); logger.LogInformation("Application directory: {ApplicationPath}", appPaths.ProgramSystemPath); } diff --git a/Jellyfin.Server/Migrations/MigrationRunner.cs b/Jellyfin.Server/Migrations/MigrationRunner.cs index 757b56a49..44aa43044 100644 --- a/Jellyfin.Server/Migrations/MigrationRunner.cs +++ b/Jellyfin.Server/Migrations/MigrationRunner.cs @@ -43,7 +43,8 @@ namespace Jellyfin.Server.Migrations typeof(Routines.MigrateAuthenticationDb), typeof(Routines.FixPlaylistOwner), typeof(Routines.MigrateRatingLevels), - typeof(Routines.AddDefaultCastReceivers) + typeof(Routines.AddDefaultCastReceivers), + typeof(Routines.UpdateDefaultPluginRepository) }; /// <summary> diff --git a/Jellyfin.Server/Migrations/Routines/UpdateDefaultPluginRepository.cs b/Jellyfin.Server/Migrations/Routines/UpdateDefaultPluginRepository.cs new file mode 100644 index 000000000..7e8c8ac87 --- /dev/null +++ b/Jellyfin.Server/Migrations/Routines/UpdateDefaultPluginRepository.cs @@ -0,0 +1,52 @@ +using System; +using MediaBrowser.Controller.Configuration; + +namespace Jellyfin.Server.Migrations.Routines; + +/// <summary> +/// Migration to update the default Jellyfin plugin repository. +/// </summary> +public class UpdateDefaultPluginRepository : IMigrationRoutine +{ + private const string NewRepositoryUrl = "https://repo.jellyfin.org/files/plugin/manifest.json"; + private const string OldRepositoryUrl = "https://repo.jellyfin.org/releases/plugin/manifest-stable.json"; + + private readonly IServerConfigurationManager _serverConfigurationManager; + + /// <summary> + /// Initializes a new instance of the <see cref="UpdateDefaultPluginRepository"/> class. + /// </summary> + /// <param name="serverConfigurationManager">Instance of the <see cref="IServerConfigurationManager"/> interface.</param> + public UpdateDefaultPluginRepository(IServerConfigurationManager serverConfigurationManager) + { + _serverConfigurationManager = serverConfigurationManager; + } + + /// <inheritdoc /> + public Guid Id => new("852816E0-2712-49A9-9240-C6FC5FCAD1A8"); + + /// <inheritdoc /> + public string Name => "UpdateDefaultPluginRepository10.9"; + + /// <inheritdoc /> + public bool PerformOnNewInstall => true; + + /// <inheritdoc /> + public void Perform() + { + var updated = false; + foreach (var repo in _serverConfigurationManager.Configuration.PluginRepositories) + { + if (string.Equals(repo.Url, OldRepositoryUrl, StringComparison.OrdinalIgnoreCase)) + { + repo.Url = NewRepositoryUrl; + updated = true; + } + } + + if (updated) + { + _serverConfigurationManager.SaveConfiguration(); + } + } +} |
