Ejemplo n.º 1
0
def SEARCH():
    dialog = xbmcgui.Dialog()
    ret = dialog.select('[COLOR=FF67cc33][B]Choose A Search Type[/COLOR][/B]',['[B][COLOR=FF67cc33]Series[/COLOR][/B]','[B][COLOR=FF67cc33]Movies[/COLOR][/B]'])
    if ret == -1:
        return
    if ret==0:
        murl='http://api.animeplus.tv/GetAllShows'
        keyb = xbmc.Keyboard('', 'Search For Series')
    else:
        murl='http://api.animeplus.tv/GetAllMovies'
        keyb = xbmc.Keyboard('', 'Search For Movies')
    
    keyb.doModal()
    if (keyb.isConfirmed()):
            search = keyb.getText()
            encode=urllib.quote(search)
            link=main.OPENURL(murl)
            field=json.loads(link)
            for data in field:
                genre=str(data["genres"]).replace("u'",'').replace("'",'').replace("[",'').replace("]",'')
                if encode.lower()in(str(data["name"].encode('utf-8'))).lower():
                    if ret==0:
                        main.addDirMs(str(data["name"].encode('utf-8'))+' [COLOR red]'+str(data["rating"])+'/10[/COLOR] [COLOR blue]'+str(data["released"])+'[/COLOR]','http://api.animeplus.tv/GetDetails/'+str(data["id"]),350,'http://www.animeplus.tv/images/series/big/'+str(data["id"])+'.jpg',str(data["description"].encode('utf-8')),'','',genre,'')
                    else:
                        main.addDirM(str(data["name"].encode('utf-8'))+' [COLOR red]'+str(data["rating"])+'/10[/COLOR] [COLOR blue]'+str(data["released"])+'[/COLOR]','http://api.animeplus.tv/GetDetails/'+str(data["id"]),346,'http://www.animeplus.tv/images/series/big/'+str(data["id"])+'.jpg',str(data["description"].encode('utf-8')),'','',genre,'')
    else:
        return
Ejemplo n.º 2
0
def LISTPOP():
    link=main.OPENURL('http://www.animetoon.tv/updates', mobile=True)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('  ','').replace('>Follow @GoGoAnime</a>','')
    match=re.compile('<tr><td><div><a href="(.+?)">(.+?)</a></div><ul>.+?</ul></td><td><img src="(.+?)" alt="(.+?)" /></td><td>(.+?)</td></tr>',re.DOTALL).findall(link)
    for url,name,thumb,type,date in match:
        if 'Movie' in type: main.addDirMs(name+' [COLOR red]('+date+')[/COLOR] [COLOR blue]'+type+'[/COLOR]',url,381,thumb,'','','','','')
        else: main.addDirMs(name+' [COLOR red]('+date+')[/COLOR] [COLOR blue]'+type+'[/COLOR]',url,377,thumb,'NA','','',thumb,'')
Ejemplo n.º 3
0
def ListglobalFavMs():
        from universal import favorites
        fav = favorites.Favorites(addon_id, sys.argv)
        
        fav_items = fav.get_my_favorites(section_title="Sports Favs", item_mode='addon')
        
        if len(fav_items) > 0 :
        
            for fav_item in fav_items:
                if (fav_item['isfolder'] == 'false'):
                    main.addPlayMs(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
                        fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
                        fav_item['infolabels'].get('year',''))
                else:
                    main.addDirMs(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
                        fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
                        fav_item['infolabels'].get('year',''))
                
        else:
                xbmc.executebuiltin("XBMC.Notification([B][COLOR white]Sports-A-Holic[/COLOR][/B],[B]You Have No Saved Favourites[/B],5000,"")")
        xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
