File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 1616# f"{date}-{artist}直播回放" - 20250328-Streamer直播回放
1717DESC = "{artist}直播回放,直播间地址:{source_link} 内容仅供娱乐,直播中主播的言论、观点和行为均由主播本人负责,不代表录播员的观点或立场。"
1818# You can change the description as you like.
19+ GIFT_PRICE_FILTER = 1 # The gift whose price is less than this value will be filtered, unit: RMB
1920# ============================ The video slice configuration ==================
2021AUTO_SLICE = False
2122SLICE_DURATION = 60 # better not exceed 300 seconds
Original file line number Diff line number Diff line change 22
33import argparse
44import xml .etree .ElementTree as ET
5+ from src .config import GIFT_PRICE_FILTER
56
67def update_danmaku_prices (file_path ):
78 """Adjust the price of sc and guard, see this:
@@ -41,7 +42,8 @@ def update_danmaku_prices(file_path):
4142 # Remove 'gift' elements with price less than 1000
4243 for gift in root .findall ('gift' ):
4344 price_gift = gift .get ('price' )
44- if int (price_gift ) < 1000 :
45+ converted_price = int (GIFT_PRICE_FILTER * 1000 )
46+ if int (price_gift ) < converted_price :
4547 root .remove (gift )
4648
4749 # Write the updated XML back to the file
You can’t perform that action at this time.
0 commit comments