Fix AttributeError if Plex key is missing
This commit is contained in:
parent
e3dba1974f
commit
eaff533489
1 changed files with 2 additions and 2 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue