移除m3u8List

This commit is contained in:
buvta
2020-12-31 16:25:53 +08:00
parent 025d1606f7
commit 05a07bee62
5 changed files with 15 additions and 15 deletions

View File

@@ -35,8 +35,8 @@
width="180"
label="观看至">
<template slot-scope="scope">
<span v-if="scope.row.detail && scope.row.detail.m3u8List && scope.row.detail.m3u8List.length > 1">
{{ scope.row.index + 1 }}({{scope.row.detail.m3u8List.length}})
<span v-if="scope.row.detail && scope.row.detail.fullList[0].list && scope.row.detail.fullList[0].list.length > 1">
{{ scope.row.index + 1 }}({{scope.row.detail.fullList[0].list.length}})
</span>
</template>
</el-table-column>
@@ -96,8 +96,8 @@
{{fmtMSS(props.data.time.toFixed(0))}}/{{fmtMSS(props.data.duration.toFixed(0))}}
</span>
<span v-if="props.data.onlinePlay">在线解析</span>
<span v-if="props.data.detail && props.data.detail.m3u8List !== undefined && props.data.detail.m3u8List.length > 1">
{{ props.data.index + 1 }}({{props.data.detail.m3u8List.length}})
<span v-if="props.data.detail && props.data.detail.fullList[0].list !== undefined && props.data.detail.fullList[0].list.length > 1">
{{ props.data.index + 1 }}({{props.data.detail.fullList[0].list.length}})
</span>
</div>
</div>

View File

@@ -89,7 +89,7 @@ export default {
this.DetailCache[cacheKey] = res
}
if (res) {
return res.m3u8List[1]
return res.fullList[0].list[1]
}
}
},

View File

@@ -107,7 +107,7 @@
<div class="update" v-if="props.data.hasUpdate">
<span>有更新</span>
</div>
<div class="progress" v-if="props.data.index && props.data.detail && props.data.detail.m3u8List !== undefined && props.data.detail.m3u8List.length > 1">
<div class="progress" v-if="props.data.index && props.data.detail && props.data.detail.fullList[0].list !== undefined && props.data.detail.fullList[0].list.length > 1">
<span>
看至第{{ props.data.index + 1 }}集
</span>

View File

@@ -37,6 +37,14 @@ db.version(7).stores({
trans.sites.toCollection().modify(site => {
site.jiexiUrl = ''
})
trans.history.toCollection().modify(history => {
history.detail.fullList = [].push(history.detail.m3u8List)
delete history.detail.m3u8List
})
trans.star.toCollection().modify(favorite => {
favorite.detail.fullList = [].push(favorite.detail.m3u8List)
delete favorite.detail.m3u8List
})
})
db.on('populate', () => {

View File

@@ -236,8 +236,6 @@ const zy = {
const json = parser.parse(data, this.xmlConfig)
const jsondata = json.rss === undefined ? json : json.rss
const videoList = jsondata.list.video
// Parse m3u8List
var m3u8List = []
// Parse video lists
var fullList = []
let index = 0
@@ -261,10 +259,6 @@ const zy = {
list: i._t.split('#')
}
)
// 如果含有多个视频列表的话, 仅获取m3u8列表
if (i._flag.includes('m3u8') || i._t.includes('.m3u8')) {
m3u8List = i._t.split('#')
}
}
} else {
fullList.push(
@@ -273,9 +267,7 @@ const zy = {
list: dd._t.split('#')
}
)
m3u8List = dd._t.split('#')
}
videoList.m3u8List = m3u8List
if (fullList.length > 1) { // 将ZY支持的播放列表前置
index = fullList.findIndex(e => supportedFormats.includes(e.flag) || e.flag.startsWith('ZY支持'))
if (index !== -1) {
@@ -333,7 +325,7 @@ const zy = {
})
} else {
zy.detail(key, id).then(res => {
const list = [...res.m3u8List]
const list = [...res[0].list]
for (const i of list) {
const url = encodeURI(i.split('$')[1])
downloadUrls += (url + '\n')