Filter out playlists from returning in views

New server modification
This commit is contained in:
angelblue05 2016-10-06 23:31:41 -05:00
parent d2b6eaabb3
commit 11b900e18e

View file

@ -327,25 +327,14 @@ class Read_EmbyServer():
else: else:
for item in items: for item in items:
item['Name'] = item['Name'] if item['Type'] in ("Channel", "PlaylistsFolder"):
if item['Type'] == "Channel":
# Filter view types # Filter view types
continue continue
# 3/4/2016 OriginalCollectionType is added # 3/4/2016 OriginalCollectionType is added
itemtype = item.get('OriginalCollectionType', item.get('CollectionType', "mixed")) 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: if sortedlist:
views.append({ views.append({