Пример #1
0
def popVIP(image):
    path = xbmc.translatePath(os.path.join('special://home/addons/plugin.video.megabox/resources/skins/DefaultSkin','media'))
    popimage=os.path.join(path, 'tempimage.jpg')
    main.downloadFile(image,popimage)
    if xbmc.getCondVisibility('system.platform.ios'):
        if not xbmc.getCondVisibility('system.platform.atv'):
            popup = HUBx('pop1.xml',selfAddon.getAddonInfo('path'),'DefaultSkin',close_time=60,logo_path='%s/resources/skins/DefaultSkin/media/Logo/'%selfAddon.getAddonInfo('path'),)
    if xbmc.getCondVisibility('system.platform.android'):
        popup = HUBx('pop1.xml',selfAddon.getAddonInfo('path'),'DefaultSkin',close_time=60,logo_path='%s/resources/skins/DefaultSkin/media/Logo/'%selfAddon.getAddonInfo('path'))
    else:
        popup = HUBx('pop.xml',selfAddon.getAddonInfo('path'),'DefaultSkin',close_time=60,logo_path='%s/resources/skins/DefaultSkin/media/Logo/'%selfAddon.getAddonInfo('path'))
    popup.doModal()
    del popup
Пример #2
0
def superSearch(encode,type):
    try:
        returnList=[]
        encode = encode.replace('%20',' ')
        try: 
            lib=os.path.join(datapath, 'MBox.zip')
            path=os.path.join(profile,type.lower()+'_lite.json')
            if not os.path.exists(lib) or (os.path.exists(path) and os.stat(path).st_mtime + 86400 < time.time()):
                if main.downloadFile(dataurl,lib,False):
                    xbmc.executebuiltin("XBMC.Extract(%s,%s)"%(lib,profile))
                    time.sleep(.2)
        except: pass
        f = open(path)
        field=json.loads(f.read())
        for data in field:
            if data['active'] == '1':
                thumb=str(data["poster"]).replace("\/'",'/')
                if type == 'Movies':
                    name = str(data["title"].encode('utf-8'))+' ('+str(data["year"])+')'
                    if re.search('(?i)'+encode,name):
                        returnList.append((name,prettyName,'http://mobapps.cc/api/serials/get_movie_data?id='+str(data["id"]),thumb,279,False))
                else:
                    name = str(data["title"].encode('utf-8'))
                    if re.search('(?i)'+encode,name):
                        returnList.append((name,prettyName,data["id"]+'xoxe'+data["seasons"],thumb,280,True))
        return returnList
    except: return []
Пример #3
0
def superSearch(encode, type):
    try:
        returnList = []
        epi = re.search('(?i)s(\d+?)e(\d+?)$', encode)
        if epi:
            epistring = encode.rpartition('%20')[2].upper()
            e = int(epi.group(2))
            s = int(epi.group(1))
            encodewithoutepi = urllib.quote(
                re.sub('(?i)(\ss(\d+)e(\d+))|(Season(.+?)Episode)|(\d+)x(\d+)',
                       '', urllib.unquote(encode)).strip())
            encode = encodewithoutepi
        encode = encode.replace('%20', ' ')
        try:
            lib = os.path.join(datapath, 'MBox.zip')
            path = os.path.join(profile, type.lower() + '_lite.json')
            if not os.path.exists(lib) or (
                    os.path.exists(path)
                    and os.stat(path).st_mtime + 86400 < time.time()):
                if main.downloadFile(dataurl, lib, False):
                    xbmc.executebuiltin("XBMC.Extract(%s,%s)" % (lib, profile))
                    time.sleep(.2)
        except:
            pass
        f = open(path)
        field = json.loads(f.read())
        for data in field:
            if data['active'] == '1':
                thumb = str(data["poster"]).replace("\/'", '/')
                if type == 'Movies':
                    name = str(data["title"].encode('utf-8')) + ' (' + str(
                        data["year"]) + ')'
                    if re.search('(?i)' + encode, name):
                        returnList.append(
                            (name, prettyName,
                             apibase + '/api/serials/get_movie_data?id=' +
                             str(data["id"]), thumb, 279, False))
                else:
                    name = str(data["title"].encode('utf-8'))
                    if re.search('(?i)' + encode, name):
                        if epi:
                            url = apibase + '/api/serials/e?h=' + str(
                                data["id"]) + '&u=' + str(s) + '&y=' + str(e)
                            link = main.OPENURL(url,
                                                ua=useragent,
                                                verbose=False)
                            if link != '[]':
                                returnList.append(
                                    (name + ' ' + epistring, prettyName, url,
                                     thumb, 279, False))
                        else:
                            returnList.append(
                                (name, prettyName,
                                 data["id"] + 'xoxe' + data["seasons"], thumb,
                                 280, True))
        return returnList
    except:
        return []
