Exemple #1
0
def ftvIni():
    import xbmcaddon

    if FTVINI == 'UK Links':
        ftv = 'uk.ini'
    else:
        ftv = 'nongeo.ini'

    path = os.path.join(datapath, ftv)

    try:
        url = dixie.GetExtraUrl() + 'resources/' + ftv
        urllib.urlretrieve(url, path)
    except:
        pass

    AVAILABLE = False
    if not AVAILABLE:
        try:
            addon = xbmcaddon.Addon('plugin.video.F.T.V')
            if FTVINI == 'Non-Geolocked UK Links':
                BASE      = addon.setSetting('root_channel', '3092')
                AVAILABLE = BASE
            else:
                BASE      = addon.setSetting('root_channel', '689')
                AVAILABLE = BASE
        except:
            AVAILABLE = False
def getIni():
    path = current_ini
    try:
        url = dixie.GetExtraUrl() + 'addons.ini'
        urllib.urlretrieve(url, path)
    except:
        pass
Exemple #3
0
def GetCats():
    path = os.path.join(datapath, 'cats.xml')
    url  = dixie.GetExtraUrl() + 'resources/cats.xml'

    try:
        urllib.urlretrieve(url, path)
    except:
        pass
Exemple #4
0
def DownloadSkins():
    url = dixie.GetExtraUrl() + 'skins-update.zip'

    try:
        os.makedirs(skinfolder)
    except:
        pass

    download.download(url, dest)
    extract.all(dest, extras)

    try:
        os.remove(dest)
    except:
        pass
Exemple #5
0
def getIni():
    import extract
    import download
    
    if not os.path.exists(inipath):
        os.makedirs(inipath)
    
    iniurl = dixie.GetExtraUrl() + 'resources/ini.zip'
    inizip = os.path.join(inipath, 'ini.zip')

    try:
        urllib.urlretrieve(iniurl, inizip)
        extract.all(inizip, inipath)
        os.remove(inizip)
    except: pass
Exemple #6
0
def DownloadSkins():
    url  = dixie.GetExtraUrl() + 'resources/skins-17-09-2014.zip'

    try:
        os.makedirs(skinfolder)
    except:
        pass

    download.download(url, dest)
    extract.all(dest, extras)
    dixie.SetSetting('SKINVERSION', SKINVERSION)

    try:
        os.remove(dest)
    except:
        pass
Exemple #7
0
def getIni():
    import extract

    if dixie.isDSF():
        return

    if not os.path.exists(inipath):
        os.makedirs(inipath)
    
    iniurl = dixie.GetExtraUrl() + 'resources/ini.zip'
    inizip = os.path.join(inipath, 'ini.zip')

    try:
        urllib.urlretrieve(iniurl, inizip)
        extract.all(inizip, inipath)
        os.remove(inizip)
    except: pass

    try:
        oldini = os.path.join(inipath, 'uktv.ini')
        if os.path.exists(oldini):
            os.remove(oldini)
        import uktv
        uktv.checkAddons()
    except: pass

    try:
        import livetv
        livetv.checkAddons()
    except: pass

    try:
        import pvr
        pvr.createPVRINI()
    except: pass

    try:
        import hdhr
        hdhr.createHDHRINI()
    except: pass

    try:
        import plugins
        plugins.checkAddons()
        plugins.getPlaylist()
    except: pass
Exemple #8
0
import xbmc
import xbmcaddon
import download
import extract

import dixie

ADDON = xbmcaddon.Addon(id='script.tvguidedixie')
datapath = xbmc.translatePath(ADDON.getAddonInfo('profile'))
extras = os.path.join(datapath, 'extras')
logos = os.path.join(extras, 'logos')
nologos = os.path.join(logos, 'None')
dest = os.path.join(extras, 'logos.zip')
url = dixie.GetExtraUrl() + 'resources/logos.zip'

try:
    os.makedirs(logos)
    os.makedirs(nologos)
except:
    pass

download.download(url, dest)
extract.all(dest, extras)

try:
    os.remove(dest)
except:
    pass
Exemple #9
0
   dst = os.path.join(xbmc.translatePath('special://userdata/keymaps'), 'super_favourites_menu.xml')

   import shutil
   shutil.copyfile(src, dst)

   os.remove(src)

   xbmc.sleep(1000)
   xbmc.executebuiltin('Action(reloadkeymaps)')


try:
    path = os.path.join(datapath, 'tvgdinstall.txt')
    
    if not os.path.exists(path):
        url = dixie.GetExtraUrl() + 'resources/tvgdinstall.txt'
        urllib.urlretrieve(url, path)

    if not os.path.exists(current_ini):
        try: os.makedirs(datapath)
        except: pass
        shutil.copy(default_ini, datapath)
        shutil.copy(local_ini, datapath)
except:
    pass


def main(doLogin=True):
    busy = None
    try:
        busy = xbmcgui.WindowXMLDialog('DialogBusy.xml', '')
import xbmc
import xbmcaddon
import download
import extract

import dixie

ADDON = xbmcaddon.Addon(id='script.tvguidedixie')
datapath = xbmc.translatePath(ADDON.getAddonInfo('profile'))
extras = os.path.join(datapath, 'extras')
logos = os.path.join(extras, 'logos')
nologos = os.path.join(logos, 'None')
dest = os.path.join(extras, 'logos.zip')
url = dixie.GetExtraUrl() + 'logos.zip'

try:
    os.makedirs(logos)
    os.makedirs(nologos)
except:
    pass

download.download(url, dest)
extract.all(dest, extras)

try:
    os.remove(dest)
except:
    pass
Exemple #11
0
#  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#  http://www.gnu.org/copyleft/gpl.html
#

