@@ -544,7 +544,7 @@ export default {
544
544
const index = this .video .info .index || 0
545
545
const db = await history .find ({ site: this .video .key , ids: this .video .info .id })
546
546
const key = this .video .key + ' @' + this .video .info .id
547
- var time = this .video .info .time
547
+ let time = this .video .info .time
548
548
this .xg .removeAllProgressDot ()
549
549
this .startPosition = { min: ' 00' , sec: ' 00' }
550
550
this .endPosition = { min: ' 00' , sec: ' 00' }
@@ -620,14 +620,14 @@ export default {
620
620
this .isLive = false
621
621
this .exportablePlaylist = false
622
622
this .fetchPlaylist ().then (async (fullList ) => {
623
- var playlist = fullList[0 ].list // ZY支持的已移到首位
623
+ let playlist = fullList[0 ].list // ZY支持的已移到首位
624
624
// 如果设定了特定的video flag, 获取该flag下的视频列表
625
625
const videoFlag = this .video .info .videoFlag
626
626
if (videoFlag) {
627
627
playlist = fullList .find (x => x .flag === videoFlag).list
628
628
}
629
629
this .right .list = playlist
630
- var url = playlist[index].split (' $' )[1 ]
630
+ const url = playlist[index].split (' $' )[1 ]
631
631
if (playlist .every (e => e .split (' $' )[1 ].endsWith (' .m3u8' ))) this .exportablePlaylist = true
632
632
if (! url .endsWith (' .m3u8' ) && ! url .endsWith (' .mp4' )) {
633
633
const currentSite = await sites .find ({ key: this .video .key })
@@ -776,9 +776,9 @@ export default {
776
776
},
777
777
prevEvent () {
778
778
if (this .video .iptv ) {
779
- var index = this .channelList .findIndex (obj => obj .id === this .video .iptv .channelID )
779
+ const index = this .channelList .findIndex (obj => obj .id === this .video .iptv .channelID )
780
780
if (index >= 1 ) {
781
- var channel = this .channelList [index - 1 ]
781
+ const channel = this .channelList [index - 1 ]
782
782
this .playChannel (channel)
783
783
} else {
784
784
this .$message .warning (' 这已经是第一个频道了。' )
@@ -794,9 +794,9 @@ export default {
794
794
},
795
795
nextEvent () {
796
796
if (this .video .iptv ) {
797
- var index = this .channelList .findIndex (obj => obj .id === this .video .iptv .channelID )
797
+ const index = this .channelList .findIndex (obj => obj .id === this .video .iptv .channelID )
798
798
if (index < (this .channelList .length - 1 )) {
799
- var channel = this .channelList [index + 1 ]
799
+ const channel = this .channelList [index + 1 ]
800
800
this .playChannel (channel)
801
801
} else {
802
802
this .$message .warning (' 这已经是最后一个频道了。' )
@@ -945,7 +945,7 @@ export default {
945
945
this .$message .error (' 请设置第三方播放器路径' )
946
946
// 在线播放该视频
947
947
if (playlistUrls[this .video .info .index ].endsWith (' .m3u8' )) {
948
- var link = ' https://www.m3u8play.com/?play=' + playlistUrls[this .video .info .index ]
948
+ const link = ' https://www.m3u8play.com/?play=' + playlistUrls[this .video .info .index ]
949
949
const open = require (' open' )
950
950
open (link)
951
951
}
@@ -968,11 +968,11 @@ export default {
968
968
const path = require (' path' )
969
969
const os = require (' os' )
970
970
const fs = require (' fs' )
971
- var filePath = path .join (os .tmpdir (), fileName + ' .m3u' )
971
+ const filePath = path .join (os .tmpdir (), fileName + ' .m3u' )
972
972
if (fs .existsSync (filePath)) {
973
973
fs .unlinkSync (filePath)
974
974
}
975
- var str = ' #EXTM3U' + os .EOL
975
+ let str = ' #EXTM3U' + os .EOL
976
976
for (let ind = startIndex; ind < m3u8Arr .length ; ind++ ) {
977
977
str += ` #EXTINF: -1, 第${ ind + 1 } 集` + os .EOL
978
978
str += m3u8Arr[ind] + os .EOL
@@ -1037,7 +1037,7 @@ export default {
1037
1037
},
1038
1038
listItemEvent (n ) {
1039
1039
if (this .video .iptv ) {
1040
- var channel = this .channelList [n]
1040
+ const channel = this .channelList [n]
1041
1041
// 是直播源,直接播放
1042
1042
this .playChannel (channel)
1043
1043
} else {
@@ -1399,7 +1399,7 @@ export default {
1399
1399
this .channelTree = []
1400
1400
const groups = [... new Set (this .channelList .map (iptv => iptv .group ))]
1401
1401
groups .forEach (g => {
1402
- var doc = {
1402
+ const doc = {
1403
1403
label: g,
1404
1404
children: this .channelList .filter (x => x .group === g).map (i => { return { label: i .name , channel: i } })
1405
1405
}
@@ -1486,7 +1486,7 @@ export default {
1486
1486
this .videoStop ()
1487
1487
return
1488
1488
}
1489
- var historyItem = this .right .history [0 ]
1489
+ const historyItem = this .right .history [0 ]
1490
1490
this .video = { key: historyItem .site , info: { id: historyItem .ids , name: historyItem .name , index: historyItem .index } }
1491
1491
} else if (this .video .iptv && ! this .isLive ) {
1492
1492
this .playChannel (this .video .iptv )
0 commit comments