Пример #4
0
def superSearch(encode, type):
    try:
        returnList = []
        epi = re.search("(?i)s(\d+?)e(\d+?)$", encode)
        if epi:
            epistring = encode.rpartition("%20")[2].upper()
            e = int(epi.group(2))
            s = int(epi.group(1))
            encodewithoutepi = urllib.quote(
                re.sub("(?i)(\ss(\d+)e(\d+))|(Season(.+?)Episode)|(\d+)x(\d+)", "", urllib.unquote(encode)).strip()
            )
            encode = encodewithoutepi
        encode = encode.replace("%20", " ")
        try:
            lib = os.path.join(datapath, "MBox.zip")
            path = os.path.join(profile, type.lower() + "_lite.json")
            if not os.path.exists(lib) or (os.path.exists(path) and os.stat(path).st_mtime + 86400 < time.time()):
                if main.downloadFile(dataurl, lib, False):
                    xbmc.executebuiltin("XBMC.Extract(%s,%s)" % (lib, profile))
                    time.sleep(0.2)
        except:
            pass
        f = open(path)
        field = json.loads(f.read())
        for data in field:
            if data["active"] == "1":
                thumb = str(data["poster"]).replace("\/'", "/")
                if type == "Movies":
                    name = str(data["title"].encode("utf-8")) + " (" + str(data["year"]) + ")"
                    if re.search("(?i)" + encode, name):
                        returnList.append(
                            (
                                name,
                                prettyName,
                                apibase + "/api/serials/get_movie_data?id=" + str(data["id"]),
                                thumb,
                                279,
                                False,
                            )
                        )
                else:
                    name = str(data["title"].encode("utf-8"))
                    if re.search("(?i)" + encode, name):
                        if epi:
                            url = apibase + "/api/serials/e?h=" + str(data["id"]) + "&u=" + str(s) + "&y=" + str(e)
                            link = main.OPENURL(url, ua=useragent, verbose=False)
                            if link != "[]":
                                returnList.append((name + " " + epistring, prettyName, url, thumb, 279, False))
                        else:
                            returnList.append(
                                (name, prettyName, data["id"] + "xoxe" + data["seasons"], thumb, 280, True)
                            )
        return returnList
    except:
        return []
Пример #5
0
def DownloadAndList(type):
    try: 
        lib=os.path.join(datapath, 'MBox.zip')
        path=os.path.join(profile,type.lower()+'_lite.json')
        if not os.path.exists(lib) or (os.path.exists(path) and os.stat(path).st_mtime + 3600 < time.time()):
            if main.downloadFile(dataurl,lib,False):
                xbmc.executebuiltin("XBMC.Extract(%s,%s)"%(lib,profile))
                time.sleep(.2)
                LIST(type)
        elif os.path.exists(path): LIST(type)
    except: pass
Пример #6
0
def MAIN():
    lock_file_path = os.path.join(os.path.join(main.datapath,'Temp'), 'mbox.lock')
    lock_file = main.getFile(lock_file_path)
    if not lock_file:
        try: 
            lib=os.path.join(datapath, 'MBox.zip')
            if main.downloadFile(dataurl,lib,False): xbmc.executebuiltin("XBMC.Extract(%s,%s)"%(lib,profile))
        except: pass
        main.setFile(lock_file_path,'lock')
    main.addDir('First 25 Movies','25movies',278,art+'/mbox.png')
    main.addDir('Movies','movies',278,art+'/mbox.png')
    main.addDir('TV','tv',278,art+'/mbox.png')
    main.addDir('Music','music',278,art+'/mbox.png')
Пример #7
0
def DownloadAndList(type):
    try:
        lib = os.path.join(datapath, 'MBox.zip')
        path = os.path.join(profile, type.lower() + '_lite.json')
        if not os.path.exists(lib) or (
                os.path.exists(path)
                and os.stat(path).st_mtime + 3600 < time.time()):
            if main.downloadFile(dataurl, lib, False):
                xbmc.executebuiltin("XBMC.Extract(%s,%s)" % (lib, profile))
                time.sleep(.2)
                LIST(type)
        elif os.path.exists(path):
            LIST(type)
    except:
        pass
Пример #8
0
def MAIN():
    lock_file_path = os.path.join(os.path.join(main.datapath, "Temp"), "mbox.lock")
    lock_file = main.getFile(lock_file_path)
    if not lock_file:
        try:
            lib = os.path.join(datapath, "MBox.zip")
            if main.downloadFile(dataurl, lib, False):
                xbmc.executebuiltin("XBMC.Extract(%s,%s)" % (lib, profile))
        except:
            pass
        main.setFile(lock_file_path, "lock")
    main.addDir("First 25 Movies", "25movies", 278, art + "/mbox.png")
    main.addDir("Movies", "movies", 278, art + "/mbox.png")
    main.addDir("TV", "tv", 278, art + "/mbox.png")
    main.addDir("Music", "music", 278, art + "/mbox.png")
    main.GA("Plugin", "MBox")
Пример #9
0
def MAIN():
    lock_file_path = os.path.join(os.path.join(main.datapath, 'Temp'),
                                  'mbox.lock')
    lock_file = main.getFile(lock_file_path)
    if not lock_file:
        try:
            lib = os.path.join(datapath, 'MBox.zip')
            if main.downloadFile(dataurl, lib, False):
                xbmc.executebuiltin("XBMC.Extract(%s,%s)" % (lib, profile))
        except:
            pass
        main.setFile(lock_file_path, 'lock')
    main.addDir('First 25 Movies', '25movies', 278, art + '/mbox.png')
    main.addDir('Movies', 'movies', 278, art + '/mbox.png')
    main.addDir('TV', 'tv', 278, art + '/mbox.png')
    main.addDir('Music', 'music', 278, art + '/mbox.png')
    main.GA("Plugin", "MBox")
Пример #10
0
def superSearch(encode, type):
    try:
        returnList = []
        encode = encode.replace('%20', ' ')
        try:
            lib = os.path.join(datapath, 'MBox.zip')
            path = os.path.join(profile, type.lower() + '_lite.json')
            if not os.path.exists(lib) or (
                    os.path.exists(path)
                    and os.stat(path).st_mtime + 86400 < time.time()):
                if main.downloadFile(dataurl, lib, False):
                    xbmc.executebuiltin("XBMC.Extract(%s,%s)" % (lib, profile))
                    time.sleep(.2)
        except:
            pass
        f = open(path)
        field = json.loads(f.read())
        for data in field:
            if data['active'] == '1':
                thumb = str(data["poster"]).replace("\/'", '/')
                if type == 'Movies':
                    name = str(data["title"].encode('utf-8')) + ' (' + str(
                        data["year"]) + ')'
                    if re.search('(?i)' + encode, name):
                        returnList.append(
                            (name, prettyName,
                             apibase + '/api/serials/get_movie_data?id=' +
                             str(data["id"]), thumb, 279, False))
                else:
                    name = str(data["title"].encode('utf-8'))
                    if re.search('(?i)' + encode, name):
                        returnList.append(
                            (name, prettyName,
                             data["id"] + 'xoxe' + data["seasons"], thumb, 280,
                             True))
        return returnList
    except:
        return []
