From d2b486926122f3443941883178b2eac433161ed7 Mon Sep 17 00:00:00 2001 From: greko17 Date: Mon, 14 Oct 2019 12:08:37 +0200 Subject: [PATCH 1/4] featured: specials/news.py aggiunta dicitura "Serie Completa" per i siti come seriehd --- specials/news.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/specials/news.py b/specials/news.py index 18cac52a..305c0e06 100644 --- a/specials/news.py +++ b/specials/news.py @@ -392,7 +392,7 @@ def get_newest(channel_id, categoria): def get_title(item): - support.log("ITEM NEWEST ->", item) + #support.log("ITEM NEWEST ->", item) if item.contentSerieName: # Si es una serie title = item.contentSerieName #title = re.compile("\[.*?\]", re.DOTALL).sub("", item.contentSerieName) @@ -413,6 +413,7 @@ def get_title(item): title = re.compile("\[/*B\]", re.DOTALL).sub("", title) title = re.compile("\[/*I\]", re.DOTALL).sub("", title) + title = '[B]'+title+'[/B]' if item.contentLanguage == '': @@ -426,6 +427,10 @@ def get_title(item): if item.quality: title += support.typo(item.quality, '_ [] color kod') + + season_ = support.typo(config.get_localized_string(70736), '_ [] color white bold') if (type(item.args) != bool and 'season_completed' in item.args) else '' + if season_: + title += season_ return title @@ -434,7 +439,7 @@ def no_group(list_result_canal): global channels_id_name for i in list_result_canal: - support.log("NO GROUP i -> ", i) + #support.log("NO GROUP i -> ", i) canale = channels_id_name[i.channel] canale = canale # per differenziarlo dal colore delle altre voci i.title = get_title(i) + " [" + canale + "]" From b270c10c9ebe6c33fc4a1535a490be0dee7fec41 Mon Sep 17 00:00:00 2001 From: greko17 Date: Mon, 14 Oct 2019 12:09:23 +0200 Subject: [PATCH 2/4] add: aggiunta voce "Serie Completa" --- resources/language/Italian/strings.po | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/language/Italian/strings.po b/resources/language/Italian/strings.po index 642096e6..1088840b 100644 --- a/resources/language/Italian/strings.po +++ b/resources/language/Italian/strings.po @@ -5660,3 +5660,7 @@ msgstr "Seleziona gli Episodi della Stagione" msgctxt "#70735" msgid "%s Special Episode Number" msgstr "Numero dell'Episodio Speciale %s" + +msgctxt "#70736" +msgid "Completed Serie" +msgstr "Serie Completa" From 89b0e349c3e79729469769f7e4789b99cd371a6e Mon Sep 17 00:00:00 2001 From: greko17 Date: Mon, 14 Oct 2019 12:09:49 +0200 Subject: [PATCH 3/4] add: "serie completa" --- core/support.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/support.py b/core/support.py index e0a831ac..e23cdd75 100644 --- a/core/support.py +++ b/core/support.py @@ -199,7 +199,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t # type = tipo del video. Es. movie per film o tvshow per le serie. Di solito sono discrimanti usati dal sito # lang = lingua del video. Es: ITA, Sub-ITA, Sub, SUB ITA. # AVVERTENZE: Se il titolo è trovato nella ricerca TMDB/TVDB/Altro allora le locandine e altre info non saranno quelle recuperate nel sito.!!!! - + stagione = '' # per quei siti che hanno la stagione nel blocco ma non nelle puntate for i, match in enumerate(matches): if pagination and (pag - 1) * pagination > i: continue # pagination @@ -222,6 +222,9 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t season = scraped['season'] if stagione: episode = season +'x'+ scraped['episode'] + elif item.contentType == 'tvshow' and (scraped['episode'] == '' and season == ''): + item.args = 'season_completed' + episode = '' else: episode = re.sub(r'\s-\s|-|x|–|×', 'x', scraped['episode']) if scraped['episode'] else '' @@ -234,12 +237,11 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t # make formatted Title [longtitle] s = ' - ' - title = episode + (s if episode and title else '') + title + title = episode + (s if episode and title else '') + title longtitle = title + (s if title and title2 else '') + title2 longtitle = typo(longtitle, 'bold') longtitle += (typo(Type,'_ () bold') if Type else '') + (typo(quality, '_ [] color kod') if quality else '') - lang1, longtitle = scrapeLang(scraped, lang, longtitle) # if title is set, probably this is a list of episodes or video sources From ab687f9786963c9aee73a57f5015cc09c6986cfc Mon Sep 17 00:00:00 2001 From: greko17 Date: Mon, 14 Oct 2019 12:11:56 +0200 Subject: [PATCH 4/4] fix: seriehd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit aggiunto in novità --- channels/seriehd.json | 1 - channels/seriehd.py | 25 +++++++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/channels/seriehd.json b/channels/seriehd.json index c6a937e5..b6be2f7b 100644 --- a/channels/seriehd.json +++ b/channels/seriehd.json @@ -7,6 +7,5 @@ "thumbnail": "seriehd.png", "banner": "seriehd.png", "categories": ["tvshow"], - "not_active": ["include_in_newest"], "settings": [] } diff --git a/channels/seriehd.py b/channels/seriehd.py index 98c1ed58..51648003 100644 --- a/channels/seriehd.py +++ b/channels/seriehd.py @@ -7,9 +7,6 @@ from core import scrapertoolsV2, httptools, support from core.item import Item -##__channel__ = 'seriehd' -# host = support.config.get_channel_url(__channel__) - # impostati dinamicamente da findhost() host = '' headers = '' @@ -26,9 +23,6 @@ findhost() 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__) - @support.menu def mainlist(item): @@ -89,6 +83,25 @@ def episodios(item): action = 'findvideos' return locals() +def newest(categoria): + support.log(categoria) + itemlist = [] + item = support.Item() + try: + if categoria == "series": + item.url = host + item.contentType = 'tvshow' + itemlist = peliculas(item) + itemlist.pop() + # 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 + def findvideos(item): support.log()