mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-17 13:46:14 +00:00
Merge remote-tracking branch 'origin/master' into clean-up
This commit is contained in:
commit
dc3dbb202a
6 changed files with 193 additions and 61 deletions
|
@ -131,6 +131,9 @@ class LibrarySync(threading.Thread):
|
|||
# set prop to show we have run for the first time
|
||||
WINDOW.setProperty("startup", "done")
|
||||
|
||||
# tell any widgets to refresh because the content has changed
|
||||
WINDOW.setProperty("widgetreload", datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
|
||||
|
||||
finally:
|
||||
WINDOW.setProperty("SyncDatabaseRunning", "false")
|
||||
utils.logMsg("Sync DB", "syncDatabase Exiting", 0)
|
||||
|
@ -596,6 +599,16 @@ class LibrarySync(threading.Thread):
|
|||
#tv show doesn't exist
|
||||
#perform full tvshow sync instead so both the show and episodes get added
|
||||
self.TvShowsFullSync(connection,cursor,None)
|
||||
|
||||
elif u"Season" in MBitem['Type']:
|
||||
|
||||
#get the tv show
|
||||
cursor.execute("SELECT kodi_id FROM emby WHERE media_type='tvshow' AND emby_id=?", (MBitem["SeriesId"],))
|
||||
result = cursor.fetchone()
|
||||
if result:
|
||||
kodi_show_id = result[0]
|
||||
# update season
|
||||
WriteKodiVideoDB().updateSeasons(MBitem["SeriesId"], kodi_show_id, connection, cursor)
|
||||
|
||||
#### PROCESS BOXSETS ######
|
||||
elif MBitem["Type"] == "BoxSet":
|
||||
|
@ -630,9 +643,10 @@ class LibrarySync(threading.Thread):
|
|||
cursor.close()
|
||||
|
||||
finally:
|
||||
|
||||
xbmc.executebuiltin("UpdateLibrary(video)")
|
||||
WINDOW.setProperty("SyncDatabaseRunning", "false")
|
||||
# tell any widgets to refresh because the content has changed
|
||||
WINDOW.setProperty("widgetreload", datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
|
||||
|
||||
def ShouldStop(self):
|
||||
|
||||
|
@ -673,4 +687,4 @@ class LibrarySync(threading.Thread):
|
|||
# Abort was requested while waiting. We should exit
|
||||
break
|
||||
|
||||
self.logMsg("--- Library Sync Thread stopped ---", 0)
|
||||
self.logMsg("--- Library Sync Thread stopped ---", 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue