Fix some very few items not being synced
This commit is contained in:
parent
bd1b0cc533
commit
8803d3353c
1 changed files with 4 additions and 1 deletions
|
@ -196,10 +196,13 @@ class FullSync(common.libsync_mixin):
|
||||||
# To keep track of the item-number in order to kill while loops
|
# To keep track of the item-number in order to kill while loops
|
||||||
self.item_count = 0
|
self.item_count = 0
|
||||||
self.current = 0
|
self.current = 0
|
||||||
|
# Initialize only once to avoid loosing the last value before
|
||||||
|
# we're breaking the for loop
|
||||||
|
loop = tag_last(iterator)
|
||||||
while True:
|
while True:
|
||||||
# Check Plex DB to see what we need to add/update
|
# Check Plex DB to see what we need to add/update
|
||||||
with PlexDB() as self.plexdb:
|
with PlexDB() as self.plexdb:
|
||||||
for i, (last, xml_item) in enumerate(tag_last(iterator)):
|
for i, (last, xml_item) in enumerate(loop):
|
||||||
if self.isCanceled():
|
if self.isCanceled():
|
||||||
return False
|
return False
|
||||||
self.process_item(xml_item)
|
self.process_item(xml_item)
|
||||||
|
|
Loading…
Reference in a new issue