Skip to content

Commit 5d54c7e

Browse files
authored
feat: open tid (#279)
1 parent 3895431 commit 5d54c7e

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ MLLM 模型主要用于自动切片后的切片标题生成,此功能默认关
211211

212212
- `title` 标题模板。
213213
- `description` 简介模板。
214+
- `tid` 视频分区,请参考 [bilitool tid](https://bilitool.timerring.com/tid.html) 文档。
214215
- `gift_price_filter = 1` 表示过滤价格低于 1 元的礼物。
215216
- `reserve_for_fixing = false` 表示如果视频出现错误,重试失败后不保留视频用于修复,推荐硬盘空间有限的用户设置 false。
216217
- `upload_line = "auto"` 表示自动探测上传线路并上传,如果需要指定固定的线路,可以设置为 `bldsa``ws``tx``qn``bda2`

bilive.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ inference_model = "small" # If you choose "deploy", you should download the infe
1717
# You can change the title as you like, eg.
1818
title = "{date}直播" # Key words: {artist}, {date}, {title}, {source_link}
1919
description = "录制请征求主播同意,若未经同意就录制,所引起的任何法律问题均由该违规录制的 b 站账号承担。" # Key words: {artist}, {date}, {title}, {source_link}
20+
tid = # The tid of the video, see https://bilitool.timerring.com/tid.html
2021
gift_price_filter = 1 # The gift whose price is less than this value will be filtered, unit: RMB
2122
reserve_for_fixing = false # If encounter MOOV crash error, delete the video or reserve for fixing
2223
upload_line = "auto" # The upload line to be used, default None is auto detect(recommended), if you want to specify, it can be "bldsa", "ws", "tx", "qn", "bda2".

src/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def get_interface_config():
6262

6363
TITLE = config.get("video", {}).get("title")
6464
DESC = config.get("video", {}).get("description")
65+
TID = config.get("video", {}).get("tid")
6566
GIFT_PRICE_FILTER = config.get("video", {}).get("gift_price_filter")
6667
RESERVE_FOR_FIXING = config.get("video", {}).get("reserve_for_fixing")
6768
UPLOAD_LINE = config.get("video", {}).get("upload_line")

src/upload/generate_upload_data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
)
1313
import subprocess
1414
import json
15+
from src.config import TID
1516

1617

1718
def generate_video_data(video_path):
1819
title = generate_title(video_path)
1920
desc = generate_desc(video_path)
20-
tid = 138
21+
tid = TID
2122
tag = generate_tag(video_path)
2223
source = generate_source(video_path)
2324
cover = ""
@@ -41,7 +42,7 @@ def generate_slice_data(video_path):
4142
)
4243
parsed_output = json.loads(output)
4344
title = parsed_output["format"]["tags"]["generate"]
44-
tid = 138
45+
tid = TID
4546
tag = "直播切片"
4647
return title, tid, tag
4748
except Exception as e:

0 commit comments

Comments
 (0)