SmallPeaches / DanmakuRender

一个可以录制带弹幕直播流的小工具
328 stars 37 forks source link

自动清理功能,move不起作用 #126

Closed huleiya closed 12 months ago

huleiya commented 12 months ago

上传视频后直接清理了,并没有将上传的视频复制或移动到指定文件夹,这里的method设置成move或copy都不行,配置文件的自动清理部分如下:

# 自动清理
clean:
  # 清理方法,可选copy(复制),move(移动),delete(删除),默认不清理
  # 请注意:清理过程不可逆!最好还是自己手动清理!
  src_video:
    - method: copy
      dest: './直播回放/{STREAMER}{YEAR}年{MONTH}月{DAY}日'
      delay: 0
    - method: delete
      delay: 0

  dm_video:
    - method: delete
      delay: 172800
huleiya commented 12 months ago

日志报错: [2023-10-06 16:53:10,614][init][INFO]: 视频 ['./直播回放\i妍霏-2023年10月06日15点50分.flv'] 上传完成:

[2023-10-06 16:53:10,614][init][INFO]: 添加以下文件到清理队列: ['./直播回放\i妍霏-2023年10月06日15点50分.flv', './直播回放\i妍霏-2023年10月06日15点50分.ass']. [2023-10-06 16:53:10,614][init][DEBUG]: Clean files: {'msg_type': 'clean', 'method': 'copy', 'video': './直播回放\i妍霏-2023年10月06日15点50分.flv', 'group': 'i妍霏', 'video_info': {'url': 'https//www.douyu.com/9119044', 'taskname': 'i妍霏', 'streamer': 'i妍霏', 'title': '总有些惊奇的际遇 9119044', 'time': datetime.datetime(2023, 10, 6, 15, 50, 37, 109219), 'has_danmu': '', 'duration': 3599.828545808792}, 'config': {'dest': './直播回放/{STREAMER}{YEAR}年{MONTH}月{DAY}日', 'delay': 0, 'strict': True, 'wait': True, 'method': 'copy'}, 'kwargs': {}} [2023-10-06 16:53:10,614][init][ERROR]: 'str' object has no attribute 'startwith' Traceback (most recent call last): File "D:\DanmakuRender-4\DMR\Cleaner__init__.py", line 45, in _run_queue if dst and not dst.startwith('*'): AttributeError: 'str' object has no attribute 'startwith'

SmallPeaches commented 12 months ago

你下载zip,别用release里面那个就好了

huleiya commented 12 months ago

下载zip最新版本后,问题解决