From baf3c59aabe5c6f90d4e34f4efcea34462fd09ae Mon Sep 17 00:00:00 2001 From: "Abdulmhsen B. A. A" Date: Sat, 18 Jun 2022 18:12:37 +0300 Subject: [PATCH] added isLocal method to GuidInterface to check whether the given guid local or not. --- src/Backends/Common/GuidInterface.php | 9 +++++++++ src/Backends/Jellyfin/JellyfinGuid.php | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/src/Backends/Common/GuidInterface.php b/src/Backends/Common/GuidInterface.php index 5923c4d7..d001bf89 100644 --- a/src/Backends/Common/GuidInterface.php +++ b/src/Backends/Common/GuidInterface.php @@ -43,4 +43,13 @@ interface GuidInterface * @return bool */ public function has(array $guids, array $context = []): bool; + + /** + * Is the given identifier a local id? + * + * @param string $guid + * + * @return bool + */ + public function isLocal(string $guid): bool; } diff --git a/src/Backends/Jellyfin/JellyfinGuid.php b/src/Backends/Jellyfin/JellyfinGuid.php index 7bf2257f..5ae13118 100644 --- a/src/Backends/Jellyfin/JellyfinGuid.php +++ b/src/Backends/Jellyfin/JellyfinGuid.php @@ -55,6 +55,11 @@ class JellyfinGuid implements iGuid return count($this->ListExternalIds(guids: $guids, context: $context, log: false)) >= 1; } + public function isLocal(string $guid): bool + { + return false; + } + /** * Get All Supported external ids. *