From e97ea67535ea7521490d6dacef7600cf81dced55 Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Mon, 2 Sep 2019 19:16:29 +0200 Subject: [PATCH] Fix AnimeWorld --- channels/animeworld.json | 73 ++----------------------------- channels/animeworld.py | 94 ++++++++++++++++++++-------------------- 2 files changed, 50 insertions(+), 117 deletions(-) diff --git a/channels/animeworld.json b/channels/animeworld.json index ac5f61d1..dc4702b0 100644 --- a/channels/animeworld.json +++ b/channels/animeworld.json @@ -3,84 +3,19 @@ "name": "AnimeWorld", "active": true, "adult": false, - "language": ["ita"], + "language": ["ita", "vos", "vosi"], "thumbnail": "animeworld.png", "banner": "animeworld.png", "categories": ["anime"], "settings": [ { - "id": "channel_host", - "type": "text", - "label": "Host del canale", - "default": "https://www.animeworld.it", - "enabled": true, - "visible": true - }, - { - "id": "include_in_global_search", - "type": "bool", - "label": "Includi ricerca globale", - "default": false, - "enabled": false, - "visible": false - }, - { - "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": "checklinks", - "type": "bool", - "label": "Verifica se i link esistono", - "default": false, - "enabled": true, - "visible": true - }, - { - "id": "checklinks_number", + "id": "order", "type": "list", - "label": "Numero de link da verificare", - "default": 1, - "enabled": true, - "visible": "eq(-1,true)", - "lvalues": [ "1", "3", "5", "10" ] - }, - { - "id": "filter_languages", - "type": "list", - "label": "Mostra link in lingua...", + "label": "Ordine di Visualizzazione", "default": 0, "enabled": true, "visible": true, - "lvalues": ["No filtrar","Italiano"] - }, - { - "id": "autorenumber", - "type": "bool", - "label": "@70712", - "default": false, - "enabled": true, - "visible": true - }, - { - "id": "autorenumber_mode", - "type": "bool", - "label": "@70688", - "default": false, - "enabled": true, - "visible": "eq(-1,true)" + "lvalues": [ "Standard", "Ultime Aggiunte", "Lista A-Z", "Data di Uscita" ] } ] } diff --git a/channels/animeworld.py b/channels/animeworld.py index 9582d72c..a5edce1e 100644 --- a/channels/animeworld.py +++ b/channels/animeworld.py @@ -2,19 +2,13 @@ # ------------------------------------------------------------ # Canale per animeworld # ---------------------------------------------------------- -import re -import time -import urllib -import urlparse -from core import httptools, scrapertoolsV2, servertools, tmdb, support, jsontools -from core.support import log -from core.item import Item -from platformcode import logger, config -from specials import autoplay, autorenumber + + +from core import support, jsontools __channel__ = "animeworld" -host = config.get_channel_url(__channel__) +host = support.config.get_channel_url(__channel__) headers = [['Referer', host]] IDIOMAS = {'Italiano': 'Italiano'} @@ -23,50 +17,54 @@ list_servers = ['animeworld', 'verystream', 'streamango', 'openload', 'directo'] list_quality = ['default', '480p', '720p', '1080p'] +def order(): + return str(support.config.get_setting("order", __channel__)) + + @support.menu def mainlist(item): - anime=['/filter', - ('ITA',['/filter?language%5B%5D=1&sort=2', 'build_menu', 'language[]=1']), - ('SUB-ITA',['/filter?language%5B%5D=1&sort=2', 'build_menu', 'language[]=0']), + anime=['/filter?sort=', + ('ITA',['/filter?language[]=1&sort=', 'build_menu', 'order']), + ('SUB-ITA',['/filter?language[]=0&sort=', 'build_menu', 'order']), ('In Corso', ['/ongoing', 'peliculas']), ('Ultimi Episodi', ['/updated', 'peliculas', 'updated']), ('Nuove Aggiunte',['/newest', 'peliculas' ]), - ('Generi',['','genres', ' Generi'])] + ('Generi',['','genres',])] return locals() -# Crea menu =================================================== -@support.scrape def genres(item): - patronBlock = r' Generi(?P.*?)' - patronMenu = r'' - action = 'peliculas' - return locals() + support.log() + itemlist = [] + matches = support.match(item, r'[^>]+>([^<]+)<\/label>' , r'