mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 09:46:11 +00:00
more fancy solution for the episode adds where show doesn't exist yet
This commit is contained in:
parent
025fd31da8
commit
da4b99f989
2 changed files with 12 additions and 12 deletions
|
@ -70,9 +70,8 @@ class LibrarySync():
|
|||
cursor = connection.cursor()
|
||||
|
||||
#Add the special emby table
|
||||
if not startupDone:
|
||||
cursor.execute("CREATE TABLE IF NOT EXISTS emby(emby_id TEXT, kodi_id INTEGER, media_type TEXT, checksum TEXT, parent_id INTEGER)")
|
||||
connection.commit()
|
||||
cursor.execute("CREATE TABLE IF NOT EXISTS emby(emby_id TEXT, kodi_id INTEGER, media_type TEXT, checksum TEXT, parent_id INTEGER)")
|
||||
connection.commit()
|
||||
|
||||
# sync movies
|
||||
self.MoviesFullSync(connection,cursor,pDialog)
|
||||
|
@ -99,9 +98,8 @@ class LibrarySync():
|
|||
cursor = connection.cursor()
|
||||
|
||||
#Add the special emby table
|
||||
if not startupDone:
|
||||
cursor.execute("CREATE TABLE IF NOT EXISTS emby(emby_id TEXT, kodi_id INTEGER, media_type TEXT, checksum TEXT, parent_id INTEGER)")
|
||||
connection.commit()
|
||||
cursor.execute("CREATE TABLE IF NOT EXISTS emby(emby_id TEXT, kodi_id INTEGER, media_type TEXT, checksum TEXT, parent_id INTEGER)")
|
||||
connection.commit()
|
||||
|
||||
self.MusicFullSync(connection,cursor,pDialog)
|
||||
cursor.close()
|
||||
|
@ -575,6 +573,12 @@ class LibrarySync():
|
|||
|
||||
if kodi_show_id:
|
||||
WriteKodiVideoDB().addOrUpdateEpisodeToKodiLibrary(MBitem["Id"], kodi_show_id, connection, cursor)
|
||||
else:
|
||||
#tv show doesn't exist
|
||||
#perform full tvshow sync instead so both the show and episodes get added
|
||||
self.TvShowsFullSync(connection,cursor,None)
|
||||
return
|
||||
|
||||
|
||||
#### PROCESS MUSICVIDEOS ####
|
||||
allEmbyMusicvideos = ReadEmbyDB().getMusicVideos(itemList)
|
||||
|
|
|
@ -163,12 +163,8 @@ class WebSocketThread(threading.Thread):
|
|||
self.logMsg("Message : WebSocket LibraryChanged : Items Updated : " + str(itemsUpdated), 0)
|
||||
self.logMsg("Message : WebSocket LibraryChanged : Items Removed : " + str(itemsRemoved), 0)
|
||||
|
||||
if itemsAdded:
|
||||
self.logMsg("Message : Doing Full LibrarySync")
|
||||
LibrarySync().FullLibrarySync()
|
||||
else:
|
||||
self.remove_items(itemsRemoved)
|
||||
self.update_items(itemsToUpdate)
|
||||
self.remove_items(itemsRemoved)
|
||||
self.update_items(itemsToUpdate)
|
||||
|
||||
elif messageType == "GeneralCommand":
|
||||
|
||||
|
|
Loading…
Reference in a new issue