diff --git a/channels/toonitalia.json b/channels/toonitalia.json index deaa9b02..651d88c9 100644 --- a/channels/toonitalia.json +++ b/channels/toonitalia.json @@ -1,49 +1,13 @@ { "id": "toonitalia", "name": "ToonItalia", - "language": ["ita"], + "language": ["ita", "sub-ita"], "active": true, "adult": false, "thumbnail": "toonitalia.png", "banner": "toonitalia.png", "categories": ["tvshow", "movie", "vos", "anime"], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Includi in Ricerca Globale", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "checklinks", - "type": "bool", - "label": "Verifica se i link esistono", - "default": false, - "enabled": true, - "visible": true - }, - { - "id": "checklinks_number", - "type": "list", - "label": "Numero di link da verificare", - "default": 1, - "enabled": true, - "visible": "eq(-1,true)", - "lvalues": [ "5", "10", "15", "20" ] - }, - { - "id": "filter_languages", - "type": "list", - "label": "Mostra link in lingua...", - "default": 0, - "enabled": true, - "visible": true, - "lvalues": [ - "No filtrar", - "Italiano" - ] - } - ] + "not_active":["include_in_newest_peliculas"], + "default_off":["include_in_newest"], + "settings": [] } \ No newline at end of file diff --git a/channels/toonitalia.py b/channels/toonitalia.py index cc0891df..693861cc 100644 --- a/channels/toonitalia.py +++ b/channels/toonitalia.py @@ -19,25 +19,58 @@ def mainlist(item): top = [('Novità',['', 'peliculas', 'new', 'tvshow']), ('Aggiornamenti', ['', 'peliculas', 'last', 'tvshow']), - ('Popolari', ['', 'peliculas', 'most_view', 'tvshow'])] - tvshow = '/lista-serie-tv/' + ('Popolari', ['', 'peliculas', 'most_view', 'tvshow'])] + tvshow = ['/lista-serie-tv/'] anime =['/lista-anime-2/', ('Sub-Ita',['/lista-anime-sub-ita/', 'peliculas', 'sub']), - ('Film Animati',['/lista-film-animazione/','peliculas', '', 'movie'])] + ('Film Animati',['/lista-film-animazione/','peliculas', '', 'movie'])] search = '' - return locals() +def search(item, texto): + support.log(texto) + item.args='search' + item.contentType='tvshow' + item.url = host + '/?s=' + texto + try: + return peliculas(item) + return itemlist + # Continua la ricerca in caso di errore + except: + import sys + for line in sys.exc_info(): + support.logger.error("%s" % line) + return [] + + +def newest(categoria): + support.log(categoria) + item = support.Item() + try: + item.contentType = 'tvshow' + item.url= host + item.args= 'new' + return peliculas(item) + # Continua la ricerca in caso di errore + except: + import sys + for line in sys.exc_info(): + support.logger.error("{0}".format(line)) + return [] + + @support.scrape def peliculas(item): -## import web_pdb; web_pdb.set_trace() pagination = '' anime = True blacklist = ['-Film Animazione disponibili in attesa di recensione '] - + if item.args == 'search': - patron = r'
(?P
(?P
(?P
)(?P