diff --git a/channels/piratestreaming.json b/channels/piratestreaming.json index 5b1ca008..0ad00303 100644 --- a/channels/piratestreaming.json +++ b/channels/piratestreaming.json @@ -4,58 +4,8 @@ "active": true, "adult": false, "language": ["ita"], - "thumbnail": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/piratestreaming.png", - "bannermenu": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/piratestreaming.png", + "thumbnail": "piratestreaming.png", + "bannermenu": "piratestreaming.png", "categories": ["anime","movie","tvshow"], - "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_anime", - "type": "bool", - "label": "Includi in Novità - Anime", - "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": "filter_languages", - "type": "list", - "label": "Mostrar enlaces en idioma...", - "default": 0, - "enabled": true, - "visible": true, - "lvalues": ["No filtrar","IT"] - } - ] + "settings": [] } diff --git a/channels/piratestreaming.py b/channels/piratestreaming.py index f5fce638..0c72b846 100644 --- a/channels/piratestreaming.py +++ b/channels/piratestreaming.py @@ -43,6 +43,33 @@ def search(item, texto): return [] +def newest(categoria): + support.log(categoria) + itemlist = [] + item = support.Item() + try: + if categoria == "peliculas": + item.url = host + '/category/films' + item.contentType = 'movies' + return peliculas(item) + if categoria == "series": + item.url = host + '/category/serie' + item.contentType = 'tvshow' + return peliculas(item) + if categoria == "anime": + item.url = host + '/category/anime-cartoni-animati' + item.contentType = 'tvshow' + 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 [] + + return itemlist + + @support.scrape def peliculas(item): patron = r'data-placement="bottom" title="(?P