Let full_sync finish gracefully on Kodi exit
This commit is contained in:
parent
e37223f016
commit
7830a0e0e3
2 changed files with 6 additions and 1 deletions
|
@ -118,4 +118,5 @@ class GetMetadataTask(backgroundthread.Task, common.libsync_mixin):
|
||||||
self.plex_id)
|
self.plex_id)
|
||||||
else:
|
else:
|
||||||
item['children'] = children_xml
|
item['children'] = children_xml
|
||||||
|
if not self.isCanceled():
|
||||||
self.queue.put(item)
|
self.queue.put(item)
|
||||||
|
|
|
@ -106,4 +106,8 @@ class ProcessMetadata(backgroundthread.KillableThread, common.libsync_mixin):
|
||||||
finally:
|
finally:
|
||||||
if self.dialog:
|
if self.dialog:
|
||||||
self.dialog.close()
|
self.dialog.close()
|
||||||
|
while not self.queue.empty():
|
||||||
|
# We need to empty the queue to let full_sync finish join()
|
||||||
|
self.queue.get()
|
||||||
|
self.queue.task_done()
|
||||||
LOG.debug('Processing thread terminated')
|
LOG.debug('Processing thread terminated')
|
||||||
|
|
Loading…
Reference in a new issue