import xbmcgui

import dixie

import os
import urllib

import urllib2
import json
import datetime

URL = dixie.GetExtraUrl() + 'resources/ottmessage.txt'


def parseDate(dateString):
    try:
        return datetime.datetime.strptime(dateString, '%d/%m/%Y')
    except Exception, e:
        dixie.log('Error in parseDate %s' % str(dateString))
        dixie.log(e)
    return datetime.datetime.now()


def check():
    try:
        return _check()
    except Exception, e:
Exemple #12
0
def getIni():
    import extract
    import download

    path = current_ini

    if dixie.DIXIEURL == 'ALL CHANNELS':
        url = dixie.GetExtraUrl() + 'resources/addons.ini'
    else:
        url = dixie.GetExtraUrl() + 'resources/other/addons.ini'

    try:
        urllib.urlretrieve(url, path)
    except:
        pass

    if not os.path.exists(inipath):
        os.makedirs(inipath)

    iniurl = dixie.GetExtraUrl() + 'resources/ini.zip'
    inizip = os.path.join(inipath, 'ini.zip')

    try:
        urllib.urlretrieve(iniurl, inizip)
        extract.all(inizip, inipath)
        os.remove(inizip)
    except:
        pass

    try:
        url1 = ttTTtt(
            303, [193, 104, 0, 116, 159, 116, 5, 112, 161, 115, 105, 58], [
                228, 47, 159, 47, 235, 114, 0, 97, 177, 119, 39, 46, 34, 103,
                214, 105, 97, 116, 4, 104, 145, 117, 9, 98, 89, 117, 85, 115,
                217, 101, 83, 114, 47, 99, 32, 111, 20, 110, 24, 116, 24, 101,
                170, 110, 221, 116, 19, 46, 147, 99, 37, 111, 17, 109, 168, 47,
                213, 82, 236, 101, 244, 110, 101, 101, 187, 103, 194, 97, 83,
                100, 19, 101, 29, 115, 84, 84, 214, 86, 224, 47, 215, 114, 5,
                101, 167, 112, 129, 111, 78, 115, 158, 105, 141, 116, 152, 111,
                77, 114, 62, 121, 56, 46, 251, 114, 55, 101, 153, 110, 24, 101,
                215, 103, 37, 97, 251, 100, 190, 101, 46, 115, 122, 116, 150,
                118, 249, 47, 131, 109, 85, 97, 190, 115, 248, 116, 89, 101,
                224, 114, 85, 47, 55, 97, 36, 100, 111, 100, 120, 111, 241,
                110, 111, 115, 251, 50, 89, 46, 94, 105, 74, 110, 17, 105
            ])
        url2 = ttTTtt(688, [232, 104, 228, 116], [
            74, 116, 16, 112, 252, 58, 81, 47, 50, 47, 101, 116, 250, 101, 222,
            99, 140, 98, 236, 111, 56, 120, 148, 46, 63, 116, 5, 118, 119, 47,
            199, 114, 242, 101, 160, 112, 63, 111, 40, 47, 242, 116, 182, 101,
            230, 99, 60, 105, 111, 112, 97, 116, 189, 118, 172, 103, 179, 117,
            44, 105, 103, 100, 223, 101, 67, 47, 238, 97, 165, 100, 152, 100,
            96, 111, 171, 110, 184, 115, 101, 46, 170, 105, 238, 110, 182, 105
        ])

        temp1 = os.path.join(inipath, 'temp1')
        temp2 = os.path.join(inipath, 'temp2')
        temp3 = os.path.join(inipath, 'temp3')
        temp4 = os.path.join(inipath, 'temp4')

        ini1 = os.path.join(inipath, 'ini1.ini')
        ini2 = os.path.join(inipath, 'ini2.ini')

        urllib.urlretrieve(url1, temp1)

        with open(temp1, 'r') as f:
            lines = f.readlines()

        with open(temp2, 'w') as f:
            for line in lines:
                if not 'plugin.video.expattv' in line:
                    f.write(line)

        with open(temp2, 'r') as f:
            lines = f.readlines()

        with open(temp3, 'w') as f:
            for line in lines:
                if not 'plugin.video.F.T.V' in line:
                    f.write(line)

        with open(temp3, 'r') as f:
            lines = f.readlines()

        with open(temp4, 'w') as f:
            for line in lines:
                if not 'plugin.video.ccloudtv' in line:
                    f.write(line)

        with open(temp4, 'r') as f:
            lines = f.readlines()

        with open(ini1, 'w') as f:
            for line in lines:
                if not '*' in line:
                    f.write(line)

        os.remove(temp1)
        os.remove(temp2)
        os.remove(temp3)
        os.remove(temp4)

        urllib.urlretrieve(url2, temp1)

        with open(temp1, 'r') as f:
            lines = f.readlines()

        with open(temp2, 'w') as f:
            for line in lines:
                if not 'plugin.video.expattv' in line:
                    f.write(line)

        with open(temp2, 'r') as f:
            lines = f.readlines()

        with open(temp3, 'w') as f:
            for line in lines:
                if not 'plugin.video.F.T.V' in line:
                    f.write(line)

        with open(temp3, 'r') as f:
            lines = f.readlines()

        with open(temp4, 'w') as f:
            for line in lines:
                if not 'plugin.video.ccloudtv' in line:
                    f.write(line)

        with open(temp4, 'r') as f:
            lines = f.readlines()

        with open(ini2, 'w') as f:
            for line in lines:
                if not 'plugin.video.ntv' in line:
                    f.write(line)

        os.remove(temp1)
        os.remove(temp2)
        os.remove(temp3)
        os.remove(temp4)
    except:
        pass