diff --git a/src/Backends/Jellyfin/JellyfinGuid.php b/src/Backends/Jellyfin/JellyfinGuid.php index 1b0bb0f7..f06bc216 100644 --- a/src/Backends/Jellyfin/JellyfinGuid.php +++ b/src/Backends/Jellyfin/JellyfinGuid.php @@ -24,6 +24,7 @@ class JellyfinGuid implements iGuid 'tmdb' => Guid::GUID_TMDB, 'tvdb' => Guid::GUID_TVDB, 'tvmaze' => Guid::GUID_TVMAZE, + 'tv maze' => Guid::GUID_TVMAZE, //-- why emby? 'tvrage' => Guid::GUID_TVRAGE, 'anidb' => Guid::GUID_ANIDB, 'ytinforeader' => Guid::GUID_YOUTUBE, @@ -267,18 +268,13 @@ class JellyfinGuid implements iGuid $guid[$this->guidMapper[$key]] = $value; } catch (Throwable $e) { if (true === $log) { - $this->logger->error( - message: "{class}: Unhandled exception was thrown during '{client}: {user}@{backend}' {title}parsing '{agent}' identifier. '{error.message}' at '{error.file}:{error.line}'.", + $this->logger->info( + message: "{class}: Ignoring '{user}@{backend}' invalid GUID '{agent}' for {item.type} '{item.id}: {item.title}'.", context: [ 'class' => afterLast(static::class, '\\'), - 'backend' => $this->context->backendName, - 'client' => $this->context->clientName, 'user' => $this->context->userContext->name, + 'backend' => $this->context->backendName, 'agent' => $value, - 'title' => ag_exists($context, 'item.title') ? r( - "'{item.id}: {item.title}'", - $context - ) . ' ' : '', ...$context, ...exception_log($e), ] diff --git a/src/Backends/Plex/PlexGuid.php b/src/Backends/Plex/PlexGuid.php index 598624ed..e587d86d 100644 --- a/src/Backends/Plex/PlexGuid.php +++ b/src/Backends/Plex/PlexGuid.php @@ -418,16 +418,13 @@ final class PlexGuid implements iGuid $guid[$this->guidMapper[$key]] = $value; } catch (Throwable $e) { if (true === $log) { - $this->logger->error( - message: "PlexGuid: Unhandled exception was thrown during '{client}: {backend}' {title}parsing '{agent}' identifier. '{error.message}' at '{error.file}:{error.line}'.", + $this->logger->info( + message: "{class}: Ignoring '{user}@{backend}' invalid GUID '{agent}' for {item.type} '{item.id}: {item.title}'.", context: [ + 'class' => afterLast(self::class, '\\'), + 'user' => $this->context->userContext->name, 'backend' => $this->context->backendName, - 'client' => $this->context->clientName, 'agent' => $val, - 'title' => ag_exists($context, 'item.title') ? r( - "'{item.id}: {item.title}'", - $context - ) . ' ' : '', ...$context, ...exception_log($e), ] diff --git a/tests/Backends/Jellyfin/JellyfinGuidTest.php b/tests/Backends/Jellyfin/JellyfinGuidTest.php index 078a88d6..bdc2d727 100644 --- a/tests/Backends/Jellyfin/JellyfinGuidTest.php +++ b/tests/Backends/Jellyfin/JellyfinGuidTest.php @@ -353,6 +353,12 @@ class JellyfinGuidTest extends TestCase 'none' => '123456', 'imdb' => '' ], $context), 'Assert that the GUID does not exist. for invalid GUIDs.'); + + $this->assertEquals( + [Guid::GUID_TVMAZE => '123456'], + $this->getClass()->parse(['tv maze' => '123456'], $context), + 'Assert "tv maze" get converted to "tvmaze".' + ); } public function test_get()