Ejemplo n.º 4
0
def LIST(murl):
    link=main.OPENURL(murl)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('&raquo;','').replace('&rarr;','').replace('  ','')
    match=re.compile("""<a href="([^<]+)"><img src="(.+?)".+?<h3><a href=".+?">(.+?)</a></h3><div><span class="type_indic">(.+?)</span>.+?<div class="descr">(.+?).?<a.+?Released:</span><span class="bold">(.+?)</span>.+?Rating:</span><span class="bold">(.+?)</span>""",re.DOTALL).findall(link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Movie list is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Movies/Shows Cached :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
    dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    for url,thumb,name,type,desc,year,rate in match:
        if 'Movie' in type:
            main.addDirMs(name+' [COLOR red]('+year+') [/COLOR][COLOR blue]'+rate+'[/COLOR] [COLOR tan]'+type+'[/COLOR]',url,381,thumb,desc,'','','','')
        else:
            main.addDirMs(name+' [COLOR red]('+year+') [/COLOR][COLOR blue]'+rate+'[/COLOR] [COLOR tan]'+type+'[/COLOR]',url,377,thumb,desc,'','',thumb,'')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100)/totalLinks
        remaining_display = 'Movies/Episodes Cached :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
        if (dialogWait.iscanceled()):
            return False
    paginate = re.compile('''<a href="([^<]+)">Next</a>''').findall(link)
    if len(paginate)>0:
        main.addDir('Next',paginate[0],376,art+'/next2.png')   
    main.GA("Animania","List")
Ejemplo n.º 5
0
def LIST(murl):
    link=main.OPENURL(murl)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('&raquo;','').replace('&rarr;','').replace('  ','')
    match=re.compile("""<a href="([^<]+)"><img src="(.+?)".+?<h3><a href=".+?">(.+?)</a></h3><div><span class="type_indic">(.+?)</span>.+?<div class="descr">(.+?).?<a.+?Released:</span><span class="bold">(.+?)</span>.+?Rating:</span><span class="bold">(.+?)</span>""",re.DOTALL).findall(link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Movie list is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Movies/Shows Cached :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
    dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    for url,thumb,name,type,desc,year,rate in match:
        if 'Movie' in type:
            main.addDirMs(name+' [COLOR red]('+year+') [/COLOR][COLOR blue]'+rate+'[/COLOR] [COLOR tan]'+type+'[/COLOR]',url,381,thumb,desc,'','','','')
        else:
            main.addDirMs(name+' [COLOR red]('+year+') [/COLOR][COLOR blue]'+rate+'[/COLOR] [COLOR tan]'+type+'[/COLOR]',url,377,thumb,desc,'','',thumb,'')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100)/totalLinks
        remaining_display = 'Movies/Episodes Cached :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
        if (dialogWait.iscanceled()):
            return False
    paginate = re.compile('''<a href="([^<]+)">Next</a>''').findall(link)
    if len(paginate)>0:
        main.addDir('Next',paginate[0],376,art+'/next2.png')   
    main.GA("Animania","List")
Ejemplo n.º 6
0
def SEARCH():
    dialog = xbmcgui.Dialog()
    ret = dialog.select('[COLOR=FF67cc33][B]Choose A Search Type[/COLOR][/B]',['[B][COLOR=FF67cc33]Series[/COLOR][/B]','[B][COLOR=FF67cc33]Movies[/COLOR][/B]'])
    if ret == -1:
        return
    if ret==0:
        murl='http://api.animeplus.tv/GetAllShows'
        keyb = xbmc.Keyboard('', 'Search For Series')
    else:
        murl='http://api.animeplus.tv/GetAllMovies'
        keyb = xbmc.Keyboard('', 'Search For Movies')
    
    keyb.doModal()
    if (keyb.isConfirmed()):
            search = keyb.getText()
            encode=urllib.quote(search)
            link=main.OPENURL(murl)
            field=json.loads(link)
            for data in field:
                genre=str(data["genres"]).replace("u'",'').replace("'",'').replace("[",'').replace("]",'')
                if encode.lower()in(str(data["name"].encode('utf-8'))).lower():
                    if ret==0:
                        main.addDirMs(str(data["name"].encode('utf-8'))+' [COLOR red]'+str(data["rating"])+'/10[/COLOR] [COLOR blue]'+str(data["released"])+'[/COLOR]','http://api.animeplus.tv/GetDetails/'+str(data["id"]),350,'http://www.animeplus.tv/images/series/big/'+str(data["id"])+'.jpg',str(data["description"].encode('utf-8')),'','',genre,'')
                    else:
                        main.addDirM(str(data["name"].encode('utf-8'))+' [COLOR red]'+str(data["rating"])+'/10[/COLOR] [COLOR blue]'+str(data["released"])+'[/COLOR]','http://api.animeplus.tv/GetDetails/'+str(data["id"]),346,'http://www.animeplus.tv/images/series/big/'+str(data["id"])+'.jpg',str(data["description"].encode('utf-8')),'','',genre,'')
    else:
        return
    main.GA("Animania","Search")
Ejemplo n.º 7
0
def LIST(type):
    path = os.path.join(profile, type.replace('25', '') + '_lite.json')
    f = open(path)
    field = json.loads(f.read())
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Content list is cached.')
    if '25movies' in type:
        totalLinks = 25
    else:
        totalLinks = len(field)
    loadedLinks = 0
    remaining_display = 'Content Cached :: [B]' + str(
        loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
    dialogWait.update(0, '[B]Will load instantly from now on[/B]',
                      remaining_display)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    field = sorted(field, key=lambda x: x['poster'], reverse=True)
    try:
        updates = ''
        if 'movies' in type or '25movies' in type:
            path = os.path.join(profile, 'news_movies.json')
        else:
            path = os.path.join(profile, 'news_tv.json')
        updates = open(path).read()
        field = sorted(field,
                       key=lambda word: negtopos(
                           updates.find('"id":' + word['id'] + ',')))
    except:
        pass
    if '25movies' in type:
        field = field[0:25]
    for data in field:
        #genre=str(data["genres"]).replace("u'",'').replace("'",'').replace("[",'').replace("]",'')
        if data['active'] == '1':
            thumb = str(data["poster"]).replace("\/'", '/')
            if 'movies' in type or '25movies' in type:
                main.addDown4(
                    str(data["title"].encode('utf-8')) + ' (' +
                    str(data["year"]) + ')', apibase +
                    '/api/serials/get_movie_data?id=' + str(data["id"]), 279,
                    thumb, '', '', '', '', '')
            elif 'music' in type:
                main.addDirMs(
                    str(data["title"].encode('utf-8')),
                    apibase + '/api/serials/get_artist_data/?id=' +
                    str(data["id"]) + '&type=1', 302, thumb, '', '', '', '',
                    '')
            else:
                main.addDirT(str(data["title"].encode('utf-8')),
                             data["id"] + 'xoxe' + data["seasons"], 280, thumb,
                             '', '', '', '', '')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = 'Content Cached :: [B]' + str(
            loadedLinks) + ' / ' + str(totalLinks) + '[/B].'
        dialogWait.update(percent, '[B]Will load instantly from now on[/B]',
                          remaining_display)
        if dialogWait.iscanceled(): break
    main.GA("Mbox", "List")
    main.VIEWS()
Ejemplo n.º 8
0
def LIST(type):
    path=os.path.join(profile,type.replace('25','')+'_lite.json')
    f = open(path)
    field=json.loads(f.read())
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Content list is cached.')
    if '25movies'in type: totalLinks = 25
    else: totalLinks = len(field)
    loadedLinks = 0
    remaining_display = 'Content Cached :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
    dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    field = sorted(field,key=lambda x:x['poster'],reverse=True)
    try:
        updates = ''
        if 'movies'in type or '25movies'in type: path = os.path.join(profile,'news_movies.json')
        else: path = os.path.join(profile,'news_tv.json')
        updates = open(path).read()
        field = sorted(field,key=lambda word: negtopos(updates.find('"id":'+word['id']+',')))
    except: pass
    if '25movies'in type: field=field[0:25]
    for data in field:
        #genre=str(data["genres"]).replace("u'",'').replace("'",'').replace("[",'').replace("]",'')
        if data['active'] == '1':
            thumb=str(data["poster"]).replace("\/'",'/')
            if 'movies'in type or '25movies'in type: main.addDown4(main.unescapes(str(data["title"].encode('utf-8')))+' ('+str(data["year"])+')',apibase+'/api/serials/get_movie_data?id='+str(data["id"]),279,thumb,'','','','','')
            elif 'music' in type: main.addDirMs(main.unescapes(str(data["title"].encode('utf-8'))),apibase+'/api/serials/get_artist_data/?id='+str(data["id"])+'&type=1',302,thumb,'','','','','')
            else: main.addDirT(main.unescapes(str(data["title"].encode('utf-8'))),data["id"]+'xoxe'+data["seasons"],280,thumb,'','','','','')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100)/totalLinks
        remaining_display = 'Content Cached :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
        if dialogWait.iscanceled(): break
    main.VIEWS()
Ejemplo n.º 9
0
def LISTEPI(mname,murl,pic,desc,thumb):
    link=main.OPENURL(murl, mobile=True)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('  ','').replace('>Follow @GoGoAnime</a>','')
    match=re.compile('<li><a href="([^<]+)">(.+?)</a>.+?<span class="right_text">(.+?)</span>',re.DOTALL).findall(link)
    for url,name,date in match: main.addDirMs(name+' [COLOR red]('+date+')[/COLOR]',url,378,thumb,desc,'','','','')
    paginate = re.compile('''<a href="([^<]+)">Next</a>''').findall(link)
    if len(paginate)>0: main.addDirc('Next',paginate[0],377,art+'/next2.png',desc,'','',thumb,'')
Ejemplo n.º 10
0
def LISTPOP():
    link=main.OPENURL('http://www.animetoon.tv/updates', mobile=True)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('  ','').replace('>Follow @GoGoAnime</a>','')
    match=re.compile('<tr><td><div><a href="(.+?)">(.+?)</a></div><ul>.+?</ul></td><td><img src="(.+?)" alt="(.+?)" /></td><td>(.+?)</td></tr>',re.DOTALL).findall(link)
    for url,name,thumb,type,date in match:
        if 'Movie' in type:
            main.addDirMs(name+' [COLOR red]('+date+')[/COLOR] [COLOR blue]'+type+'[/COLOR]',url,381,thumb,'','','','','')
        else:
            main.addDirMs(name+' [COLOR red]('+date+')[/COLOR] [COLOR blue]'+type+'[/COLOR]',url,377,thumb,'NA','','',thumb,'')
Ejemplo n.º 11
0
def LISTEPI(mname,murl,pic,desc,thumb):
    link=main.OPENURL(murl, mobile=True)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('  ','').replace('>Follow @GoGoAnime</a>','')
    match=re.compile('<li><a href="([^<]+)">(.+?)</a>.+?<span class="right_text">(.+?)</span>',re.DOTALL).findall(link)
    for url,name,date in match:
        main.addDirMs(name+' [COLOR red]('+date+')[/COLOR]',url,378,thumb,desc,'','','','')
    paginate = re.compile('''<a href="([^<]+)">Next</a>''').findall(link)
    if len(paginate)>0:
        main.addDirc('Next',paginate[0],377,art+'/next2.png',desc,'','',thumb,'')
Ejemplo n.º 12
0
def LIST(mname,murl):
    items=[]
    i=0
    if 'http' in murl:
        text = main.OPENURL(murl)
    else:
        f = open(murl)
        text = f.read()
    match=re.compile('<title>([^<]+)</title.+?link>(.+?)</link.+?thumbnail>([^<]+)</thumbnail>',re.DOTALL).findall(text)
    for name,url,thumb in match:
        if '</sublink>' in url:
            main.addDirMs(name,url,266,thumb,'','','','','')
        else:
            main.addPlayMs(name,url,240,thumb,'','','','','')
