mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +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')
|
||||
final = os.path.join(temp, "objects")
|
||||
restart = not xbmcvfs.exists(final + '/') # add slash for verification
|
||||
|
||||
delete_folder()
|
||||
|
||||
LOG.info(src)
|
||||
|
@ -325,5 +327,7 @@ def get_objects(src, filename):
|
|||
try:
|
||||
shutil.copytree(src=os.path.join(extracted, "objects"), dst=final)
|
||||
delete_folder(extracted)
|
||||
|
||||
return restart
|
||||
except Exception as error:
|
||||
raise
|
||||
|
|
|
@ -149,12 +149,11 @@ class Service(xbmc.Monitor):
|
|||
|
||||
return
|
||||
|
||||
get_objects(zipfile, label + '.zip')
|
||||
if get_objects(zipfile, label + '.zip'): # no patch applied previously
|
||||
dialog("ok", heading="{emby}", line1=_(33135))
|
||||
xbmc.executebuiltin('RestartApp')
|
||||
except Exception as error:
|
||||
LOG.info(error)
|
||||
|
||||
dialog("ok", heading="{emby}", line1=_(33135))
|
||||
xbmc.executebuiltin('RestartApp')
|
||||
|
||||
def onNotification(self, sender, method, data):
|
||||
|
||||
|
|
Loading…
Reference in a new issue