From 17229eb6b488ec6b4c3c2163ed3a90b69678e079 Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Fri, 20 Nov 2020 13:45:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=88=9D=E6=AC=A1=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=88=B0Play=E6=92=AD=E6=94=BE=E9=A2=91=E9=81=93=E6=97=B6chann?= =?UTF-8?q?elList=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 172b831..fcd45bb 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -386,7 +386,7 @@ export default { view () { this.right.show = false this.right.type = '' - if (this.view === 'Play') { + if (this.view === 'Play' && this.video.iptv) { this.getChannelList() } }, @@ -504,11 +504,12 @@ export default { this.playVideo(index, time) } }, - playChannel (channel) { + async playChannel (channel) { if (channel.channels) { this.right.sources = channel.channels.filter(e => e.isActive) channel = channel.prefer ? channel.channels.find(e => e.id === channel.prefer) : channel.channels.filter(e => e.isActive)[0] } else { + if (!this.channelList.length) this.channelList = await channelList.all() const ele = this.channelList.find(e => e.id === channel.channelID) ele.prefer = channel.id channelList.remove(ele.id)