Skip to content

Commit cf16896

Browse files
committed
1.4.822
1 parent 829f68e commit cf16896

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Cogs/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# VERSION = {major}.{minor}.{datetime}
2-
VERSION = "1.3.709"
2+
VERSION = "1.4.822"
33

44
TWITCH_APP_ID = ""
55
TWITCH_APP_SECRET = ""

Cogs/twitch.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def error(self, msg):
3939
'forcetitle': False,
4040
'forcedescription': False,
4141
'outtmpl': u'Videos/%(id)s.%(ext)s',
42+
'external_downloader' : 'aria2c',
4243
}
4344

4445
game_mode = {
@@ -206,13 +207,15 @@ async def t(self, ctx, *args):
206207

207208
video.title = f"[{game_mode[video_info.mode]}] {video_info.match_name} {video_info.match_stage}: ({video_info.team1}) vs ({video_info.team2})" if video_info.match_name is not None else title
208209

209-
video.desc = f"{description if video_info.match_name is not None else ''}\n原标题:{title}\n{'这是一个B站特供剪辑版,该视频已自动过滤敏感内容。' if video_info.sstime is not None else ''}\n\n比赛详情:{video_info.forum if video_info.forum is not None else '暂无'}\nMP Link:{video_info.mplink if video_info.mplink is not None else '暂无'}\n比赛时间:{datetime.fromtimestamp(timestamp)} (UTC)\n\nAuto upload by Twitsu v{VERSION}\ngithub.com/HarukaKinen/Twitsu"
210+
video.desc = f"{description if video_info.match_name is not None else ''}\n原标题:{title}\n{'该版本是一个B站特供剪辑版,该稿件已尝试自动过滤了部分敏感内容。' if video_info.sstime is not None else ''}\n\n比赛详情:{video_info.forum if video_info.forum is not None else '暂无'}\nMP Link:{video_info.mplink if video_info.mplink is not None else '暂无'}\n比赛时间:{datetime.fromtimestamp(timestamp)} (UTC)\n\nAuto upload by Twitsu v{VERSION}\nhttps://github.com/HarukaKinen/Twitsu"
210211

211212
tagList = []
212213
tagList.append("比赛录像")
213214
tagList.append(game_mode[video_info.mode])
214215
if video_info.match_name is not None:
215216
tagList.append(video_info.match_name)
217+
if "中国" in video.title:
218+
tagList.append("中国队")
216219
video.set_tag(tagList)
217220

218221
video.source = video_info.video
@@ -226,7 +229,7 @@ async def t(self, ctx, *args):
226229
'DedeUserID__ckMd5': BILI_DEDEUSERID_CKMD5,
227230
'DedeUserID': BILI_DEDEUSERID
228231
}, 'access_token': BILI_ACCESS_TOKEN})
229-
232+
230233
video_part = bili.upload_file(
231234
video_info.path, lines='AUTO', tasks=3) # 上传视频,默认线路AUTO自动选择,线程数量3。
232235
video.append(video_part)

0 commit comments

Comments
 (0)