Skip to content

Commit

Permalink
fix: fix launch settings and upload titles (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
timerring authored Dec 17, 2024
1 parent 6228175 commit af0df53
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ enable_recorder = true
[output]
path_template = "{roomid}/{roomid}_{year}{month}{day}-{hour}-{minute}-{second}"
filesize_limit = 0
duration_limit = 1200
duration_limit = 1800
out_dir = "./Videos"

[logging]
Expand Down Expand Up @@ -51,7 +51,7 @@ inject_extra_metadata = true
delete_source = "auto"

[space]
check_interval = 0
check_interval = 300
space_threshold = 10737418240
recycle_records = false

Expand Down
11 changes: 9 additions & 2 deletions src/upload/extract_video_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import os
from datetime import datetime
from src.upload.query_search_suggestion import get_bilibili_suggestions
from src.config import GPU_EXIST

def get_video_info(video_file_path):
"""get the title, artist and date of the video file via ffprobe
Expand Down Expand Up @@ -36,13 +37,19 @@ def get_video_info(video_file_path):

def generate_title(video_path):
title, artist, date = get_video_info(video_path)
new_title = "【弹幕+字幕】" + artist + "直播回放-" + date + "-" + title
if GPU_EXIST:
new_title = "【弹幕+字幕】" + artist + "直播回放-" + date + "-" + title
else:
new_title = "【弹幕】" + artist + "直播回放-" + date + "-" + title
return new_title

def generate_desc(video_path):
title, artist, date = get_video_info(video_path)
source_link = generate_source(video_path)
new_desc = "【弹幕+字幕】" + artist + "直播,直播间地址:" + source_link + " 内容仅供娱乐,直播中主播的言论、观点和行为均由主播本人负责,不代表录播员的观点或立场。"
if GPU_EXIST:
new_desc = "【弹幕+字幕】" + artist + "直播,直播间地址:" + source_link + " 内容仅供娱乐,直播中主播的言论、观点和行为均由主播本人负责,不代表录播员的观点或立场。"
else:
new_desc = "【弹幕】" + artist + "直播,直播间地址:" + source_link + " 内容仅供娱乐,直播中主播的言论、观点和行为均由主播本人负责,不代表录播员的观点或立场。"
return new_desc

def generate_tag(video_path):
Expand Down

0 comments on commit af0df53

Please sign in to comment.