hr3lxphr6j / bililive-go

一个直播录制工具
GNU General Public License v3.0
3.96k stars 511 forks source link

增加计划任务,定时监控的功能 #777

Open voidSpir1t opened 4 months ago

voidSpir1t commented 4 months ago

fix #406 #434

voidSpir1t commented 4 months ago

不好意思, src/cmd/bililive/bililive.go 的 166 行的打印忘了删除了😂

212884177 commented 2 months ago

这功能还没有人合并吗?

hibiki222 commented 2 months ago

有bug 如果是刚下播的 没设置开启时间关闭时间 会出现一直开启监控 关闭监控 time="2024-09-26 18:30:07" level=info msg="Live Start" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:07" level=info msg="Record Start" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:08" level=info msg="exit status 1" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:08" level=warning msg="failed to get stream url, will retry after 5s..." error="vMultiStreamInfo not found" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:17" level=info msg="Live end" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:17" level=info msg="Record End" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:17" level=info msg="" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:20" level=info msg="Live Start" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:20" level=info msg="Record Start" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:20" level=warning msg="failed to get stream url, will retry after 5s..." error="vMultiStreamInfo not found" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:23" level=info msg="Live end" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:23" level=info msg="Record End" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:31" level=info msg="Live Start" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:31" level=info msg="Record Start" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:36" level=info msg="Live end" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:36" level=info msg="Record End" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:36" level=info msg="" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:45" level=info msg="Live Start" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:45" level=info msg="Record Start" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:45" level=warning msg="failed to get stream url, will retry after 5s..." error="vMultiStreamInfo not found" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:49" level=info msg="Live end" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:49" level=info msg="Record End" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:52" level=info msg="Live Start" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:52" level=info msg="Record Start" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:57" level=info msg="Live end" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:57" level=info msg="Record End" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:57" level=info msg="" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:58" level=info msg="Live Start" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:58" level=info msg="Record Start" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:30:58" level=warning msg="failed to get stream url, will retry after 5s..." error="vMultiStreamInfo not found" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:31:06" level=info msg="Live end" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:31:06" level=info msg="Record End" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~" time="2024-09-26 18:31:06" level=info msg="" host="是萌萌呀【719】" room="【江西】热舞中~想亮灯呢~"

hibiki222 commented 2 months ago

这个功能有重大bug,实测,会导致没设置定时的虎牙主播胡乱开播下播,不清楚是那个原因,斗鱼和抖音主播暂时没事

kira1928 commented 1 week ago

有两点建议。

  1. 相信 cron 语法对大多数用户来说都很陌生,设置错了也难以排查。建议使用更易懂的明文参数名来设置开始和停止监控的时间。
  2. 仅在主程序启动阶段注册cron,可能漏掉程序启动后从网页UI上动态添加删除的直播间信息。希望有一个更好的(不会遗漏,易于追踪的?)管理定时录制的方法。