Ejemplo n.º 13
0
def MList(mname,murl):
        mname  = mname.split('[C')[0]
        link=main.OPENURL(murl)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        r=re.findall('<poster>(.+?)</poster>',link)
        if r:
                vip=r[0]
        else:
                vip='Unknown'
        f=re.findall('<fanart>(.+?)</fanart>',link)
        if f:
                fan=f[0]
        else:
                fan=art+'/fanart2.jpg'
        info=re.findall('<info><message>(.+?)</message><thumbnail>(.+?)</thumbnail></info>',link)
        if info:
            for msg,pic in info:
                main.addLink(msg,'',pic)
        popup=re.compile('<popup><name>([^<]+)</name.+?popImage>([^<]+)</popImage.+?thumbnail>([^<]+)</thumbnail></popup>').findall(link)
        for name,image,thumb in popup:
                main.addPlayc(name,image,244,thumb,'',fan,'','','')
                
        directory=re.compile('<dir><name>([^<]+)</name.+?link>([^<]+)</link.+?thumbnail>([^<]+)</thumbnail></dir>').findall(link)
        for name,url,thumb in directory:
                main.addDirb(name,url,236,thumb,fan)
        
        match=re.compile('<title>([^<]+)</title.+?link>(.+?)</link.+?thumbnail>([^<]+)</thumbnail>').findall(link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Movie list is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
        for name,url,thumb in match:
                
                if '</sublink>' in url:
                        main.addDirMs(name+' [COLOR blue]'+vip+'[/COLOR]',url,249,thumb,'',fan,'','','')
                        
                else:        
                        main.addPlayMs(name+' [COLOR blue]'+vip+'[/COLOR]',url,237,thumb,'',fan,'','','')
                loadedLinks = loadedLinks + 1
                percent = (loadedLinks * 100)/totalLinks
                remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
                dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
                if (dialogWait.iscanceled()):
                        return False   
        dialogWait.close()
        del dialogWait
        main.GA(vip+"-Directory",vip+"-Playlist")
Ejemplo n.º 14
0
def LIST(mname, murl):
    items = []
    i = 0
    if 'http' in murl:
        text = main.OPENURL(murl)
    else:
        f = open(murl)
        text = f.read()
    match = re.compile(
        '<title>([^<]+)</title.+?link>(.+?)</link.+?thumbnail>([^<]+)</thumbnail>',
        re.DOTALL).findall(text)
    for name, url, thumb in match:
        if '</sublink>' in url:
            main.addDirMs(name, url, 266, thumb, '', '', '', '', '')
        else:
            main.addPlayMs(name, url, 240, thumb, '', '', '', '', '')
Ejemplo n.º 15
0
def LISTEPI(mname, murl, pic, desc, thumb):
    link = main.OPENURL(murl, mobile=True)
    link = (
        link.replace("\r", "")
        .replace("\n", "")
        .replace("\t", "")
        .replace("&nbsp;", "")
        .replace("  ", "")
        .replace(">Follow @GoGoAnime</a>", "")
    )
    match = re.compile('<li><a href="([^<]+)">(.+?)</a>.+?<span class="right_text">(.+?)</span>', re.DOTALL).findall(
        link
    )
    for url, name, date in match:
        main.addDirMs(name + " [COLOR red](" + date + ")[/COLOR]", url, 378, thumb, desc, "", "", "", "")
    paginate = re.compile("""<a href="([^<]+)">Next</a>""").findall(link)
    if len(paginate) > 0:
        main.addDirc("Next", paginate[0], 377, art + "/next2.png", desc, "", "", thumb, "")
Ejemplo n.º 16
0
def LISTPOP():
    link = main.OPENURL("http://www.animetoon.tv/updates", mobile=True)
    link = (
        link.replace("\r", "")
        .replace("\n", "")
        .replace("\t", "")
        .replace("&nbsp;", "")
        .replace("  ", "")
        .replace(">Follow @GoGoAnime</a>", "")
    )
    match = re.compile(
        '<tr><td><div><a href="(.+?)">(.+?)</a></div><ul>.+?</ul></td><td><img src="(.+?)" alt="(.+?)" /></td><td>(.+?)</td></tr>',
        re.DOTALL,
    ).findall(link)
    for url, name, thumb, type, date in match:
        if "Movie" in type:
            main.addDirMs(
                name + " [COLOR red](" + date + ")[/COLOR] [COLOR blue]" + type + "[/COLOR]",
                url,
                381,
                thumb,
                "",
                "",
                "",
                "",
                "",
            )
        else:
            main.addDirMs(
                name + " [COLOR red](" + date + ")[/COLOR] [COLOR blue]" + type + "[/COLOR]",
                url,
                377,
                thumb,
                "NA",
                "",
                "",
                thumb,
                "",
            )
Ejemplo n.º 17
0
def LIST(murl):
    link=main.OPENURL(murl)
    field=json.loads(link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Movie list is cached.')
    totalLinks = len(field)
    loadedLinks = 0
    remaining_display = 'Movies/Shows Cached :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
    dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    for data in field:
        genre=str(data["genres"]).replace("u'",'').replace("'",'').replace("[",'').replace("]",'')
        if 'Movies' in murl:
            main.addDirM(str(data["name"].encode('utf-8'))+' [COLOR red]'+str(round(data["rating"],2)).rstrip('0').rstrip('.')+'/10[/COLOR] [COLOR blue]'+str(data["released"])+'[/COLOR]','http://api.animeplus.tv/GetDetails/'+str(data["id"]),346,'http://www.animeplus.tv/images/series/big/'+str(data["id"])+'.jpg',str(data["description"].encode('utf-8')),'','',genre,'')
        else:
            main.addDirMs(str(data["name"].encode('utf-8'))+' [COLOR red]'+str(round(data["rating"],2)).rstrip('0').rstrip('.')+'/10[/COLOR] [COLOR blue]'+str(data["released"])+'[/COLOR]','http://api.animeplus.tv/GetDetails/'+str(data["id"]),350,'http://www.animeplus.tv/images/series/big/'+str(data["id"])+'.jpg',str(data["description"].encode('utf-8')),'','',genre,'')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100)/totalLinks
        remaining_display = 'Movies/Episodes Cached :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
        if (dialogWait.iscanceled()):
            return False
Ejemplo n.º 18
0
def LIST(murl):
    link=main.OPENURL(murl)
    field=json.loads(link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until Movie list is cached.')
    totalLinks = len(field)
    loadedLinks = 0
    remaining_display = 'Movies/Shows Cached :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
    dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    for data in field:
        genre=str(data["genres"]).replace("u'",'').replace("'",'').replace("[",'').replace("]",'')
        if 'Movies' in murl:
            main.addDirM(str(data["name"].encode('utf-8'))+' [COLOR red]'+str(round(data["rating"],2)).rstrip('0').rstrip('.')+'/10[/COLOR] [COLOR blue]'+str(data["released"])+'[/COLOR]','http://api.animeplus.tv/GetDetails/'+str(data["id"]),346,'http://www.animeplus.tv/images/series/big/'+str(data["id"])+'.jpg',str(data["description"].encode('utf-8')),'','',genre,'')
        else:
            main.addDirMs(str(data["name"].encode('utf-8'))+' [COLOR red]'+str(round(data["rating"],2)).rstrip('0').rstrip('.')+'/10[/COLOR] [COLOR blue]'+str(data["released"])+'[/COLOR]','http://api.animeplus.tv/GetDetails/'+str(data["id"]),350,'http://www.animeplus.tv/images/series/big/'+str(data["id"])+'.jpg',str(data["description"].encode('utf-8')),'','',genre,'')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100)/totalLinks
        remaining_display = 'Movies/Episodes Cached :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
        if (dialogWait.iscanceled()):
            return False
    main.GA("Animania","List")
Ejemplo n.º 19
0
def getFavorites(section_title = None):
    from resources.universal import favorites
    fav = favorites.Favorites(addon_id, sys.argv)
    
    if(section_title):
        fav_items = fav.get_my_favorites(section_title=section_title, item_mode='addon')
    else:
        fav_items = fav.get_my_favorites(item_mode='addon')
    
    if len(fav_items) > 0:
    
        for fav_item in fav_items:
            if (fav_item['isfolder'] == 'false'):
                if (fav_item['section_addon_title'] == "iWatchOnline Fav's" or 
                    fav_item['section_addon_title'] == "Movie Fav's"):
                    main.addPlayM(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
                        fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
                        fav_item['infolabels'].get('year',''))
                elif (fav_item['section_addon_title'] == "TV Show Fav's"):
                    main.addPlayT(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
                        fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
                        fav_item['infolabels'].get('year',''))
                elif (fav_item['section_addon_title'] == "TV Episode Fav's"):
                    main.addPlayTE(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
                        fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
                        fav_item['infolabels'].get('year',''))
                elif (fav_item['section_addon_title'] == "Misc. Fav's"):
                    main.addPlayMs(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
                        fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
                        fav_item['infolabels'].get('year',''))
                elif (fav_item['section_addon_title'] == "Live Fav's"):
                    main.addPlayL(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
                        fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
                        fav_item['infolabels'].get('year',''))
                elif (fav_item['section_addon_title'] == "Movie25 Fav's"):
                    main.addInfo(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('genre',''), fav_item['infolabels'].get('year',''))
            else:
                if (fav_item['section_addon_title'] == "iWatchOnline Fav's" or 
                    fav_item['section_addon_title'] == "Movie Fav's"):
                    main.addDirM(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
                        fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
                        fav_item['infolabels'].get('year',''))
                elif (fav_item['section_addon_title'] == "TV Show Fav's"):
                    main.addDirT(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
                        fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
                        fav_item['infolabels'].get('year',''))
                elif (fav_item['section_addon_title'] == "TV Episode Fav's"):
                    main.addDirTE(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
                        fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
                        fav_item['infolabels'].get('year',''))
                elif (fav_item['section_addon_title'] == "Misc. Fav's"):
                    main.addDirMs(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
                        fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
                        fav_item['infolabels'].get('year',''))
                elif (fav_item['section_addon_title'] == "Live Fav's"):
                    main.addDirL(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
                        fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
                        fav_item['infolabels'].get('year',''))
                elif (fav_item['section_addon_title'] == "Movie25 Fav's"):
                    main.addInfo(fav_item['title'],fav_item['infolabels'].get('item_url',''),  
                        fav_item['infolabels'].get('item_mode',''), fav_item['image_url'], 
                        fav_item['infolabels'].get('genre',''), fav_item['infolabels'].get('year',''))
    else:
            xbmc.executebuiltin("XBMC.Notification([B][COLOR=FF67cc33]Aftershock Up[/COLOR][/B],[B]You Have No Saved Favourites[/B],5000,"")")
    return
Ejemplo n.º 20
0
Archivo: mbox.py Proyecto: noba3/KoTos
def LIST(type):
    path = os.path.join(profile, type.replace("25", "") + "_lite.json")
    f = open(path)
    field = json.loads(f.read())
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create("Please wait until Content list is cached.")
    if "25movies" in type:
        totalLinks = 25
    else:
        totalLinks = len(field)
    loadedLinks = 0
    remaining_display = "Content Cached :: [B]" + str(loadedLinks) + " / " + str(totalLinks) + "[/B]."
    dialogWait.update(0, "[B]Will load instantly from now on[/B]", remaining_display)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    field = sorted(field, key=lambda x: x["poster"], reverse=True)
    try:
        updates = ""
        if "movies" in type or "25movies" in type:
            path = os.path.join(profile, "news_movies.json")
        else:
            path = os.path.join(profile, "news_tv.json")
        updates = open(path).read()
        field = sorted(field, key=lambda word: negtopos(updates.find('"id":' + word["id"] + ",")))
    except:
        pass
    if "25movies" in type:
        field = field[0:25]
    for data in field:
        # genre=str(data["genres"]).replace("u'",'').replace("'",'').replace("[",'').replace("]",'')
        if data["active"] == "1":
            thumb = str(data["poster"]).replace("\/'", "/")
            if "movies" in type or "25movies" in type:
                main.addDown4(
                    main.unescapes(str(data["title"].encode("utf-8"))) + " (" + str(data["year"]) + ")",
                    apibase + "/api/serials/get_movie_data?id=" + str(data["id"]),
                    279,
                    thumb,
                    "",
                    "",
                    "",
                    "",
                    "",
                )
            elif "music" in type:
                main.addDirMs(
                    main.unescapes(str(data["title"].encode("utf-8"))),
                    apibase + "/api/serials/get_artist_data/?id=" + str(data["id"]) + "&type=1",
                    302,
                    thumb,
                    "",
                    "",
                    "",
                    "",
                    "",
                )
            else:
                main.addDirT(
                    main.unescapes(str(data["title"].encode("utf-8"))),
                    data["id"] + "xoxe" + data["seasons"],
                    280,
                    thumb,
                    "",
                    "",
                    "",
                    "",
                    "",
                )
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = "Content Cached :: [B]" + str(loadedLinks) + " / " + str(totalLinks) + "[/B]."
        dialogWait.update(percent, "[B]Will load instantly from now on[/B]", remaining_display)
        if dialogWait.iscanceled():
            break
    main.GA("Mbox", "List")
    main.VIEWS()
Ejemplo n.º 21
0
def LIST(murl):
    link = main.OPENURL(murl)
    link = (
        link.replace("\r", "")
        .replace("\n", "")
        .replace("\t", "")
        .replace("&nbsp;", "")
        .replace("&raquo;", "")
        .replace("&rarr;", "")
        .replace("  ", "")
    )
    match = re.compile(
        """<a href="([^<]+)"><img src="(.+?)".+?<h3><a href=".+?">(.+?)</a></h3><div><span class="type_indic">(.+?)</span>.+?<div class="descr">(.+?).?<a.+?Released:</span><span class="bold">(.+?)</span>.+?Rating:</span><span class="bold">(.+?)</span>""",
        re.DOTALL,
    ).findall(link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create("Please wait until Movie list is cached.")
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = "Movies/Shows Cached :: [B]" + str(loadedLinks) + " / " + str(totalLinks) + "[/B]."
    dialogWait.update(0, "[B]Will load instantly from now on[/B]", remaining_display)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    for url, thumb, name, type, desc, year, rate in match:
        if "Movie" in type:
            main.addDirMs(
                name
                + " [COLOR red]("
                + year
                + ") [/COLOR][COLOR blue]"
                + rate
                + "[/COLOR] [COLOR tan]"
                + type
                + "[/COLOR]",
                url,
                381,
                thumb,
                desc,
                "",
                "",
                "",
                "",
            )
        else:
            main.addDirMs(
                name
                + " [COLOR red]("
                + year
                + ") [/COLOR][COLOR blue]"
                + rate
                + "[/COLOR] [COLOR tan]"
                + type
                + "[/COLOR]",
                url,
                377,
                thumb,
                desc,
                "",
                "",
                thumb,
                "",
            )
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100) / totalLinks
        remaining_display = "Movies/Episodes Cached :: [B]" + str(loadedLinks) + " / " + str(totalLinks) + "[/B]."
        dialogWait.update(percent, "[B]Will load instantly from now on[/B]", remaining_display)
        if dialogWait.iscanceled():
            return False
    paginate = re.compile("""<a href="([^<]+)">Next</a>""").findall(link)
    if len(paginate) > 0:
        main.addDir("Next", paginate[0], 376, art + "/next2.png")
    main.GA("Animania", "List")