mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Fix progress display
This commit is contained in:
parent
83e5473e8b
commit
db7de1e333
2 changed files with 10 additions and 7 deletions
|
@ -402,8 +402,9 @@ class LibrarySync(threading.Thread):
|
||||||
heading=lang(29999),
|
heading=lang(29999),
|
||||||
message="%s %s..." % (lang(33017), view_name))
|
message="%s %s..." % (lang(33017), view_name))
|
||||||
|
|
||||||
|
movies.count = 0
|
||||||
for all_movies in mb.get_items(view['id'], "Movie"):
|
for all_movies in mb.get_items(view['id'], "Movie"):
|
||||||
movies.add_all("Movie", all_movies['Items'], view)
|
movies.add_all("Movie", all_movies, view)
|
||||||
|
|
||||||
log.debug("Movies finished.")
|
log.debug("Movies finished.")
|
||||||
return True
|
return True
|
||||||
|
@ -415,6 +416,7 @@ class LibrarySync(threading.Thread):
|
||||||
if pdialog:
|
if pdialog:
|
||||||
pdialog.update(heading=lang(29999), message=lang(33018))
|
pdialog.update(heading=lang(29999), message=lang(33018))
|
||||||
|
|
||||||
|
movies.count = 0
|
||||||
for boxsets in mb.get_items(None, "BoxSet"):
|
for boxsets in mb.get_items(None, "BoxSet"):
|
||||||
movies.add_all("BoxSet", boxsets)
|
movies.add_all("BoxSet", boxsets)
|
||||||
|
|
||||||
|
@ -442,8 +444,9 @@ class LibrarySync(threading.Thread):
|
||||||
message="%s %s..." % (lang(33019), viewName))
|
message="%s %s..." % (lang(33019), viewName))
|
||||||
|
|
||||||
# Initial or repair sync
|
# Initial or repair sync
|
||||||
|
mvideos.count = 0
|
||||||
for all_mvideos in mb.get_items(view['id'], "MusicVideo"):
|
for all_mvideos in mb.get_items(view['id'], "MusicVideo"):
|
||||||
mvideos.add_all("MusicVideo", all_mvideos['Items'], view)
|
mvideos.add_all("MusicVideo", all_mvideos, view)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
log.debug("MusicVideos finished.")
|
log.debug("MusicVideos finished.")
|
||||||
|
@ -468,8 +471,9 @@ class LibrarySync(threading.Thread):
|
||||||
heading=lang(29999),
|
heading=lang(29999),
|
||||||
message="%s %s..." % (lang(33020), view['name']))
|
message="%s %s..." % (lang(33020), view['name']))
|
||||||
|
|
||||||
|
tvshows.count = 0
|
||||||
for all_tvshows in mb.get_items(view['id'], "Series"):
|
for all_tvshows in mb.get_items(view['id'], "Series"):
|
||||||
tvshows.add_all("Series", all_tvshows['Items'], view)
|
tvshows.add_all("Series", all_tvshows, view)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
log.debug("TVShows finished.")
|
log.debug("TVShows finished.")
|
||||||
|
@ -491,8 +495,9 @@ class LibrarySync(threading.Thread):
|
||||||
|
|
||||||
for view in views:
|
for view in views:
|
||||||
|
|
||||||
|
music.count = 0
|
||||||
for all_artists in mb.get_artists(view['id']):
|
for all_artists in mb.get_artists(view['id']):
|
||||||
music.add_all("MusicArtist", all_artists['Items'])
|
music.add_all("MusicArtist", all_artists)
|
||||||
|
|
||||||
log.debug("Finished syncing music")
|
log.debug("Finished syncing music")
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,6 @@ class Items(object):
|
||||||
|
|
||||||
process = self._get_func(item_type, action)
|
process = self._get_func(item_type, action)
|
||||||
self.total = total or len(items)
|
self.total = total or len(items)
|
||||||
self.count = 0
|
|
||||||
|
|
||||||
for item in items:
|
for item in items:
|
||||||
|
|
||||||
|
@ -147,7 +146,6 @@ class Items(object):
|
||||||
# Generator for newly added content
|
# Generator for newly added content
|
||||||
if update:
|
if update:
|
||||||
self.total = total or len(items)
|
self.total = total or len(items)
|
||||||
self.count = 0
|
|
||||||
|
|
||||||
for item in items:
|
for item in items:
|
||||||
|
|
||||||
|
@ -156,8 +154,8 @@ class Items(object):
|
||||||
|
|
||||||
self.title = item.get('Name', "unknown")
|
self.title = item.get('Name', "unknown")
|
||||||
|
|
||||||
yield item
|
|
||||||
self.update_pdialog()
|
self.update_pdialog()
|
||||||
|
yield item
|
||||||
|
|
||||||
if update:
|
if update:
|
||||||
self.count += 1
|
self.count += 1
|
||||||
|
|
Loading…
Reference in a new issue