mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-05-05 13:53:36 +08:00
移除m3u8List
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
this.DetailCache[cacheKey] = res
|
||||
}
|
||||
if (res) {
|
||||
return res.m3u8List[1]
|
||||
return res.fullList[0].list[1]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user