Enable nullable for LibraryManager (#11191)

This commit is contained in:
Bond-009
2024-04-17 18:44:50 +02:00
committed by GitHub
parent 356e05e3af
commit bb018c4adc
11 changed files with 121 additions and 126 deletions

View File

@@ -42,7 +42,7 @@ namespace Jellyfin.Server.Migrations.Routines
}
var libraryOptions = virtualFolder.LibraryOptions;
var collectionFolder = (CollectionFolder)_libraryManager.GetItemById(folderId);
var collectionFolder = _libraryManager.GetItemById<CollectionFolder>(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);