From eaff533489703cb8a3ac2e7ecc352a0b406e08a9 Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 6 Oct 2017 08:46:05 +0200 Subject: [PATCH] Fix AttributeError if Plex key is missing --- resources/lib/PlexAPI.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 19f27677..9017ec9a 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -1177,9 +1177,9 @@ class API(): def getKey(self): """ - Returns the Plex key such as '/library/metadata/246922' + Returns the Plex key such as '/library/metadata/246922' or empty string """ - return self.item.attrib.get('key') + return self.item.attrib.get('key', '') def getFilePath(self, forceFirstMediaStream=False): """