af1152b001
Refactored all C# test files to use explicit namespace declarations and moved all using directives inside the namespace block for consistency. Updated assembly info and cache files to reflect the new build. Adjusted MvcTestingAppManifest.json to use fully qualified assembly names. No functional changes; all updates are related to code style, organization, and project metadata.
51 lines
1.9 KiB
C#
51 lines
1.9 KiB
C#
// <copyright file="UpdateDefaultPluginRepository.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
namespace Jellyfin.Server.Migrations.Routines;
|
|
|
|
using System;
|
|
using MediaBrowser.Controller.Configuration;
|
|
|
|
/// <summary>
|
|
/// Migration to update the default Jellyfin plugin repository.
|
|
/// </summary>
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
[JellyfinMigration("2025-04-20T17:00:00", nameof(UpdateDefaultPluginRepository), "852816E0-2712-49A9-9240-C6FC5FCAD1A8", RunMigrationOnSetup = true)]
|
|
public class UpdateDefaultPluginRepository : IMigrationRoutine
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
{
|
|
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 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();
|
|
}
|
|
}
|
|
}
|