- Fix e migliorie Community Channels
- NuovaModalità per nextPage
This commit is contained in:
@@ -1123,6 +1123,15 @@ def nextPage(itemlist, item, data='', patron='', function_or_level=1, next_page=
|
||||
# If the call is direct, leave it blank
|
||||
logger.debug()
|
||||
action = inspect.stack()[function_or_level][3] if type(function_or_level) == int else function_or_level
|
||||
|
||||
if not data and not patron and not next_page:
|
||||
itemlist.append(
|
||||
item.clone(action = action,
|
||||
title=typo(config.get_localized_string(30992), 'color kod bold'),
|
||||
nextPage=True,
|
||||
thumbnail=thumb()))
|
||||
return itemlist[-1]
|
||||
|
||||
if next_page == '':
|
||||
next_page = scrapertools.find_single_match(data, patron)
|
||||
|
||||
@@ -1133,14 +1142,11 @@ def nextPage(itemlist, item, data='', patron='', function_or_level=1, next_page=
|
||||
next_page = next_page.replace('&', '&')
|
||||
logger.debug('NEXT= ', next_page)
|
||||
itemlist.append(
|
||||
item.clone(channel=item.channel,
|
||||
action = action,
|
||||
contentType=item.contentType,
|
||||
title=typo(config.get_localized_string(30992), 'color kod bold'),
|
||||
url=next_page,
|
||||
args=item.args,
|
||||
nextPage=True,
|
||||
thumbnail=thumb()))
|
||||
item.clone(action = action,
|
||||
title=typo(config.get_localized_string(30992), 'color kod bold'),
|
||||
url=next_page,
|
||||
nextPage=True,
|
||||
thumbnail=thumb()))
|
||||
return itemlist[-1]
|
||||
|
||||
def pagination(itemlist, item, page, perpage, function_level=1):
|
||||
@@ -1190,12 +1196,16 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
||||
videoitem.title = findS[0]
|
||||
videoitem.url = findS[1]
|
||||
srv_param = servertools.get_server_parameters(videoitem.server.lower())
|
||||
|
||||
logger.debug(videoitem)
|
||||
if videoitem.video_urls or srv_param.get('active', False):
|
||||
item.title = typo(item.contentTitle.strip(), 'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title
|
||||
|
||||
quality = videoitem.quality if videoitem.quality else item.quality if item.quality else ''
|
||||
videoitem.title = (item.title if item.channel not in ['url'] else '') + (typo(videoitem.title, '_ color kod [] bold') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "")
|
||||
videoitem.title = (item.title if item.channel not in ['url'] else '')\
|
||||
+ (typo(videoitem.title, '_ color kod [] bold') if videoitem.title else "")\
|
||||
+ (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "")\
|
||||
+ (typo(videoitem.contentLanguage, '_ color kod []') if videoitem.contentLanguage else "")\
|
||||
+ (typo(videoitem.extraInfo, '_ color kod []') if videoitem.extraInfo else "")
|
||||
videoitem.plot = typo(videoitem.title, 'bold') + (typo(quality, '_ [] bold') if quality else '')
|
||||
videoitem.channel = item.channel
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
|
||||
@@ -19,9 +19,6 @@ defp = defpage[config.get_setting('pagination','community')]
|
||||
disable_pagination = False
|
||||
show_seasons = config.get_setting('show_seasons','community')
|
||||
|
||||
list_servers = ['directo', 'akstream', 'wstream', 'backin', 'cloudvideo', 'clipwatching', 'fembed', 'gounlimited', 'mega', 'mixdrop']
|
||||
list_quality = ['SD', '720', '1080', '4k']
|
||||
|
||||
tmdb_api = 'a1ab8b8669da03637a4b98fa39c39228'
|
||||
|
||||
def mainlist(item):
|
||||
@@ -401,14 +398,16 @@ def findvideos(item):
|
||||
json = item.url['links']
|
||||
else:
|
||||
json = item.url
|
||||
|
||||
# support.dbg()
|
||||
for option in json:
|
||||
extra = set_extra_values(item, option, item.path)
|
||||
title = item.fulltitle + (' - '+option['title'] if 'title' in option else '')
|
||||
title = set_title(title, extra.language, extra.quality)
|
||||
|
||||
itemlist.append(item.clone(channel=item.channel, title=title, url=option['url'], action='play', quality=extra.quality,
|
||||
language=extra.language, infoLabels=item.infoLabels))
|
||||
itemlist.append(
|
||||
item.clone(url=option['url'],
|
||||
action='play',
|
||||
quality=extra.quality,
|
||||
contentLanguage=extra.language,
|
||||
extraInfo=extra.info))
|
||||
|
||||
item.url = '' # do not pass referer
|
||||
return support.server(item, itemlist=itemlist)
|
||||
@@ -673,7 +672,8 @@ def set_extra_values(item, json, path):
|
||||
ret = Item()
|
||||
for key in json:
|
||||
if key == 'quality':
|
||||
ret.quality = json[key].upper()
|
||||
ret.quality = json[key]
|
||||
if ret.quality and not ret.quality[0].isdigit(): ret.quality = ret.quality.upper()
|
||||
elif key == 'language':
|
||||
ret.language = json[key].upper()
|
||||
elif key == 'plot':
|
||||
@@ -699,6 +699,8 @@ def set_extra_values(item, json, path):
|
||||
ret.filterkey = filterkey
|
||||
elif key == 'description':
|
||||
ret.description = json[key]
|
||||
elif key == 'info':
|
||||
ret.info = json[key]
|
||||
|
||||
if not ret.thumb:
|
||||
if 'get_search_menu' in inspect.stack()[1][3]:
|
||||
@@ -714,7 +716,7 @@ def set_extra_values(item, json, path):
|
||||
|
||||
|
||||
# format titles
|
||||
def set_title(title, language='', quality=''):
|
||||
def set_title(title, language='', quality='', info=''):
|
||||
logger.debug()
|
||||
|
||||
t = support.match(title, patron=r'\{([^\}]+)\}').match
|
||||
@@ -729,7 +731,9 @@ def set_title(title, language='', quality=''):
|
||||
title += support.typo(language.upper(), '_ [] color kod bold')
|
||||
else:
|
||||
for lang in language:
|
||||
title += support.typo(lang.upper(), '_ [] color kod bold')
|
||||
title += support.typo(language.upper(), '_ [] color kod bold')
|
||||
if info:
|
||||
title += support.typo(info.upper(), '_ [] color kod bold')
|
||||
|
||||
return title
|
||||
|
||||
|
||||
Reference in New Issue
Block a user