mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
Modify applying patch
First time still requires a restart. Subsequent patches do not.
This commit is contained in:
parent
17fdf0e923
commit
5a63bd43a3
2 changed files with 7 additions and 4 deletions
|
@ -301,6 +301,8 @@ def get_objects(src, filename):
|
||||||
'''
|
'''
|
||||||
temp = xbmc.translatePath('special://temp/emby').decode('utf-8')
|
temp = xbmc.translatePath('special://temp/emby').decode('utf-8')
|
||||||
final = os.path.join(temp, "objects")
|
final = os.path.join(temp, "objects")
|
||||||
|
restart = not xbmcvfs.exists(final + '/') # add slash for verification
|
||||||
|
|
||||||
delete_folder()
|
delete_folder()
|
||||||
|
|
||||||
LOG.info(src)
|
LOG.info(src)
|
||||||
|
@ -325,5 +327,7 @@ def get_objects(src, filename):
|
||||||
try:
|
try:
|
||||||
shutil.copytree(src=os.path.join(extracted, "objects"), dst=final)
|
shutil.copytree(src=os.path.join(extracted, "objects"), dst=final)
|
||||||
delete_folder(extracted)
|
delete_folder(extracted)
|
||||||
|
|
||||||
|
return restart
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
raise
|
raise
|
||||||
|
|
|
@ -149,12 +149,11 @@ class Service(xbmc.Monitor):
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
get_objects(zipfile, label + '.zip')
|
if get_objects(zipfile, label + '.zip'): # no patch applied previously
|
||||||
except Exception as error:
|
|
||||||
LOG.info(error)
|
|
||||||
|
|
||||||
dialog("ok", heading="{emby}", line1=_(33135))
|
dialog("ok", heading="{emby}", line1=_(33135))
|
||||||
xbmc.executebuiltin('RestartApp')
|
xbmc.executebuiltin('RestartApp')
|
||||||
|
except Exception as error:
|
||||||
|
LOG.info(error)
|
||||||
|
|
||||||
def onNotification(self, sender, method, data):
|
def onNotification(self, sender, method, data):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue