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