2015-06-04, 12:30
Hi all this is the code
This Works Perfectly on a windows system, but refuses to work on RPi running openelec 5.0.8. Can anyone shed any light on the problem plz.
Thanks Community.
Code:
import xbmc
import zipfile
import shutil
import time
oldSD = xbmc.translatePath('special://home/addons/plugin.video.myaddon')
delold = os.path.exists(oldSD)
if delold:
shutil.rmtree(oldSD, ignore_errors=False)
xbmc.executebuiltin("Notification(Old myaddon Removed, Installing Updated Version,()")
else:
xbmc.executebuiltin("Notification(Old Version Already Removed, Installing New Version Now,()")
time.sleep(4)
targetzip = xbmc.translatePath('special://home/userdata/addon_data/plugin.program.super.favourites/Super Favourites/Maintenance/plugin.video.myaddon 2015.zip')
extractto = xbmc.translatePath('special://home/addons/')
fh = open(targetzip, 'rb')
z = zipfile.ZipFile(fh)
for name in z.namelist():
z.extract(name, extractto)
fh.close()
xbmc.executebuiltin("Notification(Alldone, New Version Installed,()")
This Works Perfectly on a windows system, but refuses to work on RPi running openelec 5.0.8. Can anyone shed any light on the problem plz.
Thanks Community.