mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-05-11 00:49:34 +08:00
修复zy.detail获取到的链接不包含"$"时产生的bug
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
</div>
|
||||
<div class="m3u8">
|
||||
<div class="box">
|
||||
<span v-bind:class="{ selected: j === selectedEpisode }" v-for="(i, j) in videoList" :key="j" @click="playEvent(j)" @mouseenter="() => { selectedEpisode = j }">{{i | ftName}}</span>
|
||||
<span v-bind:class="{ selected: j === selectedEpisode }" v-for="(i, j) in videoList" :key="j" @click="playEvent(j)" @mouseenter="() => { selectedEpisode = j }">{{ i | ftName(j) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,9 +93,13 @@ export default {
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
ftName (e) {
|
||||
const name = e.split('$')[0]
|
||||
return name
|
||||
ftName (e, n) {
|
||||
const num = e.split('$')
|
||||
if (num.length > 1) {
|
||||
return e.split('$')[0]
|
||||
} else {
|
||||
return `第${(n + 1)}集`
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -640,8 +640,8 @@ export default {
|
||||
playlist = fullList.find(x => x.flag === videoFlag).list
|
||||
}
|
||||
this.right.list = playlist
|
||||
const url = playlist[index].split('$')[1]
|
||||
if (playlist.every(e => e.split('$')[1].endsWith('.m3u8'))) this.exportablePlaylist = true
|
||||
const url = playlist[index].includes('$') ? playlist[index].split('$')[1] : playlist[index]
|
||||
if (playlist.every(e => e.endsWith('.m3u8') || e.split('$')[1].endsWith('.m3u8'))) this.exportablePlaylist = true
|
||||
if (!url.endsWith('.m3u8') && !url.endsWith('.mp4')) {
|
||||
const currentSite = await sites.find({ key: this.video.key })
|
||||
this.$message.info('即将调用解析接口播放,请等待...')
|
||||
|
||||
Reference in New Issue
Block a user