Beispiel #1
0
def install(vers,url):
    import xbmc,xbmcgui,os,re,time
    from resources.lib.modules import downloader2
    addon_folder = xbmc.translatePath('special://home/addons/script.module.supremacy/')
    path = xbmc.translatePath(os.path.join('special://home/addons','packages'))
    dp = xbmcgui.DialogProgress()
    dp.create("[COLOR yellow]supremacy[/COLOR]","Installing Dependency Update v[COLOR aqua]%s[/COLOR]"%vers,'', 'Please Wait')
    lib=os.path.join(path, 'content.zip')
    try:
       os.remove(lib)
    except:
       pass
	   
    import shutil

    shutil.rmtree(addon_folder)
    try:
        downloader2.download(url, lib, dp)
        addonfolder = xbmc.translatePath(os.path.join('special://home','addons'))
        time.sleep(3)
    except:
        xbmcgui.Dialog().ok('[COLOR yellow]supremacy[/COLOR]','Oops..Something Went Wrong Downloading The Update...Try Again')
    dp = xbmcgui.DialogProgress()
    dp.create("[COLOR aqua]supremacy[/COLOR]","Installing Dependency Update Version [COLOR aqua]%s[/COLOR]"%vers,'', 'Please Wait')
    dp.update(0,"", "Installing... Please Wait")
    print '======================================='
    print addonfolder
    print '======================================='
    try:
        unzip(lib,addonfolder,dp)
    except:
        xbmcgui.Dialog().ok('[COLOR yellow]supremacy[/COLOR]','Oops..Something Went Wrong Installing The Update...Try Again')
Beispiel #2
0
def install(vers,url):
    import xbmc,xbmcgui,os,re,time
    from resources.lib.modules import downloader2
    addon_folder = xbmc.translatePath('special://home/addons/script.module.streamhub/')
    path = xbmc.translatePath(os.path.join('special://home/addons','packages'))
    dp = xbmcgui.DialogProgress()
    dp.create("[COLOR red]StreamHub[/COLOR]","Installing Dependency Update v[COLOR red]%s[/COLOR]"%vers,'', 'Please Wait')
    lib=os.path.join(path, 'content.zip')
    try:
       os.remove(lib)
    except:
       pass
	   
    import shutil

    shutil.rmtree(addon_folder)
    try:
        downloader2.download(url, lib, dp)
        addonfolder = xbmc.translatePath(os.path.join('special://home','addons'))
        time.sleep(3)
    except:
        xbmcgui.Dialog().ok('[COLOR red]StreamHub[/COLOR]','Oops..Something Went Wrong Downloading The Update...Try Again')
    dp = xbmcgui.DialogProgress()
    dp.create("[COLOR red]StreamHub[/COLOR]","Installing Dependency Update Version [COLOR red]%s[/COLOR]"%vers,'', 'Please Wait')
    dp.update(0,"", "Installing... Please Wait")
    print '======================================='
    print addonfolder
    print '======================================='
    try:
        unzip(lib,addonfolder,dp)
    except:
        xbmcgui.Dialog().ok('[COLOR red]StreamHub[/COLOR]','Oops..Something Went Wrong Installing The Update...Try Again')
Beispiel #3
0
def install(vers, url):
    import xbmc, xbmcgui, os, re, time
    from resources.lib.modules import downloader2
    path = xbmc.translatePath(os.path.join('special://home/addons',
                                           'packages'))
    dp = xbmcgui.DialogProgress()
    dp.create("[COLOR red]StreamHub[/COLOR]",
              "Installing Dependency Update v[COLOR red]%s[/COLOR]" % vers, '',
              'Please Wait')
    lib = os.path.join(path, 'content.zip')
    try:
        os.remove(lib)
    except:
        pass
    downloader2.download(url, lib, dp)
    addonfolder = xbmc.translatePath(os.path.join('special://home', 'addons'))
    time.sleep(3)
    dp = xbmcgui.DialogProgress()
    dp.create(
        "[COLOR red]StreamHub[/COLOR]",
        "Installing Dependency Update Version [COLOR red]%s[/COLOR]" % vers,
        '', 'Please Wait')
    dp.update(0, "", "Installing... Please Wait")
    print '======================================='
    print addonfolder
    print '======================================='
    unzip(lib, addonfolder, dp)