Fix AttributeError if Plex key is missing

This commit is contained in:
croneter 2017-10-06 08:46:05 +02:00
parent e3dba1974f
commit eaff533489

View file

@ -1177,9 +1177,9 @@ class API():
def getKey(self): 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): def getFilePath(self, forceFirstMediaStream=False):
""" """