Fix KeyError for channels if no media streams

- Fixes #253
This commit is contained in:
tomkat83 2017-03-13 20:17:59 +01:00
parent 4328ef9ee0
commit 5687149225

View file

@ -961,7 +961,10 @@ def __build_folder(xml_element, plex_section_id=None):
def __build_item(xml_element): def __build_item(xml_element):
api = API(xml_element) api = API(xml_element)
listitem = api.CreateListItemFromPlexItem() listitem = api.CreateListItemFromPlexItem()
try:
api.AddStreamInfo(listitem) api.AddStreamInfo(listitem)
except:
pass
api.set_listitem_artwork(listitem) api.set_listitem_artwork(listitem)
if (api.getKey().startswith('/system/services') or if (api.getKey().startswith('/system/services') or
api.getKey().startswith('http')): api.getKey().startswith('http')):