mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 10:46:11 +00:00
Fix for userdata
Forgot the music check for the database check.
This commit is contained in:
parent
7ce2a01e2b
commit
888e5f2989
1 changed files with 10 additions and 7 deletions
|
@ -854,6 +854,7 @@ class LibrarySync(threading.Thread):
|
||||||
def setUserdata(self, listItems):
|
def setUserdata(self, listItems):
|
||||||
|
|
||||||
dbSyncIndication = utils.settings("dbSyncIndication") == "true"
|
dbSyncIndication = utils.settings("dbSyncIndication") == "true"
|
||||||
|
musicenabled = utils.settings('enableMusicSync') == "true"
|
||||||
|
|
||||||
#show the progress dialog
|
#show the progress dialog
|
||||||
pDialog = None
|
pDialog = None
|
||||||
|
@ -890,12 +891,15 @@ class LibrarySync(threading.Thread):
|
||||||
mediatype = cursorvideo.fetchone()[0]
|
mediatype = cursorvideo.fetchone()[0]
|
||||||
video.append(userdata)
|
video.append(userdata)
|
||||||
except:
|
except:
|
||||||
cursormusic.execute("SELECT media_type FROM emby WHERE emby_id = ?", (itemId,))
|
if musicenabled:
|
||||||
try: # Search music database
|
cursormusic.execute("SELECT media_type FROM emby WHERE emby_id = ?", (itemId,))
|
||||||
self.logMsg("Check the music database.", 1)
|
try: # Search music database
|
||||||
mediatype = cursormusic.fetchone()[0]
|
self.logMsg("Check the music database.", 1)
|
||||||
music.append(userdata)
|
mediatype = cursormusic.fetchone()[0]
|
||||||
except: self.logMsg("Item %s is not found in Kodi database." % itemId, 2)
|
music.append(userdata)
|
||||||
|
except: self.logMsg("Item %s is not found in Kodi database." % itemId, 2)
|
||||||
|
else:
|
||||||
|
self.logMsg("Item %s is not found in Kodi database." % itemId, 2)
|
||||||
|
|
||||||
if len(video) > 0:
|
if len(video) > 0:
|
||||||
connection = connectionvideo
|
connection = connectionvideo
|
||||||
|
@ -922,7 +926,6 @@ class LibrarySync(threading.Thread):
|
||||||
#Process music library
|
#Process music library
|
||||||
count = 1
|
count = 1
|
||||||
total = len(video) + 1
|
total = len(video) + 1
|
||||||
musicenabled = utils.settings('enableMusicSync') == "true"
|
|
||||||
# Process the userdata update for music library
|
# Process the userdata update for music library
|
||||||
if musicenabled:
|
if musicenabled:
|
||||||
for userdata in music:
|
for userdata in music:
|
||||||
|
|
Loading…
Reference in a new issue