From e7e6fbdd31808f7a5ff35eba4b8446290aaa8849 Mon Sep 17 00:00:00 2001 From: Brian Pepple Date: Sun, 27 Sep 2020 11:14:53 -0400 Subject: [PATCH] Move assignment closer to its usage --- jellyfin_kodi/full_sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jellyfin_kodi/full_sync.py b/jellyfin_kodi/full_sync.py index 9c87d0c1..8ce9a7f8 100644 --- a/jellyfin_kodi/full_sync.py +++ b/jellyfin_kodi/full_sync.py @@ -540,11 +540,11 @@ class FullSync(object): settings('MusicRescan.bool', False) if items: - count = 0 - with self.library.music_database_lock if media == 'music' else self.library.database_lock: with Database(media) as kodidb: + count = 0 + if library.media_type == 'mixed': movies = [x for x in items if x[1] == 'Movie']