From bb018c4adc7916fafb7dac2db9a902be8d20e75d Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Wed, 17 Apr 2024 18:44:50 +0200 Subject: Enable nullable for LibraryManager (#11191) --- Jellyfin.Server/Migrations/Routines/RemoveDownloadImagesInAdvance.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Jellyfin.Server/Migrations/Routines/RemoveDownloadImagesInAdvance.cs') diff --git a/Jellyfin.Server/Migrations/Routines/RemoveDownloadImagesInAdvance.cs b/Jellyfin.Server/Migrations/Routines/RemoveDownloadImagesInAdvance.cs index 9137ea234e..52fb93d594 100644 --- a/Jellyfin.Server/Migrations/Routines/RemoveDownloadImagesInAdvance.cs +++ b/Jellyfin.Server/Migrations/Routines/RemoveDownloadImagesInAdvance.cs @@ -42,7 +42,7 @@ namespace Jellyfin.Server.Migrations.Routines } var libraryOptions = virtualFolder.LibraryOptions; - var collectionFolder = (CollectionFolder)_libraryManager.GetItemById(folderId); + var collectionFolder = _libraryManager.GetItemById(folderId) ?? throw new InvalidOperationException("Failed to find CollectionFolder"); // The property no longer exists in LibraryOptions, so we just re-save the options to get old data removed. collectionFolder.UpdateLibraryOptions(libraryOptions); _logger.LogInformation("Removed from '{VirtualFolder}'", virtualFolder.Name); -- cgit v1.2.3