Commit DB changes for every 200 items

This commit is contained in:
croneter 2018-11-07 10:41:40 +01:00
parent 0db29dd568
commit 8ef0af3ec7

View file

@ -98,6 +98,9 @@ class ProcessMetadata(backgroundthread.KillableThread, common.libsync_mixin):
self.title = item['xml'][0].get('title')
self.update_progressbar()
self.current += 1
if self.current % 200 == 0:
context.plexconn.commit()
context.kodiconn.commit()
self.queue.task_done()
self.queue.task_done()
finally: