From ce191f6eeba5eadb0e1b04f27005fb57285b649d Mon Sep 17 00:00:00 2001 From: croneter Date: Tue, 20 Nov 2018 19:23:42 +0100 Subject: [PATCH] Fix ProgrammingError: Cannot operate on a closed database --- resources/lib/library_sync/full_sync.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/resources/lib/library_sync/full_sync.py b/resources/lib/library_sync/full_sync.py index e5eea5dc..c7f117e5 100644 --- a/resources/lib/library_sync/full_sync.py +++ b/resources/lib/library_sync/full_sync.py @@ -108,11 +108,10 @@ class FullSync(common.libsync_mixin): section['section_id'], self.plex_type) self.queue.put(queue_info) - with PlexDB() as self.plexdb: - for xml_item in iterator: - if self.isCanceled(): - return False - self.process_item(xml_item) + for xml_item in iterator: + if self.isCanceled(): + return False + self.process_item(xml_item) except RuntimeError: LOG.error('Could not entirely process section %s', section) successful = False