mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-15 00:16:26 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
189e67eb22 | ||
|
|
e5c3adf1c5 | ||
|
|
299367f0b8 | ||
|
|
0d67474459 | ||
|
|
15a188aa85 | ||
|
|
0555badcfa |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "zy",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
|
||||
@@ -322,7 +322,7 @@ export default {
|
||||
},
|
||||
downloadEvent (e) {
|
||||
zy.download(this.site.key, e.id).then(res => {
|
||||
if (res) {
|
||||
if (res.length > 0) {
|
||||
const text = res.dl.dd._t
|
||||
if (text) {
|
||||
const list = text.split('#')
|
||||
@@ -337,9 +337,20 @@ export default {
|
||||
this.$message.warning('没有查询到下载链接.')
|
||||
}
|
||||
} else {
|
||||
const list = [...this.m3u8List]
|
||||
let m3u8List = []
|
||||
const dd = e.dl.dd
|
||||
const type = Object.prototype.toString.call(dd)
|
||||
if (type === '[object Array]') {
|
||||
for (const i of dd) {
|
||||
if (i._flag.indexOf('m3u8') >= 0) {
|
||||
m3u8List = i._t.split('#')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
m3u8List = dd._t.split('#')
|
||||
}
|
||||
let downloadUrl = e.name + '\n'
|
||||
for (const i of list) {
|
||||
for (const i of m3u8List) {
|
||||
const url = encodeURI(i.split('$')[1])
|
||||
downloadUrl += (url + '\n')
|
||||
}
|
||||
|
||||
@@ -80,7 +80,10 @@ export default {
|
||||
this.detail = {
|
||||
show: true,
|
||||
key: e.site,
|
||||
info: e
|
||||
info: {
|
||||
id: e.ids,
|
||||
name: e.name
|
||||
}
|
||||
}
|
||||
},
|
||||
playEvent (e) {
|
||||
|
||||
@@ -15,4 +15,4 @@ app.post('/api', async (req, res) => {
|
||||
})
|
||||
})
|
||||
|
||||
app.listen(48484)
|
||||
app.listen(44444)
|
||||
|
||||
@@ -2,7 +2,7 @@ import { sites } from '../dexie'
|
||||
import axios from 'axios'
|
||||
import parser from 'fast-xml-parser'
|
||||
const zy = {
|
||||
ports: 48484, // 端口号
|
||||
ports: 44444, // 端口号
|
||||
xmlConfig: { // XML 转 JSON 配置
|
||||
trimValues: true,
|
||||
textNodeName: '_t',
|
||||
@@ -184,7 +184,7 @@ const zy = {
|
||||
reject(err)
|
||||
})
|
||||
} else {
|
||||
resolve(null)
|
||||
resolve([])
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -177,6 +177,7 @@ export default {
|
||||
},
|
||||
prevEvent () {
|
||||
if (this.video.index === 0) {
|
||||
this.$message.info('已是第一集.')
|
||||
return false
|
||||
}
|
||||
history.find({ site: this.video.site, ids: this.video.ids }).then(res => {
|
||||
@@ -192,6 +193,7 @@ export default {
|
||||
},
|
||||
nextEvent () {
|
||||
if (this.video.index >= this.m3u8Arr.length - 1) {
|
||||
this.$message.info('已是最后一集.')
|
||||
return false
|
||||
}
|
||||
history.find({ site: this.video.site, ids: this.video.ids }).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user