diff --git a/channels/casacinema.json b/channels/casacinema.json index c964ad15..6141f268 100644 --- a/channels/casacinema.json +++ b/channels/casacinema.json @@ -1,70 +1,20 @@ { "id": "casacinema", "name": "Casacinema", - "language": ["ita"], + "language": ["ita", "vosi"], "active": true, "adult": false, "thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/casacinema.png", "banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/casacinema.png", - "categories": ["tvshow", "movie"], + "categories": ["tvshow", "movie","vos"], "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Includi ricerca globale", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_peliculas", - "type": "bool", - "label": "Includi in Novità - Film", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_series", - "type": "bool", - "label": "Includi in Novità - Serie TV", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_italiano", - "type": "bool", - "label": "Includi in Novità - Italiano", - "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 de 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": ["Non filtrare","IT"] - } + { + "id": "include_in_global_search", + "type": "bool", + "label": "@70728", + "default": false, + "enabled": false, + "visible": false + } ] } diff --git a/channels/casacinema.py b/channels/casacinema.py index 5c742def..ae5a723c 100644 --- a/channels/casacinema.py +++ b/channels/casacinema.py @@ -1,340 +1,170 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------ -# Kodi on Demand - Kodi Addon -# Canale per casacinema +# Canale per 'idcanale nel json' # ------------------------------------------------------------ -import re -import urlparse +# Rev: 0.2 +# Update 18-09-2019 +# fix: +# 1. aggiunto pagination e sistemate alcune voci -from channelselector import thumb, get_thumb -from core import scrapertools, scrapertoolsV2, httptools, tmdb, support -from core.item import Item -from platformcode import logger, config -from specials import autoplay +# Questo vuole solo essere uno scheletro per velocizzare la scrittura di un canale. +# I commenti sono più un promemoria... che una vera e propria spiegazione! +# Niente di più. +# Ulteriori informazioni sono reperibili nel wiki: +# https://github.com/kodiondemand/addon/wiki/decoratori +""" + Problemi noti che non superano il test del canale: + - indicare i problemi + + Avvisi: + - NON è presente nella ricerca globale + - TUTTE le pagine delle serie contengono al max 20 titoli + + Ulteriori info: + +""" +# Qui gli import +# per l'uso dei decoratori, per i log, e funzioni per siti particolari +from core import support +from platformcode import config + +# in caso di necessità +#from core import scrapertoolsV2#, httptools, servertools, tmdb +from core.item import Item # per newest +#from lib import unshortenit + +##### fine import __channel__ = "casacinema" host = config.get_channel_url(__channel__) -IDIOMAS = {'Italiano': 'IT'} -list_language = IDIOMAS.values() +headers = [['Referer', host]] + list_servers = ['verystream', 'openload', 'wstream', 'speedvideo'] list_quality = ['HD', 'SD'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'casacinema') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'casacinema') - -headers = [['Referer', '%s/genere/serie-tv' % host]] - - +@support.menu def mainlist(item): - logger.info("kod.casacinema mainlist") + support.log(item) - autoplay.init(item.channel, list_servers, list_quality) + film = ['/category/film', + ('Generi', ['', 'genres', 'genres']), + ('Sub-ITA', ['/category/sub-ita/', 'peliculas', 'sub']) + ] - itemlist = [Item(channel=item.channel, - title="[B]Film[/B]", - action="peliculas", - extra="movie", - url="%s/genere/film" % host), - Item(channel=item.channel, - title="[B]Film - HD[/B]", - action="peliculas", - extra="movie", - url="%s/?s=[HD]" % host), - Item(channel=item.channel, - title="[B] > Categorie[/B]", - action="categorias", - extra="movie", - url="%s/genere/film" % host), - Item(channel=item.channel, - title="[B]Film Sub - Ita[/B]", - action="peliculas", - extra="movie", - url="%s/genere/sub-ita" % host), - Item(channel=item.channel, - title="[COLOR blue]Cerca Film...[/COLOR]", - action="search", - extra="movie",), - Item(channel=item.channel, - title="[B]Serie TV[/B]", - extra="tvshow", - action="peliculas_tv", - url="%s/genere/serie-tv" % host), - Item(channel=item.channel, - title="[COLOR blue]Cerca Serie TV...[/COLOR]", - action="search", - extra="tvshow")] + # Voce SERIE, puoi solo impostare l'url + tvshow = ['/aggiornamenti-serie-tv', + ('Ultime', ['/category/serie-tv', 'peliculas', '']), + ] + return locals() - - autoplay.show_option(item.channel, itemlist) +@support.scrape +def peliculas(item): + support.log(item) + #dbg # decommentare per attivare web_pdb - # auto thumb - itemlist=thumb(itemlist) + if item.contentType == 'movie': + action = 'findvideos' + else: + action = 'episodios' + pagination = '' + blacklist = [''] - return itemlist + patron = r'