mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Get real full nodes for standard collections
This commit is contained in:
parent
112f636ab2
commit
f1e01fe0a9
1 changed files with 11 additions and 1 deletions
|
@ -1161,6 +1161,16 @@ class LibrarySync():
|
|||
views = views.get("Items")
|
||||
collections=[]
|
||||
for view in views:
|
||||
if view.get("Type") == 'UserView': # Need to grab the real main node
|
||||
newViewsUrl = server + '/mediabrowser/Users/' + userid + '/items?ParentId=' + view.get("Id") + '&SortBy=SortName&SortOrder=Ascending&format=json&ImageTypeLimit=1'
|
||||
jsonData = DownloadUtils().downloadUrl(newViewsUrl, suppress=True, popup=0 )
|
||||
if(jsonData != ""):
|
||||
newViews = json.loads(jsonData)
|
||||
newViews = newViews.get("Items")
|
||||
for newView in newViews:
|
||||
# There are multiple nodes in here like 'Latest', 'NextUp' - below we grab the full node.
|
||||
if newView.get("CollectionType") == "MovieMovies" or newView.get("CollectionType") == "TvShowSeries":
|
||||
view=newView
|
||||
if(view.get("ChildCount") != 0):
|
||||
Name =(view.get("Name")).encode('utf-8')
|
||||
|
||||
|
|
Loading…
Reference in a new issue