Fix FutureWarning

This commit is contained in:
croneter 2018-07-07 19:16:33 +02:00
parent 70d809f179
commit 6f38472b17
2 changed files with 2 additions and 2 deletions

View file

@ -321,7 +321,7 @@ def process_websocket(plex_id, status):
delete_kodi_playlist(playlist)
elif playlist:
xml = PL.get_pms_playlist_metadata(plex_id)
if not xml:
if xml is None:
LOG.error('Could not download playlist %s', plex_id)
return
api = API(xml[0])

View file

@ -1218,7 +1218,7 @@ class API(object):
Pass in the collection id of e.g. the movie's metadata
"""
xml = PF.collections(self.library_section_id())
if not xml:
if xml is None:
return []
return [(i.get('index'), i.get('ratingKey')) for i in xml]