From 1831b6cbab0781a0d8f4bafc9e018179db0e19a5 Mon Sep 17 00:00:00 2001 From: crobibero Date: Tue, 17 Nov 2020 16:39:47 -0700 Subject: [PATCH] Remove tvdb migration. --- Jellyfin.Server/Migrations/MigrationRunner.cs | 3 +- .../Routines/DownloadTheTvdbPlugin.cs | 63 ------------------- 2 files changed, 1 insertion(+), 65 deletions(-) delete mode 100644 Jellyfin.Server/Migrations/Routines/DownloadTheTvdbPlugin.cs diff --git a/Jellyfin.Server/Migrations/MigrationRunner.cs b/Jellyfin.Server/Migrations/MigrationRunner.cs index ad80604c5..aca165408 100644 --- a/Jellyfin.Server/Migrations/MigrationRunner.cs +++ b/Jellyfin.Server/Migrations/MigrationRunner.cs @@ -24,8 +24,7 @@ namespace Jellyfin.Server.Migrations typeof(Routines.MigrateUserDb), typeof(Routines.ReaddDefaultPluginRepository), typeof(Routines.MigrateDisplayPreferencesDb), - typeof(Routines.RemoveDownloadImagesInAdvance), - typeof(Routines.DownloadTheTvdbPlugin) + typeof(Routines.RemoveDownloadImagesInAdvance) }; /// diff --git a/Jellyfin.Server/Migrations/Routines/DownloadTheTvdbPlugin.cs b/Jellyfin.Server/Migrations/Routines/DownloadTheTvdbPlugin.cs deleted file mode 100644 index 0dfb27bc9..000000000 --- a/Jellyfin.Server/Migrations/Routines/DownloadTheTvdbPlugin.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Linq; -using MediaBrowser.Common.Updates; -using Microsoft.Extensions.Logging; - -namespace Jellyfin.Server.Migrations.Routines -{ - /// - /// Download TheTvdb plugin after update. - /// - public class DownloadTheTvdbPlugin : IMigrationRoutine - { - private readonly Guid _tvdbPluginId = new Guid("a677c0da-fac5-4cde-941a-7134223f14c8"); - private readonly IInstallationManager _installationManager; - private readonly ILogger _logger; - - /// - /// Initializes a new instance of the class. - /// - /// Instance of the interface. - /// Instance of the interface. - public DownloadTheTvdbPlugin(IInstallationManager installationManager, ILogger logger) - { - _installationManager = installationManager; - _logger = logger; - } - - /// - public Guid Id => new Guid("42E45BB4-5D78-4EE2-8C45-9095216D4769"); - - /// - public string Name => "DownloadTheTvdbPlugin"; - - /// - public bool PerformOnNewInstall => false; - - /// - public void Perform() - { - try - { - var packages = _installationManager.GetAvailablePackages().GetAwaiter().GetResult(); - var package = _installationManager.GetCompatibleVersions( - packages, - guid: _tvdbPluginId) - .FirstOrDefault(); - - if (package == null) - { - _logger.LogWarning("TheTVDB Plugin not found, skipping migration."); - return; - } - - _installationManager.InstallPackage(package).GetAwaiter().GetResult(); - _logger.LogInformation("TheTVDB Plugin installed, please restart Jellyfin."); - } - catch (Exception e) - { - _logger.LogWarning(e, "Unable to install TheTVDB Plugin."); - } - } - } -} \ No newline at end of file