Adjust lock modification

This commit is contained in:
angelblue05 2018-10-03 17:18:05 -05:00
parent 66a8a5161a
commit 949714f22a

View file

@ -526,6 +526,7 @@ class UpdatedWorker(threading.Thread):
def run(self):
with self.lock:
with self.database as kodidb:
with Database('emby') as embydb:
@ -540,7 +541,6 @@ class UpdatedWorker(threading.Thread):
break
with self.lock:
obj = MEDIA[item['Type']](self.args[0], embydb, kodidb, self.args[1])[item['Type']]
try:
@ -570,6 +570,7 @@ class UserDataWorker(threading.Thread):
def run(self):
with self.lock:
with self.database as kodidb:
with Database('emby') as embydb:
@ -584,7 +585,6 @@ class UserDataWorker(threading.Thread):
break
with self.lock:
obj = MEDIA[item['Type']](self.args[0], embydb, kodidb, self.args[1])['UserData']
try:
@ -658,6 +658,7 @@ class RemovedWorker(threading.Thread):
def run(self):
with self.lock:
with self.database as kodidb:
with Database('emby') as embydb:
@ -672,7 +673,6 @@ class RemovedWorker(threading.Thread):
break
with self.lock:
obj = MEDIA[item['Type']](self.args[0], embydb, kodidb, self.args[1])['Remove']
try: