Merge branch 'master' into master

This commit is contained in:
mac12m99
2019-06-06 22:23:35 +02:00
committed by GitHub
146 changed files with 320 additions and 176 deletions
+7 -7
View File
@@ -725,14 +725,14 @@ def check_video_link(url, server, timeout=3):
:param url, server: Link y servidor
:return: str(2) '??':No se ha podido comprobar. 'Ok':Parece que el link funciona. 'NO':Parece que no funciona.
"""
NK = "[COLOR 0xFFF9B613][B]" + u"\u2022".encode('utf-8') + "[/B][/COLOR]"
OK = "[COLOR 0xFF00C289][B]" + u"\u2022".encode('utf-8') + "[/B][/COLOR]"
KO = "[COLOR 0xFFC20000][B]" + u"\u2022".encode('utf-8') + "[/B][/COLOR]"
NK = "[COLOR 0xFFF9B613][B]" + u"\u25cf".encode('utf-8') + "[/B][/COLOR]"
OK = "[COLOR 0xFF00C289][B]" + u"\u25cf".encode('utf-8') + "[/B][/COLOR]"
KO = "[COLOR 0xFFC20000][B]" + u"\u25cf".encode('utf-8') + "[/B][/COLOR]"
# NK = "[COLOR 0xFFF9B613][B]O[/B][/COLOR]"
# OK = "[COLOR 0xFF00C289][B]O[/B][/COLOR]"
# KO = "[COLOR 0xFFC20000][B]O[/B][/COLOR]"
# NK = "[COLOR 0xFFF9B613][B][/B][/COLOR]"
# OK = "[COLOR 0xFF00C289][B][/B][/COLOR]"
# KO = "[COLOR 0xFFC20000][B][/B][/COLOR]"
try:
server_module = __import__('servers.%s' % server, None, None, ["servers.%s" % server])
+12 -5
View File
@@ -564,14 +564,15 @@ def pagination(itemlist, item, page, perpage, function_level=1):
thumbnail=thumb()))
return itemlist
def server(item, data='', itemlist='', headers='', AutoPlay=True, CheckLinks=True):
def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True):
if not data:
data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True).data
if not itemlist:
itemlist = servertools.find_video_items(data=str(data))
itemList = servertools.find_video_items(data=str(data))
itemlist += itemList
for videoitem in itemlist:
videoitem.title = "".join([item.title, ' ', typo(videoitem.title, 'color kod []'), typo(videoitem.quality, 'color kod []') if videoitem.quality else ""])
videoitem.fulltitle = item.fulltitle
@@ -587,6 +588,12 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True):
from platformcode.config import get_setting
CL = get_setting('checklinks') or get_setting('checklinks', item.channel)
autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY')
channel_node = autoplay_node.get(item.channel, {})
if not channel_node: # non ha mai aperto il menu del canale quindi in autoplay_data.json non c'e la key
channelFile = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel])
autoplay.init(item.channel, channelFile.list_servers, channelFile.list_quality)
autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY')
channel_node = autoplay_node.get(item.channel, {})
settings_node = channel_node.get('settings', {})