mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Adjust lock modification
This commit is contained in:
parent
66a8a5161a
commit
949714f22a
1 changed files with 39 additions and 39 deletions
|
@ -526,6 +526,7 @@ class UpdatedWorker(threading.Thread):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
|
with self.lock:
|
||||||
with self.database as kodidb:
|
with self.database as kodidb:
|
||||||
with Database('emby') as embydb:
|
with Database('emby') as embydb:
|
||||||
|
|
||||||
|
@ -540,7 +541,6 @@ class UpdatedWorker(threading.Thread):
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
||||||
with self.lock:
|
|
||||||
obj = MEDIA[item['Type']](self.args[0], embydb, kodidb, self.args[1])[item['Type']]
|
obj = MEDIA[item['Type']](self.args[0], embydb, kodidb, self.args[1])[item['Type']]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -570,6 +570,7 @@ class UserDataWorker(threading.Thread):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
|
with self.lock:
|
||||||
with self.database as kodidb:
|
with self.database as kodidb:
|
||||||
with Database('emby') as embydb:
|
with Database('emby') as embydb:
|
||||||
|
|
||||||
|
@ -584,7 +585,6 @@ class UserDataWorker(threading.Thread):
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
||||||
with self.lock:
|
|
||||||
obj = MEDIA[item['Type']](self.args[0], embydb, kodidb, self.args[1])['UserData']
|
obj = MEDIA[item['Type']](self.args[0], embydb, kodidb, self.args[1])['UserData']
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -658,6 +658,7 @@ class RemovedWorker(threading.Thread):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
|
with self.lock:
|
||||||
with self.database as kodidb:
|
with self.database as kodidb:
|
||||||
with Database('emby') as embydb:
|
with Database('emby') as embydb:
|
||||||
|
|
||||||
|
@ -672,7 +673,6 @@ class RemovedWorker(threading.Thread):
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
||||||
with self.lock:
|
|
||||||
obj = MEDIA[item['Type']](self.args[0], embydb, kodidb, self.args[1])['Remove']
|
obj = MEDIA[item['Type']](self.args[0], embydb, kodidb, self.args[1])['Remove']
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue