From c1abe5d00486ceed1723beae867dc72db8093403 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 19 Mar 2016 03:27:38 -0500 Subject: [PATCH 1/2] Use IsFolder key for channels --- resources/lib/entrypoint.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index b565392a..d2ba1c26 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -678,10 +678,9 @@ def BrowseChannels(itemid, folderid=None): itemid = item['Id'] itemtype = item['Type'] li = createListItemFromEmbyItem(item,art,doUtils) - if itemtype == "ChannelFolderItem": - isFolder = True - else: - isFolder = False + + isFolder = item.get('IsFolder', False) + channelId = item.get('ChannelId', "") channelName = item.get('ChannelName', "") if itemtype == "Channel": From a7f70a3145ad76c37302e3e71a3d1a5b328ec0c1 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Wed, 23 Mar 2016 19:50:58 -0500 Subject: [PATCH 2/2] Fix channels root doesn't have an item id - viewname defaults to none. --- resources/lib/entrypoint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index d2ba1c26..11c66f5d 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -509,7 +509,8 @@ def BrowseContent(viewname, type="", folderid=""): if view.get("name") == viewname.decode('utf-8'): folderid = view.get("id") - utils.logMsg("BrowseContent","viewname: %s - type: %s - folderid: %s - filter: %s" %(viewname.decode('utf-8'), type.decode('utf-8'), folderid.decode('utf-8'), filter.decode('utf-8'))) + if viewname is not None: + utils.logMsg("BrowseContent","viewname: %s - type: %s - folderid: %s - filter: %s" %(viewname.decode('utf-8'), type.decode('utf-8'), folderid.decode('utf-8'), filter.decode('utf-8'))) #set the correct params for the content type #only proceed if we have a folderid if folderid: