Fix some "Item not yet synced" errors for playstate updates

This commit is contained in:
croneter 2018-11-05 12:19:08 +01:00
parent 48b78fe73f
commit d2dd631b4b

View file

@ -127,6 +127,9 @@ class FullSync(backgroundthread.KillableThread, common.libsync_mixin):
iterator.get('librarySectionTitle'), iterator.get('librarySectionTitle'),
section['section_id']) section['section_id'])
self.queue.put(queue_info) self.queue.put(queue_info)
# Ensure that the DB connection is closed to commit the
# changes above - avoids "Item not yet synced" error
self.queue.join()
self.process_playstate(iterator) self.process_playstate(iterator)
except RuntimeError: except RuntimeError:
LOG.error('Could not process playstate for section %s', section) LOG.error('Could not process playstate for section %s', section)