避免重复把弹幕压进去
This commit is contained in:
parent
0b01f1d77d
commit
981c0a443c
@ -101,6 +101,8 @@ def safe_create_item():
|
|||||||
bili_record_workflow_item = Workflow()
|
bili_record_workflow_item = Workflow()
|
||||||
elif bili_record_workflow_item.id is not None:
|
elif bili_record_workflow_item.id is not None:
|
||||||
bili_record_workflow_item.editing = False
|
bili_record_workflow_item.editing = False
|
||||||
|
if bili_record_workflow_item.name is None:
|
||||||
|
bili_record_workflow_item.name = VIDEO_TITLE.format(datetime.utcnow().strftime("%Y%m%d"))
|
||||||
commit_item()
|
commit_item()
|
||||||
auto_submit_task()
|
auto_submit_task()
|
||||||
bili_record_workflow_item = Workflow()
|
bili_record_workflow_item = Workflow()
|
||||||
@ -165,6 +167,14 @@ def collect_danmaku_files(workflow: Optional[Workflow]):
|
|||||||
if bias < -600:
|
if bias < -600:
|
||||||
print("弹幕文件", danmaku_file, "反向偏移超过10分钟")
|
print("弹幕文件", danmaku_file, "反向偏移超过10分钟")
|
||||||
continue
|
continue
|
||||||
|
if len(clip.danmaku_clips) > 0:
|
||||||
|
matched = False
|
||||||
|
for d in clip.danmaku_clips:
|
||||||
|
if relpath == d.file:
|
||||||
|
matched = True
|
||||||
|
break
|
||||||
|
if matched:
|
||||||
|
continue
|
||||||
danmaku = DanmakuClip()
|
danmaku = DanmakuClip()
|
||||||
danmaku.file = relpath
|
danmaku.file = relpath
|
||||||
danmaku.base_path = XIGUALIVE_RECORDER_DIRECTORY
|
danmaku.base_path = XIGUALIVE_RECORDER_DIRECTORY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user