diff --git a/channels/cb01anime.json b/channels/cb01anime.json index 26183875..b985c4e8 100644 --- a/channels/cb01anime.json +++ b/channels/cb01anime.json @@ -1,36 +1,11 @@ { "id": "cb01anime", "name": "Cb01anime", - "language": ["ita"], + "language": ["ita", "vos", "vosi"], "active": true, "adult": false, - "thumbnail": "http://i.imgur.com/bHoUMo2.png", - "banner": "http://i.imgur.com/bHoUMo2.png", + "thumbnail": "cb01anime.png", + "banner": "cb01anime.png", "categories": ["anime"], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Includi in Ricerca Globale", - "default": false, - "enabled": false, - "visible": false - }, - { - "id": "include_in_newest_anime", - "type": "bool", - "label": "Includi in Novità - Anime", - "default": false, - "enabled": false, - "visible": false - }, - { - "id": "include_in_newest_italiano", - "type": "bool", - "label": "Includi in Novità - Italiano", - "default": true, - "enabled": true, - "visible": true - } - ] + "settings": [] } diff --git a/channels/cb01anime.py b/channels/cb01anime.py index c3b62c31..b6a5dc35 100644 --- a/channels/cb01anime.py +++ b/channels/cb01anime.py @@ -1,276 +1,89 @@ # -*- coding: utf-8 -*- -# Ringraziamo Icarus crew # ------------------------------------------------------------ # XBMC Plugin # Canale per cineblog01 - anime # ------------------------------------------------------------ -import re -from core import httptools, scrapertools, servertools, tmdb -from core.item import Item -from platformcode import logger, config +from core import support __channel__ = "cb01anime" -host = config.get_channel_url(__channel__) -#esclusione degli articoli 'di servizio' -blacklist = ['AVVISO IMPORTANTE – CB01.ROCKS', 'Lista Alfabetica Completa Anime/Cartoon', 'CB01.UNO ▶ TROVA L’INDIRIZZO UFFICIALE'] +host = support.config.get_channel_url(__channel__) + '/anime' -# ----------------------------------------------------------------- +Blacklist = ['AVVISO IMPORTANTE – CB01.ROCKS', 'Lista Alfabetica Completa Anime/Cartoon', 'CB01.UNO ▶ TROVA L’INDIRIZZO UFFICIALE','Lista Richieste Up & Re-Up'] +list_servers = ['verystream', 'openload', 'streamango', 'thevideome'] +list_quality = ['1080p', '720p', '480p', '360'] + +checklinks = support.config.get_setting('checklinks', __channel__) +checklinks_number = support.config.get_setting('checklinks_number', __channel__) +headers = [['Referer', host]] + +@support.menu def mainlist(item): - logger.info("[cb01anime.py] mainlist") - - # Main options - itemlist = [Item(channel=item.channel, - action="list_titles", - title="[COLOR azure]Anime - Novita'[/COLOR]", - url=host + '/anime', - thumbnail="http://orig09.deviantart.net/df5a/f/2014/169/2/a/fist_of_the_north_star_folder_icon_by_minacsky_saya-d7mq8c8.png"), - Item(channel=item.channel, - action="genere", - title="[COLOR azure]Anime - Per Genere[/COLOR]", - url=host + '/anime', - thumbnail="http://xbmc-repo-ackbarr.googlecode.com/svn/trunk/dev/skin.cirrus%20extended%20v2/extras/moviegenres/Genres.png"), - Item(channel=item.channel, - action="alfabetico", - title="[COLOR azure]Anime - Per Lettera A-Z[/COLOR]", - url=host + '/anime', - thumbnail="http://i.imgur.com/IjCmx5r.png"), - Item(channel=item.channel, - action="listacompleta", - title="[COLOR azure]Anime - Lista Completa[/COLOR]", - url="%s/anime/lista-completa-anime-cartoon/" % host, - thumbnail="http://i.imgur.com/IjCmx5r.png"), - Item(channel=item.channel, - action="search", - title="[COLOR yellow]Cerca Anime[/COLOR]", - extra="anime", - thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")] - - return itemlist + anime = [('Genere',['','menu', '2']), + ('Per Lettera',['','menu', '1']), + ('Per Anno',['','menu', '3'])] + return locals() -# ================================================================= - -# ----------------------------------------------------------------- -def genere(item): - logger.info("[cb01anime.py] genere") - - return build_itemlist(item, '', - '', "list_titles") - - -def listacompleta(item): - logger.info("[cb01anime.py] listacompleta") - - return build_itemlist(item, - 'Z(.*?)
', - '|
', matches1[0]): - if len(match1) > 0: - # Estrae i contenuti - titulo = None - scrapedurl = '' - matches2 = re.compile(patron2, re.DOTALL).finditer(match1) - for match2 in matches2: - if titulo is None: - titulo = match2.group(2) - scrapedurl += match2.group(1) + '#' + match2.group(2) + '|' - if titulo is not None: - title = item.title + " " + titulo - itemlist.append( - Item(channel=item.channel, - action="findvideos", - contentType="episode", - title=title, - extra=scrapedurl, - fulltitle=item.fulltitle, - show=item.show)) - - if config.get_videolibrary_support() and len(itemlist) != 0: - itemlist.append( - Item(channel=item.channel, - title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161), - url=item.url, - action="add_serie_to_library", - extra="episodios", - show=item.show)) - - return itemlist - - -# ================================================================= - - -# ----------------------------------------------------------------- def findvideos(item): - logger.info("[cb01anime.py] findvideos") - - itemlist = [] - - for match in item.extra.split(r'|'): - match_split = match.split(r'#') - scrapedurl = match_split[0] - if len(scrapedurl) > 0: - scrapedtitle = match_split[1] - title = item.title + " [COLOR blue][" + scrapedtitle + "][/COLOR]" - itemlist.append( - Item(channel=item.channel, - action="play", - title=title, - url=scrapedurl, - fulltitle=item.fulltitle, - show=item.show, - ontentType=item.contentType, - folder=False)) - - return itemlist - - -# ================================================================= - - -# ----------------------------------------------------------------- -def play(item): - logger.info("[cb01anime.py] play") - - if '/goto/' in item.url: - item.url = item.url.split('/goto/')[-1].decode('base64') - - data = item.url - - logger.debug("##### Play data ##\n%s\n##" % data) - itemlist = servertools.find_video_items(data=data) - - for videoitem in itemlist: - videoitem.title = item.show - videoitem.fulltitle = item.fulltitle - videoitem.show = item.show - videoitem.thumbnail = item.thumbnail - videoitem.channel = item.channel - videoitem.contentType = item.contentType - - return itemlist + return support.server(item, item.url)