Migliorie a:
- youtube - vimeo - Inserisci url - support.server
This commit is contained in:
@@ -1059,7 +1059,7 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
||||
item.title = typo(item.contentTitle.strip(),'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title
|
||||
|
||||
videoitem.plot= typo(videoitem.title, 'bold') + typo(videoitem.quality, '_ [] bold')
|
||||
videoitem.title = item.title + (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 "")
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.show = item.show
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
@@ -1079,13 +1079,17 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True, vid
|
||||
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)
|
||||
try:
|
||||
channelFile = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel])
|
||||
except:
|
||||
channelFile = __import__('specials.' + item.channel, fromlist=["specials.%s" % item.channel])
|
||||
if hasattr(channelFile, 'list_servers') and hasattr(channelFile, 'list_quality'):
|
||||
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', {})
|
||||
AP = get_setting('autoplay') or settings_node['active']
|
||||
AP = get_setting('autoplay') or (settings_node['active'] if 'active' in settings_node else False)
|
||||
HS = config.get_setting('hide_servers') or (settings_node['hide_servers'] if 'hide_server' in settings_node else False)
|
||||
|
||||
if CL and not AP:
|
||||
|
||||
@@ -999,7 +999,7 @@ def get_dialogo_opciones(item, default_action, strm, autoplay):
|
||||
# Si puedes ver el vídeo, presenta las opciones
|
||||
if puedes:
|
||||
for video_url in video_urls:
|
||||
opciones.append(config.get_localized_string(30151) + " " + video_url[0])
|
||||
opciones.append(config.get_localized_string(60221) + " " + video_url[0])
|
||||
|
||||
if item.server == "local":
|
||||
opciones.append(config.get_localized_string(30164))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"free": true,
|
||||
"id": "vimeo",
|
||||
"name": "vimeo",
|
||||
"name": "Vimeo",
|
||||
"premium": [
|
||||
"realdebrid",
|
||||
"alldebrid"
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
from platformcode import logger, config
|
||||
headers = [['User-Agent', 'Mozilla/5.0']]
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
headers = [['User-Agent', 'Mozilla/5.0']]
|
||||
|
||||
global data
|
||||
if "|" in page_url:
|
||||
page_url, referer = page_url.split("|", 1)
|
||||
headers.append(['Referer', referer])
|
||||
@@ -16,12 +15,24 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
page_url = scrapertools.find_single_match(page_url, ".*?video/[0-9]+")
|
||||
|
||||
data = httptools.downloadpage(page_url, headers=headers).data
|
||||
|
||||
if "Private Video on Vimeo" in data or "Sorry" in data:
|
||||
return False, config.get_localized_string(70449) % 'Vimeo'
|
||||
else:
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
|
||||
global data
|
||||
patron = 'mime":"([^"]+)"'
|
||||
patron += '.*?url":"([^"]+)"'
|
||||
patron += '.*?quality":"([^"]+)"'
|
||||
match = scrapertools.find_multiple_matches(data, patron)
|
||||
for mime, media_url, calidad in match:
|
||||
title = "%s (%s) [vimeo]" % (mime.replace("video/", "."), calidad)
|
||||
title = "%s (%s) [Vimeo]" % (mime.replace("video/", "."), calidad)
|
||||
video_urls.append([title, media_url, int(calidad.replace("p", ""))])
|
||||
|
||||
video_urls.sort(key=lambda x: x[2])
|
||||
|
||||
@@ -215,7 +215,7 @@ def extract_videos(video_id):
|
||||
url = re.search('url=(.*)', opt["cipher"]).group(1)
|
||||
s = cipher.get('s')
|
||||
url = "%s&sig=%s" % (urllib.unquote(url), signature([s]))
|
||||
video_urls.append(["%s" % itag_list.get(opt["itag"], "video"), url])
|
||||
video_urls.append(["%s" % itag_list.get(opt["itag"], "audio"), url])
|
||||
elif opt["itag"] in itag_list:
|
||||
video_urls.append(["%s" % itag_list.get(opt["itag"], "video"), opt["url"]])
|
||||
|
||||
|
||||
@@ -27,10 +27,8 @@ def search(item, text):
|
||||
itemlist = []
|
||||
|
||||
if "server" in item.args:
|
||||
itemlist = servertools.find_video_items(data=text)
|
||||
for item in itemlist:
|
||||
item.channel = "url"
|
||||
item.action = "play"
|
||||
from core.support import server
|
||||
itemlist = server(item, text)
|
||||
elif "direct" in item.args:
|
||||
itemlist.append(Item(channel=item.channel, action="play", url=text, server="directo", title=config.get_localized_string(60092)))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user