Beispiel #1
0
def downloadLogos(url, path, zipfile):
    import download
    import extract

    utils.DialogOK('Algunos de los nuevos logotipos están disponibles.',
                   'Pueden ser descargados y añadidos a su logopack.')

    download.download(url, zipfile)
    extract.all(zipfile, path, dp='Installing logo update')
    sfile.remove(zipfile)
Beispiel #2
0
def downloadSkins(url, path, zipfile):
    import download
    import extract

    utils.DialogOK('Una nueva version actualizada está disponible.',
                   'Se puede descargar e instalar "," en su sistema GVAX.')

    download.download(url, zipfile)
    extract.all(zipfile, path, dp='Installing skin update')
    sfile.remove(zipfile)
Beispiel #3
0
def doOTTUpdate(url, path, zipfile, ottupdate):
    import download
    import extract

    utils.DialogOK(
        'A GVAX "Live Update" está disponible.',
        'Actualización %s será descargado e instalado en su sistema.' %
        (ottupdate), 'Gracias.')
    download.download(url, zipfile)
    extract.all(zipfile, path, dp='Installing python update')
    sfile.remove(zipfile)
    utils.Log('OTT Update %s installed' % str(ottupdate))
    xbmc.executebuiltin('UpdateLocalAddons')
Beispiel #4
0
def doDSFSkinUpdate(url, path, zipfile, kodiskin):
    import download
    import extract

    utils.DialogOK(
        'Un GVAX es "Live Update" disponible.',
        'Actualización %s será descargado e instalado en su sistema.' %
        (kodiskin), 'Gracias.')

    download.download(url, zipfile)
    extract.all(zipfile, path, dp='Installing skin update')
    sfile.remove(zipfile)
    utils.Log('Skin Update %s installed' % str(kodiskin))
    xbmc.executebuiltin('UpdateLocalAddons')
Beispiel #5
0
def checkUpdate():
    if not FIRSTRUN:
        BASEURL = utils.getBaseURL()
        utils.DialogOK(
            'Bienvenido a GVAX',
            'Ahora vamos a hacer una copia de seguridad de alguno de',
            'los archivos existentes antes de la instalación.')
        doBackup()

        Addon.setSetting('dixie.skin', 'EPG-Skin')
        utils.setSetting('SKIN', 'OTT-Skin')

        downloadDefaults(BASEURL)
        return

    response = getResponse()
    ottskin = response['DSFOTTSkin']
    epgskin = response['DSFEPGSkin']
    logocolour = response['DSFLogos']
    ottupdate = response['DSFOTTUpdate']
    epgupdate = response['DSFEPGUpdate']
    dsfupdate = response['DSFUpdate']
    kodiskin = response['DSFKodiSkin']

    curr = ottskin
    prev = utils.getSetting('DSFOTTSKIN')

    if not prev == curr:
        url = BASEURL + response['DSF OTT Skin']
        path = xbmc.translatePath(PROFILE)
        path = os.path.join(path, 'skins')
        zipfile = os.path.join(path, 'dsf-skin-update.zip')

        if not sfile.exists(path):
            sfile.makedirs(path)

        downloadSkins(url, path, zipfile)
        utils.setSetting('DSFOTTSKIN', curr)

    curr = epgskin
    prev = utils.getSetting('DSFEPGSKIN')

    if not prev == curr:
        url = BASEURL + response['DSF EPG Skin']
        path = os.path.join(extras, 'skins')
        zipfile = os.path.join(path, 'dsf-skin-update.zip')

        if not sfile.exists(path):
            sfile.makedirs(path)

        downloadSkins(url, path, zipfile)
        utils.setSetting('DSFEPGSKIN', curr)

    curr = logocolour
    prev = utils.getSetting('DSFLOGOS')

    if not prev == curr:
        url = BASEURL + response['DSF Logos']
        path = os.path.join(logos, 'Colour Logo Pack')
        zipfile = os.path.join(path, 'dsf-logos-update.zip')

        if not sfile.exists(path):
            sfile.makedirs(path)

        downloadLogos(url, path, zipfile)
        utils.setSetting('DSFLOGOS', curr)

    curr = ottupdate
    prev = utils.getSetting('DSFOTTUPDATE')

    if not prev == curr:
        url = BASEURL + response['DSF OTT Update']
        path = xbmc.translatePath(HOME)
        zipfile = os.path.join(path, 'dsf-ott-python.zip')

        doOTTUpdate(url, path, zipfile, ottupdate)
        utils.setSetting('DSFOTTUPDATE', curr)

    curr = epgupdate
    prev = utils.getSetting('DSFEPGUPDATE')

    if not prev == curr:
        url = BASEURL + response['DSF EPG Update']
        path = xbmc.translatePath(epghome)
        zipfile = os.path.join(path, 'dsf-epg-python.zip')

        if not sfile.exists(path):
            sfile.makedirs(path)

        doEPGUpdate(url, path, zipfile, epgupdate)
        utils.setSetting('DSFEPGUPDATE', curr)

    curr = dsfupdate
    prev = utils.getSetting('DSFUPDATE')

    if not prev == curr:
        url = BASEURL + response['DSF Update']
        path = xbmc.translatePath(home)
        zipfile = os.path.join(path, 'dsf-update.zip')

        if not sfile.exists(path):
            sfile.makedirs(path)

        doDSFUpdate(url, path, zipfile, dsfupdate)
        utils.setSetting('DSFUPDATE', curr)

    curr = kodiskin
    prev = utils.getSetting('DSFKODISKIN')

    if not prev == curr:
        url = BASEURL + response['DSF Kodi Skin']
        path = xbmc.translatePath(skinhome)
        zipfile = os.path.join(path, 'dsf-kodi-skin.zip')

        if not sfile.exists(path):
            sfile.makedirs(path)

        doDSFUpdate(url, path, zipfile, kodiskin)
        utils.setSetting('DSFKODISKIN', curr)

    return
