Merge branch 'master' of https://github.com/kodiondemand/addon
This commit is contained in:
@@ -7,6 +7,5 @@
|
||||
"thumbnail": "seriehd.png",
|
||||
"banner": "seriehd.png",
|
||||
"categories": ["tvshow"],
|
||||
"not_active": ["include_in_newest"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 + "]"
|
||||
|
||||
Reference in New Issue
Block a user