mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
small changes to progress dialog and working of restart message
This commit is contained in:
parent
960cec8163
commit
7c7b4b375f
3 changed files with 8 additions and 18 deletions
|
@ -136,7 +136,7 @@ class LibrarySync():
|
||||||
#initiate library update and wait for finish before processing any updates
|
#initiate library update and wait for finish before processing any updates
|
||||||
if updateNeeded:
|
if updateNeeded:
|
||||||
if(pDialog != None):
|
if(pDialog != None):
|
||||||
pDialog.update(0, "Processing Movie Updates", "Importing STRM Files")
|
pDialog.update(0, "Processing New Items", "Importing STRM Files")
|
||||||
|
|
||||||
if(pDialog != None and type(pDialog) == xbmcgui.DialogProgressBG):
|
if(pDialog != None and type(pDialog) == xbmcgui.DialogProgressBG):
|
||||||
pDialog.close()
|
pDialog.close()
|
||||||
|
@ -408,6 +408,9 @@ class LibrarySync():
|
||||||
|
|
||||||
#initiate library update and wait for finish before processing any updates
|
#initiate library update and wait for finish before processing any updates
|
||||||
if updateNeeded:
|
if updateNeeded:
|
||||||
|
if(pDialog != None):
|
||||||
|
pDialog.update(0, "Processing New Items", "Importing STRM Files")
|
||||||
|
|
||||||
if(pDialog != None and type(pDialog) == xbmcgui.DialogProgressBG):
|
if(pDialog != None and type(pDialog) == xbmcgui.DialogProgressBG):
|
||||||
pDialog.close()
|
pDialog.close()
|
||||||
|
|
||||||
|
@ -416,20 +419,7 @@ class LibrarySync():
|
||||||
|
|
||||||
if(pDialog != None and type(pDialog) == xbmcgui.DialogProgressBG):
|
if(pDialog != None and type(pDialog) == xbmcgui.DialogProgressBG):
|
||||||
pDialog.create('Sync DB', 'Sync DB')
|
pDialog.create('Sync DB', 'Sync DB')
|
||||||
|
|
||||||
|
|
||||||
#initiate library update and wait for finish before processing any updates
|
|
||||||
if updateNeeded:
|
|
||||||
|
|
||||||
if(pDialog != None and type(pDialog) == xbmcgui.DialogProgressBG):
|
|
||||||
pDialog.close()
|
|
||||||
|
|
||||||
self.doKodiLibraryUpdate(False, pDialog)
|
|
||||||
updateNeeded = False
|
|
||||||
|
|
||||||
if(pDialog != None and type(pDialog) == xbmcgui.DialogProgressBG):
|
|
||||||
pDialog.create('Sync DB', 'Sync DB')
|
|
||||||
|
|
||||||
if(pDialog != None):
|
if(pDialog != None):
|
||||||
progressTitle = "Sync DB : Processing TV Shows"
|
progressTitle = "Sync DB : Processing TV Shows"
|
||||||
pDialog.update(0, progressTitle, "")
|
pDialog.update(0, progressTitle, "")
|
||||||
|
|
|
@ -70,7 +70,7 @@ def checkKodiSources():
|
||||||
rebootRequired = KodiAdvancedSettingsCheck()
|
rebootRequired = KodiAdvancedSettingsCheck()
|
||||||
|
|
||||||
if rebootRequired:
|
if rebootRequired:
|
||||||
ret = xbmcgui.Dialog().yesno(heading="Emby Sync service", line1="A restart of Kodi is needed to apply changes.", line2="Synchronisation will not start before the reboot.", line3="Do you want to reboot now ?")
|
ret = xbmcgui.Dialog().yesno(heading="Emby Sync service", line1="A restart of Kodi is needed to apply changes.", line2="Synchronisation will not start before the restart.", line3="Do you want to restart now?")
|
||||||
if ret:
|
if ret:
|
||||||
xbmc.executebuiltin("RestartApp")
|
xbmc.executebuiltin("RestartApp")
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -144,7 +144,7 @@ class WriteKodiDB():
|
||||||
# if there were movies changes then send the update via JSONRPC
|
# if there were movies changes then send the update via JSONRPC
|
||||||
if(len(params) > 0):
|
if(len(params) > 0):
|
||||||
changes |= True
|
changes |= True
|
||||||
utils.logMsg("UpdateMovieParams", str(params), level = 0)
|
utils.logMsg("UpdateMovieParams", str(params), level = 2)
|
||||||
jsoncommand = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": { "movieid": %i, %s}, "id": 1 }'
|
jsoncommand = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": { "movieid": %i, %s}, "id": 1 }'
|
||||||
paramString = ""
|
paramString = ""
|
||||||
paramLen = len(params)
|
paramLen = len(params)
|
||||||
|
@ -154,7 +154,7 @@ class WriteKodiDB():
|
||||||
if(x < paramLen-1):
|
if(x < paramLen-1):
|
||||||
paramString += ", "
|
paramString += ", "
|
||||||
jsoncommand = jsoncommand %(KodiItem['movieid'], paramString)
|
jsoncommand = jsoncommand %(KodiItem['movieid'], paramString)
|
||||||
utils.logMsg("executeJSONRPC : ", jsoncommand, level = 0)
|
utils.logMsg("executeJSONRPC : ", jsoncommand, level = 2)
|
||||||
xbmc.sleep(sleepVal)
|
xbmc.sleep(sleepVal)
|
||||||
result = xbmc.executeJSONRPC(jsoncommand)
|
result = xbmc.executeJSONRPC(jsoncommand)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue