add content-type to upstream
This commit is contained in:
parent
6fa6426f79
commit
8d10c54636
@ -51,7 +51,11 @@ class ProxyElem():
|
||||
data_list = []
|
||||
for url in urls:
|
||||
data = {}
|
||||
if isinstance(url, str):
|
||||
data["upstream"] = url
|
||||
elif isinstance(url, tuple):
|
||||
data["upstream"] = url[0]
|
||||
data["ctype"] = url[1]
|
||||
data["proxy"] = self.proxy
|
||||
data["proxied"] = isinstance(self.proxy, str)
|
||||
data_list.append(data)
|
||||
@ -240,7 +244,7 @@ class MainHandler(tornado.web.RequestHandler):
|
||||
provider_data = await stream_providers.get_seafile(handler.upstream, handler.proxy, logger)
|
||||
else:
|
||||
provider_data = await stream_providers.get_any(handler.upstream, handler.proxy, logger)
|
||||
proxied = await handler.proxy.proxy_url([provider_data.upstream(), provider_data.thumbnail()])
|
||||
proxied = await handler.proxy.proxy_url([(provider_data.upstream(), provider_data.proxy_ctype()), provider_data.thumbnail()])
|
||||
video_info = {}
|
||||
video_info["upstream"] = proxied[0]
|
||||
video_info["poster"] = proxied[1]
|
||||
|
Loading…
Reference in New Issue
Block a user