mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 12:16:12 +00:00
Fix to follow emby views
To follow "my views" presentation
This commit is contained in:
parent
fe5ae9386a
commit
5d74dcedc4
1 changed files with 17 additions and 17 deletions
|
@ -281,7 +281,7 @@ class ReadEmbyDB():
|
||||||
# Build a list of the user views
|
# Build a list of the user views
|
||||||
collections = []
|
collections = []
|
||||||
|
|
||||||
url = "{server}/mediabrowser/Users/{UserId}/Items?Sortby=SortName&format=json"
|
url = "{server}/mediabrowser/Users/{UserId}/Views?format=json" #Items?Sortby=SortName&format=json"
|
||||||
jsondata = self.doUtils.downloadUrl(url)
|
jsondata = self.doUtils.downloadUrl(url)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -289,24 +289,24 @@ class ReadEmbyDB():
|
||||||
except: pass
|
except: pass
|
||||||
else:
|
else:
|
||||||
for item in result:
|
for item in result:
|
||||||
if item['RecursiveItemCount']:
|
|
||||||
name = item['Name']
|
|
||||||
itemtype = item.get('CollectionType')
|
|
||||||
content = itemtype
|
|
||||||
|
|
||||||
if itemtype is None and type in ("movies", "tvshows"):
|
name = item['Name']
|
||||||
# Mixed content or rich presentation is disabled
|
itemtype = item.get('CollectionType')
|
||||||
itemtype = type
|
content = itemtype
|
||||||
content = "mixed"
|
|
||||||
|
|
||||||
if itemtype == type and name != "Collections":
|
if itemtype is None and type in {"movies", "tvshows"}:
|
||||||
collections.append({
|
# Mixed content or rich presentation is disabled
|
||||||
|
itemtype = type
|
||||||
|
content = "mixed"
|
||||||
|
|
||||||
'title': name,
|
if itemtype == type and name != "Collections":
|
||||||
'type': itemtype,
|
collections.append({
|
||||||
'id': item['Id'],
|
|
||||||
'content': content
|
'title': name,
|
||||||
})
|
'type': itemtype,
|
||||||
|
'id': item['Id'],
|
||||||
|
'content': content
|
||||||
|
})
|
||||||
|
|
||||||
return collections
|
return collections
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue