test referer ai server
This commit is contained in:
@@ -151,6 +151,7 @@ def newest(categoria):
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def check(item):
|
||||
support.info()
|
||||
data = support.match(item.url, headers=headers).data
|
||||
@@ -170,10 +171,11 @@ def check(item):
|
||||
|
||||
else:
|
||||
item.contentType = 'movie'
|
||||
item.url = data
|
||||
item.data = data
|
||||
return findvideos(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
item.url = item.url.replace('http://rapidcrypt.net/verys/', '').replace('http://rapidcrypt.net/open/', '') #blocca la ricerca
|
||||
return support.server(item, data= item.url)
|
||||
item.data = item.data.replace('http://rapidcrypt.net/verys/', '').replace('http://rapidcrypt.net/open/', '') #blocca la ricerca
|
||||
return support.server(item, data=item.data)
|
||||
|
||||
@@ -1165,6 +1165,7 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
||||
videoitem.contentType = item.contentType
|
||||
videoitem.infoLabels = item.infoLabels
|
||||
videoitem.quality = quality
|
||||
videoitem.referer = item.url
|
||||
videoitem.action = "play"
|
||||
# videoitem.nfo = item.nfo
|
||||
# videoitem.strm_path = item.strm_path
|
||||
|
||||
@@ -629,6 +629,10 @@ def play_video(item, strm=False, force_direct=False, autoplay=False):
|
||||
default_action = config.get_setting("default_action")
|
||||
logger.debug("default_action=%s" % default_action)
|
||||
|
||||
# pass referer
|
||||
from core import httptools
|
||||
httptools.default_headers['Referer'] = item.referer
|
||||
|
||||
# Open the selection dialog to see the available options
|
||||
opciones, video_urls, seleccion, salir = get_dialogo_opciones(item, default_action, strm, autoplay)
|
||||
if salir: exit()
|
||||
|
||||
Reference in New Issue
Block a user