mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 17:56:11 +00:00
fix percentages on thread clean up updates
This commit is contained in:
parent
9e2f789e53
commit
30a9074f71
1 changed files with 4 additions and 4 deletions
|
@ -206,7 +206,7 @@ class Artwork():
|
||||||
result = cursor.fetchall()
|
result = cursor.fetchall()
|
||||||
total = len(result)
|
total = len(result)
|
||||||
count = 1
|
count = 1
|
||||||
percentage = 0.0
|
percentage = 0
|
||||||
self.logMsg("Image cache sync about to process " + str(total) + " images", 1)
|
self.logMsg("Image cache sync about to process " + str(total) + " images", 1)
|
||||||
for url in result:
|
for url in result:
|
||||||
percentage = int((float(count) / float(total))*100)
|
percentage = int((float(count) / float(total))*100)
|
||||||
|
@ -223,7 +223,7 @@ class Artwork():
|
||||||
result = cursor.fetchall()
|
result = cursor.fetchall()
|
||||||
total = len(result)
|
total = len(result)
|
||||||
count = 1
|
count = 1
|
||||||
percentage = 0.0
|
percentage = 0
|
||||||
self.logMsg("Image cache sync about to process " + str(total) + " images", 1)
|
self.logMsg("Image cache sync about to process " + str(total) + " images", 1)
|
||||||
for url in result:
|
for url in result:
|
||||||
percentage = int((float(count) / float(total))*100)
|
percentage = int((float(count) / float(total))*100)
|
||||||
|
@ -233,13 +233,13 @@ class Artwork():
|
||||||
count += 1
|
count += 1
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|
||||||
dialog.update(percentage, message="Waiting for all threads to exit: " + str(len(self.imageCacheThreads)))
|
dialog.update(100, message="Waiting for all threads to exit: " + str(len(self.imageCacheThreads)))
|
||||||
self.logMsg("Waiting for all threads to exit", 1)
|
self.logMsg("Waiting for all threads to exit", 1)
|
||||||
while len(self.imageCacheThreads) > 0:
|
while len(self.imageCacheThreads) > 0:
|
||||||
for thread in self.imageCacheThreads:
|
for thread in self.imageCacheThreads:
|
||||||
if thread.isFinished:
|
if thread.isFinished:
|
||||||
self.imageCacheThreads.remove(thread)
|
self.imageCacheThreads.remove(thread)
|
||||||
dialog.update(percentage, message="Waiting for all threads to exit: " + str(len(self.imageCacheThreads)))
|
dialog.update(100, message="Waiting for all threads to exit: " + str(len(self.imageCacheThreads)))
|
||||||
self.logMsg("Waiting for all threads to exit: " + str(len(self.imageCacheThreads)), 1)
|
self.logMsg("Waiting for all threads to exit: " + str(len(self.imageCacheThreads)), 1)
|
||||||
xbmc.sleep(500)
|
xbmc.sleep(500)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue