提交 6301385a 编写于 作者: H hjdhnx

修复原版无法直播的问题

上级 e783d471
......@@ -487,6 +487,21 @@ def get_lives():
response.headers['Content-Type'] = 'text/plain; charset=utf-8'
return response
@app.route('/liveslib')
def get_liveslib():
live_path = 'js/custom_spider.jar'
if not os.path.exists(live_path):
with open(live_path,mode='w+',encoding='utf-8') as f:
f.write('')
with open(live_path,mode='rb') as f:
live_text = f.read()
response = make_response(live_text)
filename = 'custom_spider.jar'
response.headers['Content-Type'] = 'application/octet-stream'
response.headers['Content-Disposition'] = f'attachment;filename="{filename}"'
return response
@app.route('/configs')
def config_gen():
# 生成文件
......
......@@ -32,6 +32,7 @@ ADD app.sh /etc/autostart/
# armv7安装gcc
# RUN apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
RUN chmod +x /etc/autostart/app.sh && apt-get clean && apt-get update
RUN apt-get install python3-lxml -y
# 执行指令,换源并安装依赖 设置默认pip源
RUN pip install -i https://mirrors.cloud.tencent.com/pypi/simple --upgrade pip \
&& pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple \
......@@ -56,7 +57,7 @@ EXPOSE 5705 9001
# docker build -f dockerfile -t hjdhnx/drpy_mini . 构建命令,非此文件内命令
# docker push hjdhnx/drpy_mini
# docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -f dockerfile -t hjdhnx/drpy:mini_arm64 .
# docker buildx build --platform linux/arm/v7 -f dockerfile -t hjdhnx/drpy:armv7 .
# docker buildx build --platform linux/arm/v7 -f dockerfile -t hjdhnx/drpy_armv7 .
# docker buildx build --platform linux/arm/v7 -f dockerfile -t hjdhnx/drpy:armv7 --push .
# 启动命令,非此文件内命令
# docker run -it -p 5705:5705 -p 9001:9001 -v /home/pywork/dr_py:/root/sd/pywork/dr_py --restart=always --name drpy -d hjdhnx/drpy:mini
......
文件已添加
......@@ -43,7 +43,9 @@
[dockerfile教程](https://blog.csdn.net/qq_46158060/article/details/125718218)
[获取本地设备信息](https://blog.csdn.net/cui_yonghua/article/details/125508991)
[获取本地设备信息](https://m.jb51.net/article/140716.htm)
###### 2022/09/04
- [X] 1.内置jar修复了原本tv_box无法播放直播的问题
- [X] 2.重新构建了三种平台的镜像 amd64,armv7,arm64
###### 2022/09/04
- [X] 1.增加了dockerfile
- [X] 2.基于dockerfile构建的镜像并上传至dockerhub,小白可以一键运行.参考[搭建教程](./安卓本地搭建说明.md)
......
......@@ -2,6 +2,7 @@
{% if config.WALL_PAPER_ENABLE %}"wallpaper":"{{ host }}/pics",{% endif %}
"dr_count": {{rules.list|length}},
"mode": {{ mode }},
"spider": "{{ host }}/liveslib",
"homepage":"https://gitcode.net/qq_32394351/dr_py",
"sites": [{% for rule in rules.list %}{% if mode == 0 %}
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册