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.
50 lines
1.6 KiB
C#
50 lines
1.6 KiB
C#
// <copyright file="AddDefaultCastReceivers.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
namespace Jellyfin.Server.Migrations.Routines;
|
|
|
|
using System;
|
|
using MediaBrowser.Controller.Configuration;
|
|
using MediaBrowser.Model.System;
|
|
|
|
/// <summary>
|
|
/// Migration to add the default cast receivers to the system config.
|
|
/// </summary>
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
[JellyfinMigration("2025-04-20T16:00:00", nameof(AddDefaultCastReceivers), "34A1A1C4-5572-418E-A2F8-32CDFE2668E8", RunMigrationOnSetup = true)]
|
|
public class AddDefaultCastReceivers : IMigrationRoutine
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
{
|
|
private readonly IServerConfigurationManager _serverConfigurationManager;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="AddDefaultCastReceivers"/> class.
|
|
/// </summary>
|
|
/// <param name="serverConfigurationManager">Instance of the <see cref="IServerConfigurationManager"/> interface.</param>
|
|
public AddDefaultCastReceivers(IServerConfigurationManager serverConfigurationManager)
|
|
{
|
|
_serverConfigurationManager = serverConfigurationManager;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void Perform()
|
|
{
|
|
_serverConfigurationManager.Configuration.CastReceiverApplications =
|
|
[
|
|
new()
|
|
{
|
|
Id = "F007D354",
|
|
Name = "Stable"
|
|
},
|
|
new()
|
|
{
|
|
Id = "6F511C87",
|
|
Name = "Unstable"
|
|
}
|
|
];
|
|
|
|
_serverConfigurationManager.SaveConfiguration();
|
|
}
|
|
}
|