From 11b900e18e259a12cf4decce95398c2812eb4a9e Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Thu, 6 Oct 2016 23:31:41 -0500 Subject: [PATCH] Filter out playlists from returning in views New server modification --- resources/lib/read_embyserver.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/resources/lib/read_embyserver.py b/resources/lib/read_embyserver.py index e24e2604..867be38c 100644 --- a/resources/lib/read_embyserver.py +++ b/resources/lib/read_embyserver.py @@ -327,25 +327,14 @@ class Read_EmbyServer(): else: for item in items: - item['Name'] = item['Name'] - if item['Type'] == "Channel": + if item['Type'] in ("Channel", "PlaylistsFolder"): # Filter view types continue # 3/4/2016 OriginalCollectionType is added itemtype = item.get('OriginalCollectionType', item.get('CollectionType', "mixed")) - - # 11/29/2015 Remove this once OriginalCollectionType is added to stable server. - # Assumed missing is mixed then. - '''if itemtype is None: - url = "{server}/emby/Library/MediaFolders?format=json" - result = self.doUtils(url) - - for folder in result['Items']: - if item['Id'] == folder['Id']: - itemtype = folder.get('CollectionType', "mixed")''' - if item['Name'] not in ('Collections', 'Trailers'): + if item['Name'] not in ('Collections', 'Trailers', 'Playlists'): if sortedlist: views.append({