From 7ff46c9b19a1e63e84e2ea9998435221afdd0897 Mon Sep 17 00:00:00 2001 From: "Abdulmhsen B. A. A" Date: Wed, 11 May 2022 19:35:26 +0300 Subject: [PATCH] Added com.plexapp.agents.thetvdb identifier for plex tv show parents. to support more RUIDs. --- src/Libs/Mappers/Import/MemoryMapper.php | 10 ++++++++++ src/Libs/Servers/PlexServer.php | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/src/Libs/Mappers/Import/MemoryMapper.php b/src/Libs/Mappers/Import/MemoryMapper.php index decc32a4..baf0807d 100644 --- a/src/Libs/Mappers/Import/MemoryMapper.php +++ b/src/Libs/Mappers/Import/MemoryMapper.php @@ -117,6 +117,16 @@ final class MemoryMapper implements ImportInterface return $this; } + if ($this->inDeepDebugMode()) { + $this->logger->debug( + sprintf('%s: \'%s\'. is identical.', $entity->via, $entity->getName()), + [ + 'backend' => $entity->getAll(), + 'remote' => $entity->getAll(), + ] + ); + } + Data::increment($bucket, $entity->type . '_ignored_no_change'); return $this; diff --git a/src/Libs/Servers/PlexServer.php b/src/Libs/Servers/PlexServer.php index 94b1740a..9d254585 100644 --- a/src/Libs/Servers/PlexServer.php +++ b/src/Libs/Servers/PlexServer.php @@ -58,6 +58,7 @@ class PlexServer implements ServerInterface protected const PARENT_SUPPORTED_LEGACY_AGENTS = [ 'com.plexapp.agents.xbmcnfotv', + 'com.plexapp.agents.thetvdb', ]; protected const WEBHOOK_ALLOWED_TYPES = [ @@ -1599,6 +1600,11 @@ class PlexServer implements ServerInterface } if (true === str_starts_with($val, 'com.plexapp.agents.')) { + // -- Relative UIDs are only supported on episodes parents. + if (false === $isParent && substr_count($val, '/') >= 3) { + continue; + } + $val = $this->parseLegacyAgent($val, $isParent); } @@ -1764,6 +1770,7 @@ class PlexServer implements ServerInterface if (true === $isParent) { $replacer += [ + 'com.plexapp.agents.thetvdb://' => 'com.plexapp.agents.tvdb://', 'com.plexapp.agents.xbmcnfotv://' => 'com.plexapp.agents.tvdb://', ]; }