diff --git a/src/components/History.vue b/src/components/History.vue index 143728c..54436f0 100644 --- a/src/components/History.vue +++ b/src/components/History.vue @@ -35,8 +35,8 @@ width="180" label="观看至"> @@ -96,8 +96,8 @@ {{fmtMSS(props.data.time.toFixed(0))}}/{{fmtMSS(props.data.duration.toFixed(0))}} 在线解析 - - 第{{ props.data.index + 1 }}集(共{{props.data.detail.m3u8List.length}}集) + + 第{{ props.data.index + 1 }}集(共{{props.data.detail.fullList[0].list.length}}集) diff --git a/src/components/Share.vue b/src/components/Share.vue index 68e4973..11f4540 100644 --- a/src/components/Share.vue +++ b/src/components/Share.vue @@ -89,7 +89,7 @@ export default { this.DetailCache[cacheKey] = res } if (res) { - return res.m3u8List[1] + return res.fullList[0].list[1] } } }, diff --git a/src/components/Star.vue b/src/components/Star.vue index d0ee489..1858042 100644 --- a/src/components/Star.vue +++ b/src/components/Star.vue @@ -107,7 +107,7 @@
有更新
-
+
看至第{{ props.data.index + 1 }}集 diff --git a/src/lib/dexie/dexie.js b/src/lib/dexie/dexie.js index ae0d239..75ce232 100644 --- a/src/lib/dexie/dexie.js +++ b/src/lib/dexie/dexie.js @@ -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', () => { diff --git a/src/lib/site/tools.js b/src/lib/site/tools.js index 5a09354..735b775 100644 --- a/src/lib/site/tools.js +++ b/src/lib/site/tools.js @@ -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')