Move assignment closer to its usage

This commit is contained in:
Brian Pepple 2020-09-27 11:14:53 -04:00 committed by Odd Stråbø
parent b110f1cf13
commit e7e6fbdd31

View file

@ -540,11 +540,11 @@ class FullSync(object):
settings('MusicRescan.bool', False) settings('MusicRescan.bool', False)
if items: if items:
count = 0
with self.library.music_database_lock if media == 'music' else self.library.database_lock: with self.library.music_database_lock if media == 'music' else self.library.database_lock:
with Database(media) as kodidb: with Database(media) as kodidb:
count = 0
if library.media_type == 'mixed': if library.media_type == 'mixed':
movies = [x for x in items if x[1] == 'Movie'] movies = [x for x in items if x[1] == 'Movie']