Ejemplo n.º 1
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
Ejemplo n.º 2
0
def checkUpdate():
    if utils.isDSF():
        import dsf
        try:    dsf.checkUpdate()
        except: pass
        return
    
    if not FIRSTRUN:
        BASEURL = utils.getBaseURL()
        utils.doBackup()
        utils.downloadDefaults(BASEURL)
        return

    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() + 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() + 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() + 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() + 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() + 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() + 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)
    return
Ejemplo n.º 3
0
PROFILE = utils.PROFILE

AddonID = utils.AddonID
Addon = utils.Addon
epghome = utils.epghome
epgpath = utils.epgpath
extras = utils.extras
logos = utils.logos

DSFID = utils.DSFID
DSF = utils.DSF
DSFVER = utils.DSFVER
home = utils.home
profile = utils.profile

URL = utils.getBaseURL() + 'dsf-update.txt'
FIRSTRUN = utils.getSetting('FIRSTRUN') == 'true'

SkinID = 'skin.bello-dsf'
Skin = xbmcaddon.Addon(SkinID)  # forked bello version: 3.0.8
skinhome = Skin.getAddonInfo('path')


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()
Ejemplo n.º 4
0
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)
Ejemplo n.º 5
0
import sfile
import utilsOTT as utils


ADDON   = utils.ADDON
HOME    = utils.HOME
PROFILE = utils.PROFILE

AddonID = utils.AddonID
Addon   = utils.Addon
epghome = utils.epghome
epgpath = utils.epgpath
extras  = utils.extras
logos   = utils.logos

URL      = utils.getBaseURL() + 'ott-update.txt'
FIRSTRUN = utils.getSetting('FIRSTRUN') == 'true'


def checkUpdate():
    if utils.isDSF():
        import dsf
        try:    dsf.checkUpdate()
        except: pass
        return
    
    if not FIRSTRUN:
        BASEURL = utils.getBaseURL()
        utils.doBackup()
        utils.downloadDefaults(BASEURL)
        return
Ejemplo n.º 6
0
import utilsOTT as utils


ADDON   =  utils.ADDON
HOME    =  utils.HOME
PROFILE =  utils.PROFILE


AddonID = 'script.tvguidedixie'
Addon   =  xbmcaddon.Addon(AddonID)
epghome =  Addon.getAddonInfo('path')
epgpath =  xbmc.translatePath(Addon.getAddonInfo('profile'))
extras  =  os.path.join(epgpath, 'extras')
logos   =  os.path.join(extras, 'logos')

URL      = utils.getBaseURL() + 'ott-update.txt'
FIRSTRUN = utils.getSetting('FIRSTRUN') == 'true'


def checkUpdate():
    if not FIRSTRUN:
        BASEURL = utils.getBaseURL()
        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 utils.isDSF():
            Addon.setSetting('dixie.skin', 'EPG-Skin')
            utils.setSetting('SKIN', 'OTT-Skin')
        
        utils.downloadDefaults(BASEURL)
    
Ejemplo n.º 7
0

ADDON   =  utils.ADDON
HOME    =  utils.HOME
PROFILE =  utils.PROFILE


AddonID = 'script.tvguidedixie'
Addon   =  xbmcaddon.Addon(AddonID)
epghome =  Addon.getAddonInfo('path')
epgpath =  xbmc.translatePath(Addon.getAddonInfo('profile'))
extras  =  os.path.join(epgpath, 'extras')
logos   =  os.path.join(extras, 'logos')

OTTURL   = utils.getSetting('ottv.url').upper()
URL      = utils.getBaseURL(OTTURL) + '/ott-update.txt'
FIRSTRUN = utils.getSetting('FIRSTRUN') == 'true'


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)
Ejemplo n.º 8
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
Ejemplo n.º 9
0
PROFILE = utils.PROFILE

AddonID = utils.AddonID
Addon   = utils.Addon  
epghome = utils.epghome
epgpath = utils.epgpath
extras  = utils.extras 
logos   = utils.logos  

DSFID   = utils.DSFID
DSF     = utils.DSF
DSFVER  = utils.DSFVER
home    = utils.home
profile = utils.profile

URL      =  utils.getBaseURL() + 'dsf-update.txt'
FIRSTRUN =  utils.getSetting('FIRSTRUN') == 'true'

SkinID   = 'skin.bello-dsf'
Skin     =  xbmcaddon.Addon(SkinID) # forked bello version: 3.0.8
skinhome =  Skin.getAddonInfo('path')


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')
Ejemplo n.º 10
0
def checkUpdate():
    if utils.isDSF():
        import dsf
        dsf.checkUpdate()
        return
    
    if not FIRSTRUN:
        BASEURL = utils.getBaseURL()
        utils.DialogOK('Welcome to On-Tapp.TV 3.0', 'We will now install some needed files.', 'This may take a few minutes, so please be patient.')
        utils.doBackup()
        utils.downloadDefaults(BASEURL)
        return
    
    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() + 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() + 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() + 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() + 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() + 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() + 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)
    return
Ejemplo n.º 11
0
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)
Ejemplo n.º 12
0
import sfile
import utilsOTT as utils

ADDON = utils.ADDON
HOME = utils.HOME
PROFILE = utils.PROFILE

AddonID = 'script.tvguidedixie'
Addon = xbmcaddon.Addon(AddonID)
epghome = Addon.getAddonInfo('path')
epgpath = xbmc.translatePath(Addon.getAddonInfo('profile'))
extras = os.path.join(epgpath, 'extras')
logos = os.path.join(extras, 'logos')

OTTURL = utils.getSetting('ottv.url').upper()
URL = utils.getBaseURL(OTTURL) + '/ott-update.txt'
FIRSTRUN = utils.getSetting('FIRSTRUN') == 'true'


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')