thumb server di default e rimosso server duplicato
This commit is contained in:
@@ -32,7 +32,6 @@ def hdpass_get_servers(item):
|
|||||||
def get_hosts(url, quality):
|
def get_hosts(url, quality):
|
||||||
ret = []
|
ret = []
|
||||||
page = httptools.downloadpage(url).data
|
page = httptools.downloadpage(url).data
|
||||||
log(page)
|
|
||||||
|
|
||||||
mir = scrapertools.find_single_match(page, patron_mir)
|
mir = scrapertools.find_single_match(page, patron_mir)
|
||||||
|
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ def render_items(itemlist, parent_item):
|
|||||||
Function used to render itemlist on kodi
|
Function used to render itemlist on kodi
|
||||||
"""
|
"""
|
||||||
logger.info('START render_items')
|
logger.info('START render_items')
|
||||||
|
thumb_type = config.get_setting('video_thumbnail_type')
|
||||||
from specials import shortcuts
|
from specials import shortcuts
|
||||||
from core import httptools
|
from core import httptools
|
||||||
_handle = int(sys.argv[1])
|
_handle = int(sys.argv[1])
|
||||||
@@ -166,10 +167,12 @@ def render_items(itemlist, parent_item):
|
|||||||
item.folder = False
|
item.folder = False
|
||||||
if item.fanart == "":
|
if item.fanart == "":
|
||||||
item.fanart = parent_item.fanart
|
item.fanart = parent_item.fanart
|
||||||
|
if item.action == 'play' and thumb_type == 1:
|
||||||
|
item.thumbnail = "https://github.com/kodiondemand/media/raw/master/resources/servers/" + item.server.lower() + '.png'
|
||||||
|
|
||||||
# if cloudflare, cookies are needed to display images taken from site
|
# if cloudflare, cookies are needed to display images taken from site
|
||||||
# before checking domain (time consuming), checking if tmdb failed (so, images scraped from website are used)
|
# before checking domain (time consuming), checking if tmdb failed (so, images scraped from website are used)
|
||||||
if item.action in ['findvideos', 'play'] and not item.infoLabels['tmdb_id'] and scrapertools.get_domain_from_url(item.thumbnail) in httptools.domainCF:
|
if item.action in ['findvideos'] and not item.infoLabels['tmdb_id'] and scrapertools.get_domain_from_url(item.thumbnail) in httptools.domainCF:
|
||||||
item.thumbnail = httptools.get_url_headers(item.thumbnail)
|
item.thumbnail = httptools.get_url_headers(item.thumbnail)
|
||||||
item.fanart = httptools.get_url_headers(item.fanart)
|
item.fanart = httptools.get_url_headers(item.fanart)
|
||||||
|
|
||||||
@@ -183,18 +186,15 @@ def render_items(itemlist, parent_item):
|
|||||||
|
|
||||||
set_infolabels(listitem, item)
|
set_infolabels(listitem, item)
|
||||||
|
|
||||||
|
# context menu
|
||||||
if parent_item.channel != 'special':
|
if parent_item.channel != 'special':
|
||||||
context_commands = def_context_commands + set_context_commands(item, item_url, parent_item, has_extendedinfo=has_extendedinfo,
|
context_commands = def_context_commands + set_context_commands(item, item_url, parent_item, has_extendedinfo=has_extendedinfo,
|
||||||
superfavourites=superfavourites)
|
superfavourites=superfavourites)
|
||||||
else:
|
else:
|
||||||
context_commands = def_context_commands
|
context_commands = def_context_commands
|
||||||
# Añadimos el menu contextual
|
listitem.addContextMenuItems(context_commands)
|
||||||
if config.get_platform(True)['num_version'] >= 17.0 and parent_item.list_type == '':
|
|
||||||
listitem.addContextMenuItems(context_commands)
|
|
||||||
elif parent_item.list_type == '':
|
|
||||||
listitem.addContextMenuItems(context_commands, replaceItems=True)
|
|
||||||
|
|
||||||
xbmcplugin.addDirectoryItem(_handle, '%s?%s' % (sys.argv[0], item_url), listitem, item.folder, totalItems=4)
|
xbmcplugin.addDirectoryItem(_handle, '%s?%s' % (sys.argv[0], item_url), listitem, item.folder)
|
||||||
|
|
||||||
if parent_item.list_type == '':
|
if parent_item.list_type == '':
|
||||||
breadcrumb = parent_item.category.capitalize()
|
breadcrumb = parent_item.category.capitalize()
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
<setting id="icon_set" type="select" label="70108" values="default|light|dark|alfa|mike" default="default"/>
|
<setting id="icon_set" type="select" label="70108" values="default|light|dark|alfa|mike" default="default"/>
|
||||||
<setting id="enable_custom_theme" type="bool" label="70564" default="false"/>
|
<setting id="enable_custom_theme" type="bool" label="70564" default="false"/>
|
||||||
<setting id="custom_theme" type="folder" label="70565" default="" visible="eq(-1,true)"/>
|
<setting id="custom_theme" type="folder" label="70565" default="" visible="eq(-1,true)"/>
|
||||||
<setting id="video_thumbnail_type" type="select" label="70131" lvalues="70132|70133" default="0"/>
|
<setting id="video_thumbnail_type" type="select" label="70131" lvalues="70132|70133" default="1"/>
|
||||||
<!-- Contextual -->
|
<!-- Contextual -->
|
||||||
<setting label="30024" type="lsep"/>
|
<setting label="30024" type="lsep"/>
|
||||||
<setting id="quick_menu" type="bool" label="60360" default="false"/>
|
<setting id="quick_menu" type="bool" label="60360" default="false"/>
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"active": true,
|
|
||||||
"find_videos": {
|
|
||||||
"ignore_urls": [],
|
|
||||||
"patterns": [
|
|
||||||
{
|
|
||||||
"pattern": "(https://vup.to/embed-[A-z0-9]+.html)",
|
|
||||||
"url": "\\1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pattern": "https://vup.to/emb.html\\?([A-z0-9]+)",
|
|
||||||
"url": "https://vup.to/embed-\\1.html"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"free": true,
|
|
||||||
"id": "vup",
|
|
||||||
"name": "vup",
|
|
||||||
"settings": [
|
|
||||||
{
|
|
||||||
"default": false,
|
|
||||||
"enabled": true,
|
|
||||||
"id": "black_list",
|
|
||||||
"label": "@60654",
|
|
||||||
"type": "bool",
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"default": 0,
|
|
||||||
"enabled": true,
|
|
||||||
"id": "favorites_servers_list",
|
|
||||||
"label": "@60655",
|
|
||||||
"lvalues": [
|
|
||||||
"No",
|
|
||||||
"1",
|
|
||||||
"2",
|
|
||||||
"3",
|
|
||||||
"4",
|
|
||||||
"5"
|
|
||||||
],
|
|
||||||
"type": "list",
|
|
||||||
"visible": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"thumbnail": "https://i.postimg.cc/ZKjvqXxj/vup.png"
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# --------------------------------------------------------
|
|
||||||
# Conector vup By Alfa development Group
|
|
||||||
# --------------------------------------------------------
|
|
||||||
from core import httptools
|
|
||||||
from core import scrapertools
|
|
||||||
from platformcode import config
|
|
||||||
from platformcode import logger
|
|
||||||
|
|
||||||
|
|
||||||
def test_video_exists(page_url):
|
|
||||||
logger.info("(page_url='%s')" % page_url)
|
|
||||||
data = httptools.downloadpage(page_url).data
|
|
||||||
if "no longer exists" in data or "to copyright issues" in data:
|
|
||||||
return False, config.get_localized_string(70449) % "vup"
|
|
||||||
return True, ""
|
|
||||||
|
|
||||||
|
|
||||||
def get_video_url(page_url, user="", password="", video_password=""):
|
|
||||||
logger.info("(page_url='%s')" % page_url)
|
|
||||||
data = httptools.downloadpage(page_url).data
|
|
||||||
bloque = scrapertools.find_single_match(data, 'sources:.*?\]')
|
|
||||||
video_urls = []
|
|
||||||
videourl = scrapertools.find_multiple_matches(bloque, '"(http[^"]+)')
|
|
||||||
for video in videourl:
|
|
||||||
video_urls.append([".MP4 [vup]", video])
|
|
||||||
video_urls = video_urls[::-1]
|
|
||||||
return video_urls
|
|
||||||
Reference in New Issue
Block a user