历史页面,改进进度展示

This commit is contained in:
haiyangcui
2020-11-07 12:29:34 +01:00
committed by buvta
parent 15a38f1b9c
commit 9ccfefaafb
3 changed files with 36 additions and 26 deletions

View File

@@ -217,6 +217,20 @@ const zy = {
const data = res.data
const json = parser.parse(data, this.xmlConfig)
const videoList = json.rss.list.video
// Parse m3u8List
var m3u8List = []
const dd = videoList.dl.dd
const type = Object.prototype.toString.call(dd)
if (type === '[object Array]') {
for (const i of dd) {
if (i._flag.indexOf('m3u8') >= 0) {
m3u8List = i._t.split('#')
}
}
} else {
m3u8List = dd._t.split('#')
}
videoList.m3u8List = m3u8List
resolve(videoList)
}).catch(err => {
reject(err)