def checkUpdate():
    if not FIRSTRUN:
        BASEURL = utils.getBaseURL(OTTURL)
        utils.DialogOK('Welcome to On-Tapp.TV 3.0',
                       'We will now do a back-up of any',
                       'existing files before installation.')
        utils.doBackup()

        if OTTURL == 'OTHER':
            Addon.setSetting('dixie.url', 'Other')
            Addon.setSetting('dixie.skin', 'EPG-Skin')
            utils.setSetting('SKIN', 'OTT-Skin')

        utils.downloadDefaults(BASEURL)

    else:
        response = getResponse()
        ottskin = response['OTTSkin']
        epgskin = response['EPGSkin']
        logocolour = response['LogoColour']
        logowhite = response['LogoWhite']
        ottupdate = response['OTTUpdate']
        epgupdate = response['EPGUpdate']

        curr = ottskin
        prev = utils.getSetting('OTTSKIN')

        if not prev == curr:
            url = utils.getBaseURL(OTTURL) + response['OTT Skin Link']
            path = xbmc.translatePath(PROFILE)
            path = os.path.join(path, 'skins')
            zipfile = os.path.join(path, 'skin-update.zip')

            if not sfile.exists(path):
                sfile.makedirs(path)

            utils.downloadSkins(url, path, zipfile)
            utils.setSetting('OTTSKIN', curr)

        curr = epgskin
        prev = utils.getSetting('EPGSKIN')

        if not prev == curr:
            url = utils.getBaseURL(OTTURL) + response['EPG Skin Link']
            path = os.path.join(extras, 'skins')
            zipfile = os.path.join(path, 'skin-update.zip')

            if not sfile.exists(path):
                sfile.makedirs(path)

            utils.downloadSkins(url, path, zipfile)
            utils.setSetting('EPGSKIN', curr)

        curr = logocolour
        prev = utils.getSetting('LOGOCOLOUR')

        if not prev == curr:
            url = utils.getBaseURL(OTTURL) + response['Logo Colour']
            path = os.path.join(logos, 'Colour Logo Pack')
            zipfile = os.path.join(path, 'logo-colour-update.zip')

            if not sfile.exists(path):
                sfile.makedirs(path)

            utils.downloadLogos(url, path, zipfile)
            utils.setSetting('LOGOCOLOUR', curr)

        curr = logowhite
        prev = utils.getSetting('LOGOWHITE')

        if not prev == curr:
            url = utils.getBaseURL(OTTURL) + response['Logo White']
            path = os.path.join(logos, 'White Logo Pack')
            zipfile = os.path.join(path, 'logo-white-update.zip')

            if not sfile.exists(path):
                sfile.makedirs(path)

            utils.downloadLogos(url, path, zipfile)
            utils.setSetting('LOGOWHITE', curr)

        curr = ottupdate
        prev = utils.getSetting('OTTUPDATE')

        if not prev == curr:
            url = utils.getBaseURL(OTTURL) + response['OTT Update']
            path = xbmc.translatePath(HOME)
            zipfile = os.path.join(path, 'python-update.zip')

            utils.doOTTUpdate(url, path, zipfile, ottupdate)
            utils.setSetting('OTTUPDATE', curr)

        curr = epgupdate
        prev = utils.getSetting('EPGUPDATE')

        if not prev == curr:
            url = utils.getBaseURL(OTTURL) + response['EPG Update']
            path = xbmc.translatePath(epghome)
            zipfile = os.path.join(path, 'python-update.zip')

            if not sfile.exists(path):
                sfile.makedirs(path)

            utils.doEPGUpdate(url, path, zipfile, epgupdate)
            utils.setSetting('EPGUPDATE', curr)