提交 34d90368 编写于 作者: H hjdhnx

增加本地直播地址

上级 bd3ce427
......@@ -294,6 +294,19 @@ def config_render(mode):
response.headers['Content-Type'] = 'application/json; charset=utf-8'
return response
@app.route('/lives')
def get_lives():
live_path = 'js/直播.txt'
if not os.path.exists(live_path):
with open(live_path,mode='w+',encoding='utf-8') as f:
f.write('')
with open(live_path,encoding='utf-8') as f:
live_text = f.read()
response = make_response(live_text)
response.headers['Content-Type'] = 'text/plain; charset=utf-8'
return response
@app.route('/configs')
def config_gen():
# 生成文件
......
此差异已折叠。
......@@ -48,7 +48,7 @@
}{% if loop.last==False %},{% endif %}{% endfor %}
],
"flags": ["youku", "qq", "iqiyi", "qiyi", "letv", "sohu", "tudou","xigua","cntv","1905", "pptv", "mgtv", "wasu", "bilibili", "renrenmi"],
"lives":[{"group":"redirect","channels":[{"name":"直播","urls":["proxy://do=live&type=txt&ext=aHR0cHM6Ly9hZ2l0LmFpL2xjeC8xMS9yYXcvYnJhbmNoL21hc3Rlci9saXZl"]}]}],
"lives":[{"group":"redirect","channels":[{"name":"直播","urls":["proxy://do=live&type=txt&ext={{ host }}/lives"]}]}],
"ijk": [{
"group": "软解码",
"options": [{
......
......@@ -13,3 +13,6 @@ assert subprocess.call(
shell=True,
cwd=DIRNAME) == 0, 'Could not link required node_modules'
远程直播地址:
"lives":[{"group":"redirect","channels":[{"name":"直播","urls":["proxy://do=live&type=txt&ext=aHR0cHM6Ly9hZ2l0LmFpL2xjeC8xMS9yYXcvYnJhbmNoL21hc3Rlci9saXZl"]}]}],
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册