From 34ebe9b006e0cd3dce5faa4483ba1e29b80d22b0 Mon Sep 17 00:00:00 2001 From: Jason Dove Date: Wed, 19 May 2021 20:15:16 -0500 Subject: [PATCH] handle "other" jellyfin libraries (#192) --- .../Jellyfin/Commands/SynchronizeJellyfinAdminUserIdHandler.cs | 2 +- ErsatzTV.Infrastructure/Jellyfin/JellyfinApiClient.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinAdminUserIdHandler.cs b/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinAdminUserIdHandler.cs index c53d74368..269031372 100644 --- a/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinAdminUserIdHandler.cs +++ b/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinAdminUserIdHandler.cs @@ -57,7 +57,7 @@ namespace ErsatzTV.Application.Jellyfin.Commands return await maybeUserId.Match( userId => { - _logger.LogDebug("Jellyfin admin user id is {UserId}", userId); + // _logger.LogDebug("Jellyfin admin user id is {UserId}", userId); _memoryCache.Set($"jellyfin_admin_user_id.{parameters.JellyfinMediaSource.Id}", userId); return Task.FromResult>(Unit.Default); }, diff --git a/ErsatzTV.Infrastructure/Jellyfin/JellyfinApiClient.cs b/ErsatzTV.Infrastructure/Jellyfin/JellyfinApiClient.cs index a15899ea9..5f19d4feb 100644 --- a/ErsatzTV.Infrastructure/Jellyfin/JellyfinApiClient.cs +++ b/ErsatzTV.Infrastructure/Jellyfin/JellyfinApiClient.cs @@ -196,7 +196,7 @@ namespace ErsatzTV.Infrastructure.Jellyfin } private static Option Project(JellyfinLibraryResponse response) => - response.CollectionType.ToLowerInvariant() switch + response.CollectionType?.ToLowerInvariant() switch { "tvshows" => new JellyfinLibrary {