Пример #11
0
def superSearch(encode,type):
    try:
        returnList=[]
        epi = re.search('(?i)s(\d+?)e(\d+?)$',encode)
        if epi:
            epistring = encode.rpartition('%20')[2].upper()
            e = int(epi.group(2))
            s = int(epi.group(1))
            encodewithoutepi = urllib.quote(re.sub('(?i)(\ss(\d+)e(\d+))|(Season(.+?)Episode)|(\d+)x(\d+)','',urllib.unquote(encode)).strip())
            encode=encodewithoutepi
        encode = encode.replace('%20',' ')
        try: 
            lib=os.path.join(datapath, 'MBox.zip')
            path=os.path.join(profile,type.lower()+'_lite.json')
            if not os.path.exists(lib) or (os.path.exists(path) and os.stat(path).st_mtime + 86400 < time.time()):
                if main.downloadFile(dataurl,lib,False):
                    xbmc.executebuiltin("XBMC.Extract(%s,%s)"%(lib,profile))
                    time.sleep(.2)
        except: pass
        f = open(path)
        field=json.loads(f.read())
        for data in field:
            if data['active'] == '1':
                thumb=str(data["poster"]).replace("\/'",'/')
                if type == 'Movies':
                    name = str(data["title"].encode('utf-8'))+' ('+str(data["year"])+')'
                    if re.search('(?i)'+encode,name): returnList.append((name,prettyName,apibase+'/api/serials/get_movie_data?id='+str(data["id"]),thumb,279,False))
                else:
                    name = str(data["title"].encode('utf-8'))
                    if re.search('(?i)'+encode,name):
                        if epi:
                            url = apibase+'/api/serials/e?h='+str(data["id"])+'&u='+str(s)+'&y='+str(e)
                            link = main.OPENURL(url,ua=useragent,verbose=False)
                            if link != '[]': returnList.append((name+' '+epistring,prettyName,url,thumb,279,False))
                        else: returnList.append((name,prettyName,data["id"]+'xoxe'+data["seasons"],thumb,280,True))
        return returnList
    except: return []
Пример #12
0
from t0mm0.common.addon import Addon
from resources.universal import playbackengine, watchhistory
addon_id = 'plugin.video.movie25'
selfAddon = xbmcaddon.Addon(id=addon_id)
addon = Addon('plugin.video.movie25', sys.argv)
art = main.art
    
wh = watchhistory.WatchHistory('plugin.video.movie25')

pyamfpath = xbmc.translatePath(os.path.join('special://home/addons', 'script.module.pyamf'))
try: 
    if not os.path.exists(pyamfpath):
        url = 'https://github.com/mash2k3/MashUpFixes/raw/master/FIXES/script.module.pyamf.zip'
        path = xbmc.translatePath(os.path.join('special://home/addons','packages'))
        lib=os.path.join(path, 'script.module.pyamf.zip')
        if main.downloadFile(url,lib):
            addonfolder = xbmc.translatePath(os.path.join('special://home/addons',''))
            xbmc.executebuiltin("XBMC.Extract(%s,%s)"%(lib,addonfolder))
except: pass

def SKYSPORTS():
        main.addDir('All Videos','http://www1.skysports.com/watch/more/5/27452/200/1',173,art+'/skysports.png')
        main.addDir('Sports','http://www1.skysports.com/watch/tv-shows',178,art+'/skysports.png')
        main.addDir('TV Shows','http://www1.skysports.com/watch/tv-shows',175,art+'/skysports.png')


def SKYSPORTSCAT():
        main.addDir('Sports [COLOR red]All Videos[/COLOR]','http://www1.skysports.com/watch/more/5/28461/200/1',173,art+'/skysports.png')
        main.addDir('Football','football',179,art+'/skysports.png')
        main.addDir('Formula 1','formula-1',179,art+'/skysports.png')
        main.addDir('Cricket','http://www1.skysports.com//watch/video/sports/cricket',176,art+'/skysports.png')
Пример #13
0
addon_id = 'plugin.video.movie25'
selfAddon = xbmcaddon.Addon(id=addon_id)
addon = Addon('plugin.video.movie25', sys.argv)
art = main.art

wh = watchhistory.WatchHistory('plugin.video.movie25')

pyamfpath = xbmc.translatePath(
    os.path.join('special://home/addons', 'script.module.pyamf'))
try:
    if not os.path.exists(pyamfpath):
        url = 'https://github.com/mash2k3/MashUpFixes/raw/master/FIXES/script.module.pyamf.zip'
        path = xbmc.translatePath(
            os.path.join('special://home/addons', 'packages'))
        lib = os.path.join(path, 'script.module.pyamf.zip')
        if main.downloadFile(url, lib):
            addonfolder = xbmc.translatePath(
                os.path.join('special://home/addons', ''))
            xbmc.executebuiltin("XBMC.Extract(%s,%s)" % (lib, addonfolder))
except:
    pass


def SKYSPORTS():
    main.addDir('All Videos',
                'http://www1.skysports.com/watch/more/5/27452/200/1', 173,
                art + '/skysports.png')
    main.addDir('Sports', 'http://www1.skysports.com/watch/tv-shows', 178,
                art + '/skysports.png')
    main.addDir('TV Shows', 'http://www1.skysports.com/watch/tv-shows', 175,
                art + '/skysports.png')