Fix logic for nodes
Was accidentally overwriting freshly created nodes
This commit is contained in:
parent
4cdf5c3c4d
commit
77a553b7f7
1 changed files with 3 additions and 3 deletions
|
@ -376,7 +376,7 @@ class LibrarySync(threading.Thread):
|
||||||
url = "{server}/emby/Users/{UserId}/Views?format=json"
|
url = "{server}/emby/Users/{UserId}/Views?format=json"
|
||||||
result = doUtils(url)
|
result = doUtils(url)
|
||||||
grouped_views = result['Items']
|
grouped_views = result['Items']
|
||||||
ordered_views = self.emby.getViews(sortedlist=True)
|
ordered_views = emby.getViews(sortedlist=True)
|
||||||
sorted_views = []
|
sorted_views = []
|
||||||
for view in ordered_views:
|
for view in ordered_views:
|
||||||
if view['type'] == "music":
|
if view['type'] == "music":
|
||||||
|
@ -395,7 +395,7 @@ class LibrarySync(threading.Thread):
|
||||||
|
|
||||||
# total nodes for window properties
|
# total nodes for window properties
|
||||||
vnodes.clearProperties()
|
vnodes.clearProperties()
|
||||||
totalnodes = 0
|
totalnodes = len(sorted_views) + 0
|
||||||
|
|
||||||
current_views = emby_db.getViews()
|
current_views = emby_db.getViews()
|
||||||
# Set views for supported media type
|
# Set views for supported media type
|
||||||
|
@ -495,7 +495,7 @@ class LibrarySync(threading.Thread):
|
||||||
# Delete video node
|
# Delete video node
|
||||||
if mediatype != "musicvideos":
|
if mediatype != "musicvideos":
|
||||||
vnodes.viewNode(
|
vnodes.viewNode(
|
||||||
indexnumber=sorted_views.index(foldername),
|
indexnumber=None,
|
||||||
tagname=current_viewname,
|
tagname=current_viewname,
|
||||||
mediatype=mediatype,
|
mediatype=mediatype,
|
||||||
viewtype=current_viewtype,
|
viewtype=current_viewtype,
|
||||||
|
|
Loading…
Reference in a new issue