Skip to content

Commit 8e71bf8

Browse files
authored
v1.13.1: 稍微提速
1 parent b1d3af7 commit 8e71bf8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

BilibiliVideoDownloader.user.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @name Bilibili Video Downloader
33
// @name:zh 哔哩哔哩视频下载器
44
// @namespace https://github.com/jc3213/userscript
5-
// @version 1.13.0
5+
// @version 1.13.1
66
// @description Download videos from Bilibili (No Bangumi)
77
// @description:zh 下载哔哩哔哩视频(不支持番剧)
88
// @author jc3213
@@ -122,8 +122,16 @@ function bVideoItems(json) {
122122
}
123123

124124
function bVideoExtractor(json) {
125-
json?.video?.forEach(bVideoItems);
126-
json?.audio?.forEach(bVideoItems);
125+
if (json?.video) {
126+
for (let i of json.video) {
127+
bVideoItems(i);
128+
}
129+
}
130+
if (json?.audio) {
131+
for (let i of json.audio) {
132+
bVideoItems(i);
133+
}
134+
}
127135
}
128136

129137
async function bVideoGetter(vid, playurl) {

0 commit comments

Comments
 (0)