mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-14 07:55:27 +08:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d61bb04a7 | ||
|
|
613901872e | ||
|
|
ef3264f3db | ||
|
|
56d5858e0f | ||
|
|
3f4da7806a | ||
|
|
00aa3c8408 | ||
|
|
a9d889f7d8 | ||
|
|
b946423b65 | ||
|
|
f2c87a7880 | ||
|
|
0ecc1367d2 | ||
|
|
9673303fe9 | ||
|
|
88582b45b3 | ||
|
|
443cdc59fc | ||
|
|
c08ae7666c | ||
|
|
6bfeb9fcd8 | ||
|
|
e3bc519128 | ||
|
|
504b11ceec | ||
|
|
d281a2adab | ||
|
|
4e0f73a3de | ||
|
|
3a78425e7f | ||
|
|
a38b9aed56 | ||
|
|
ec4980a4b6 |
@@ -42,9 +42,8 @@
|
||||
|
||||
### 🌴 下载
|
||||
|
||||
- 🍓 [Github -- 官方下载](https://github.com/Hunlongyu/ZY-Player/releases)
|
||||
- 🍉 [蓝奏云 -- 快速下载](https://www.lanzoux.com/b04s6a3re) 密码:95px
|
||||
- 🍒 适用于32位操作系统的x86软件,在蓝奏云网盘里, 后缀名: ZY Player * 32位.exe
|
||||
- 🎃 软件暂时关闭下载通道. 请大家支持正版.
|
||||
- 🎭 所有资源来自网上, 该软件不参与任何制作, 上传, 储存等内容, 禁止传播违法资源. 该软件仅供学习参考, 请于安装后24小时内删除.
|
||||
|
||||
### 🎠 平台
|
||||
|
||||
|
||||
@@ -236,6 +236,7 @@
|
||||
<li><i class="bx bx-chevron-right"></i> <a target="_blank" href="#">Home</a></li>
|
||||
<li><i class="bx bx-chevron-right"></i> <a target="_blank" href="https://www.ghpym.com/zyplayer.html">果核剥壳</a></li>
|
||||
<li><i class="bx bx-chevron-right"></i> <a target="_blank" href="https://www.iplaysoft.com/zy-player.html">异次元软件世界</a></li>
|
||||
<li><i class="bx bx-chevron-right"></i> <a target="_blank" href="https://xydh.fun/">炫辕</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
16
package.json
16
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "zy",
|
||||
"version": "2.7.2",
|
||||
"version": "2.7.3",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
@@ -19,7 +19,7 @@
|
||||
"dependencies": {
|
||||
"axios": "^0.21.1",
|
||||
"cheerio": "^1.0.0-rc.5",
|
||||
"core-js": "^3.8.2",
|
||||
"core-js": "^3.8.3",
|
||||
"dexie": "^3.0.3",
|
||||
"electron-localshortcut": "^3.2.1",
|
||||
"electron-proxy-agent": "^1.2.0",
|
||||
@@ -27,13 +27,13 @@
|
||||
"element-ui": "^2.15.0",
|
||||
"fast-xml-parser": "^3.17.6",
|
||||
"html2canvas": "^1.0.0-rc.7",
|
||||
"iptv-playlist-parser": "^0.5.4",
|
||||
"iptv-playlist-parser": "^0.6.0",
|
||||
"m3u": "0.0.2",
|
||||
"m3u8-parser": "^4.5.2",
|
||||
"memcached": "^2.2.2",
|
||||
"modern-normalize": "^1.0.0",
|
||||
"mousetrap": "^1.6.5",
|
||||
"pinyin-match": "^1.1.7",
|
||||
"pinyin-match": "^1.1.9",
|
||||
"qrcode.vue": "^1.7.0",
|
||||
"randomstring": "^1.1.5",
|
||||
"session": "^0.1.0",
|
||||
@@ -44,9 +44,9 @@
|
||||
"vue-waterfall-plugin": "^1.1.0",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuex": "^3.6.0",
|
||||
"xgplayer": "^2.16.0",
|
||||
"xgplayer-flv.js": "^2.1.2",
|
||||
"xgplayer-hls.js": "^2.3.0"
|
||||
"xgplayer": "^2.17.3",
|
||||
"xgplayer-flv.js": "^2.2.0",
|
||||
"xgplayer-hls.js": "^2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.10",
|
||||
@@ -56,7 +56,7 @@
|
||||
"@vue/eslint-config-standard": "^6.0.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"electron": "^11.1.1",
|
||||
"electron": "^11.2.1",
|
||||
"electron-devtools-installer": "^3.1.1",
|
||||
"eslint": "^7.16.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
|
||||
@@ -457,6 +457,7 @@ export default {
|
||||
},
|
||||
searchContents: {
|
||||
handler (list) {
|
||||
list = list.filter(res => !this.setting.excludeR18Films || !this.containsR18Keywords(res.type))
|
||||
this.areas = [...new Set(list.map(ele => ele.area))].filter(x => x)
|
||||
this.searchClassList = [...new Set(list.map(ele => ele.type))].filter(x => x)
|
||||
this.refreshFilteredList()
|
||||
@@ -818,7 +819,7 @@ export default {
|
||||
zy.detail(site.key, element.id).then(detailRes => {
|
||||
if (id !== this.searchID || !this.searchRunning) return
|
||||
detailRes.site = site
|
||||
if (detailRes.dl.dd && (detailRes.dl.dd._t || (Object.prototype.toString.call(detailRes.dl.dd) === '[object Array]' && detailRes.dl.dd.some(i => i._t)))) {
|
||||
if (this.isValidSearchResult(detailRes)) {
|
||||
this.searchContents.push(detailRes)
|
||||
this.searchContents.sort(function (a, b) {
|
||||
return a.site.id - b.site.id
|
||||
@@ -830,7 +831,7 @@ export default {
|
||||
zy.detail(site.key, res.id).then(detailRes => {
|
||||
if (id !== this.searchID || !this.searchRunning) return
|
||||
detailRes.site = site
|
||||
if (detailRes.dl.dd && (detailRes.dl.dd._t || (Object.prototype.toString.call(detailRes.dl.dd) === '[object Array]' && detailRes.dl.dd.some(i => i._t)))) {
|
||||
if (this.isValidSearchResult(detailRes)) {
|
||||
this.searchContents.push(detailRes)
|
||||
this.searchContents.sort(function (a, b) {
|
||||
return a.site.id - b.site.id
|
||||
@@ -845,6 +846,10 @@ export default {
|
||||
}).catch(() => { this.siteSearchCount++; if (this.searchGroup === '站内') this.$message.error('本次查询状态异常,未获取到数据!') })
|
||||
})
|
||||
},
|
||||
isValidSearchResult (detailRes) {
|
||||
return detailRes.dl.dd && (detailRes.dl.dd._t || (Object.prototype.toString.call(detailRes.dl.dd) === '[object Array]' &&
|
||||
detailRes.dl.dd.some(i => i._t)))
|
||||
},
|
||||
searchAndRecord () {
|
||||
this.addSearchRecord()
|
||||
this.searchEvent()
|
||||
|
||||
@@ -211,6 +211,7 @@ export default {
|
||||
removeSelectedItems () {
|
||||
if (!this.multipleSelection.length) this.multipleSelection = this.history
|
||||
this.multipleSelection.forEach(e => history.remove(e.id))
|
||||
this.multipleSelection = []
|
||||
this.getAllhistory()
|
||||
this.updateDatabase()
|
||||
},
|
||||
@@ -279,6 +280,7 @@ export default {
|
||||
result.filePaths.forEach(file => {
|
||||
const str = fs.readFileSync(file)
|
||||
const json = JSON.parse(str)
|
||||
json.forEach(record => { if (record.detail.m3u8List) record.detail.fullList = [].concat(record.detail.m3u8List) })
|
||||
history.bulkAdd(json).then(res => {
|
||||
this.$message.success('导入成功')
|
||||
this.getAllhistory()
|
||||
|
||||
@@ -274,8 +274,13 @@ export default {
|
||||
if (e.url) {
|
||||
this.video = { iptv: e }
|
||||
} else {
|
||||
const prefer = e.prefer ? e.channels.find(c => c.id === e.prefer) : e.channels.filter(c => c.isActive)[0]
|
||||
if (!prefer) return
|
||||
let prefer
|
||||
if (e.prefer) prefer = e.channels.find(c => c.id === e.prefer)
|
||||
if (!prefer) prefer = e.channels.filter(c => c.isActive)[0]
|
||||
if (!prefer) {
|
||||
this.$message.error('当前频道所有源已全部停用,不可播放!')
|
||||
return
|
||||
}
|
||||
this.video = { iptv: prefer }
|
||||
}
|
||||
this.view = 'Play'
|
||||
@@ -298,6 +303,7 @@ export default {
|
||||
ele.channels.splice(ele.channels.findIndex(e => e.id === row.id), 1)
|
||||
channelList.remove(row.channelID)
|
||||
if (ele.channels.length) {
|
||||
if (ele.prefer === row.id) delete ele.prefer
|
||||
if (ele.channels.length === 1) ele.hasChildren = false
|
||||
channelList.add(ele)
|
||||
this.$set(this.$refs.iptvTable.store.states.lazyTreeNodeMap, ele.id, ele.channels)
|
||||
@@ -614,6 +620,7 @@ export default {
|
||||
channel.status = '失效'
|
||||
channel.isActive = false
|
||||
if (this.setting.autocleanWhenIptvCheck) {
|
||||
if (ele.prefer === channel.id) delete ele.prefer
|
||||
ele.channels.splice(ele.channels.findIndex(e => e.id === channel.id), 1)
|
||||
ele.hasCheckedNum--
|
||||
}
|
||||
|
||||
@@ -257,10 +257,10 @@ import FlvJsPlayer from 'xgplayer-flv.js'
|
||||
import mt from 'mousetrap'
|
||||
import Clickoutside from 'element-ui/src/utils/clickoutside'
|
||||
import { exec, execFile } from 'child_process'
|
||||
import PinyinMatch from 'pinyin-match'
|
||||
|
||||
const { remote, clipboard } = require('electron')
|
||||
const win = remote.getCurrentWindow()
|
||||
const PinyinMatch = require('pinyin-match')
|
||||
const URL = require('url')
|
||||
const VIDEO_DETAIL_CACHE = {}
|
||||
|
||||
@@ -581,8 +581,11 @@ export default {
|
||||
playChannel (channel) {
|
||||
this.isLive = true
|
||||
if (channel.channels) {
|
||||
let prefer
|
||||
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]
|
||||
if (channel.prefer) prefer = channel.channels.find(e => e.id === channel.prefer)
|
||||
if (!prefer) prefer = channel.channels.filter(e => e.isActive)[0]
|
||||
channel = prefer
|
||||
} else {
|
||||
const ele = this.channelList.find(e => e.id === channel.channelID)
|
||||
ele.prefer = channel.id
|
||||
@@ -600,17 +603,23 @@ export default {
|
||||
this.xg.src = channel.url
|
||||
this.xg.play()
|
||||
this.changingIPTV = false
|
||||
setTimeout(() => {
|
||||
if (!document.getElementById('xgplayer').querySelector('video')) {
|
||||
this.getPlayer(this.playerType, true)
|
||||
this.playChannel(channel)
|
||||
}
|
||||
}, 1000)
|
||||
if (document.querySelector('xg-btn-showhistory')) document.querySelector('xg-btn-showhistory').style.display = 'none'
|
||||
if (document.querySelector('.xgplayer-playbackrate')) document.querySelector('.xgplayer-playbackrate').style.display = 'none'
|
||||
},
|
||||
getPlayer (playerType, force = false) {
|
||||
async getPlayer (playerType, force = false) {
|
||||
if (!force && this.playerType === playerType) return
|
||||
if (this.playerType !== 'flv') {
|
||||
this.xg.src = '' // https://developers.google.com/web/updates/2017/06/play-request-was-interrupted#danger-zone
|
||||
this.config.url = ''
|
||||
}
|
||||
try {
|
||||
this.xg.destroy()
|
||||
if (this.xg) this.xg.destroy()
|
||||
} catch (err) { }
|
||||
this.xg = null
|
||||
switch (playerType) {
|
||||
@@ -626,6 +635,7 @@ export default {
|
||||
this.playerInstall()
|
||||
this.bindEvent()
|
||||
this.playerType = playerType
|
||||
if (this.miniMode) { await this.saveMiniWindowState(); this.miniEvent() }
|
||||
},
|
||||
playVideo (index = 0, time = 0) {
|
||||
this.isLive = false
|
||||
@@ -658,6 +668,12 @@ export default {
|
||||
const key = this.video.key + '@' + this.video.info.id
|
||||
const startTime = VIDEO_DETAIL_CACHE[key].startPosition || 0
|
||||
this.xg.play()
|
||||
setTimeout(() => {
|
||||
if (!document.getElementById('xgplayer').querySelector('video')) {
|
||||
this.getPlayer(this.playerType, true)
|
||||
this.getUrls()
|
||||
}
|
||||
}, 1000)
|
||||
if (document.querySelector('xg-btn-showhistory')) document.querySelector('xg-btn-showhistory').style.display = 'block'
|
||||
if (document.querySelector('.xgplayer-playbackrate')) document.querySelector('.xgplayer-playbackrate').style.display = 'inline-block'
|
||||
this.xg.once('playing', () => {
|
||||
@@ -884,7 +900,7 @@ export default {
|
||||
}
|
||||
},
|
||||
async miniEvent () {
|
||||
this.mainWindowBounds = JSON.parse(JSON.stringify(win.getBounds()))
|
||||
if (!this.miniMode) this.mainWindowBounds = JSON.parse(JSON.stringify(win.getBounds()))
|
||||
let miniWindowBounds
|
||||
await mini.find().then(res => { if (res) miniWindowBounds = res.bounds })
|
||||
if (!miniWindowBounds) miniWindowBounds = { x: win.getPosition()[0], y: win.getPosition()[1], width: 550, height: 340 }
|
||||
@@ -893,7 +909,7 @@ export default {
|
||||
document.querySelector('xg-btn-quitMiniMode').style.display = 'block'
|
||||
this.miniMode = true
|
||||
},
|
||||
async exitMiniEvent () {
|
||||
async saveMiniWindowState () {
|
||||
await mini.find().then(res => {
|
||||
let doc = {}
|
||||
doc = {
|
||||
@@ -906,6 +922,9 @@ export default {
|
||||
mini.add(doc)
|
||||
}
|
||||
})
|
||||
},
|
||||
async exitMiniEvent () {
|
||||
await this.saveMiniWindowState()
|
||||
win.setBounds(this.mainWindowBounds)
|
||||
this.xg.exitCssFullscreen()
|
||||
document.querySelector('xg-btn-quitMiniMode').style.display = 'none'
|
||||
@@ -1423,7 +1442,6 @@ export default {
|
||||
let index = this.right.sources.indexOf(this.video.iptv) + 1
|
||||
if (index === this.right.sources.length) index = 0
|
||||
stallCount++
|
||||
clearTimeout(stallIptvTimeout)
|
||||
if (stallCount >= this.right.sources.length) {
|
||||
stallCount = 0
|
||||
this.nextEvent()
|
||||
@@ -1435,7 +1453,11 @@ export default {
|
||||
})
|
||||
this.xg.on('canplay', () => {
|
||||
stallCount = 0
|
||||
if (stallIptvTimeout) clearTimeout(stallIptvTimeout)
|
||||
clearTimeout(stallIptvTimeout)
|
||||
})
|
||||
this.xg.on('destroy', () => {
|
||||
stallCount = 0
|
||||
clearTimeout(stallIptvTimeout)
|
||||
})
|
||||
|
||||
this.xg.on('exitFullscreen', () => {
|
||||
@@ -1444,7 +1466,8 @@ export default {
|
||||
|
||||
this.xg.on('volumechange', () => {
|
||||
this.config.volume = this.xg.volume.toFixed(2)
|
||||
setting.find().then(res => { res.volume = this.config.volume; setting.update(res) })
|
||||
const volume = this.config.volume
|
||||
setTimeout(() => { if (volume === this.config.volume) setting.find().then(res => { res.volume = this.config.volume; setting.update(res) }) }, 500)
|
||||
})
|
||||
|
||||
this.xg.on('timeupdate', () => {
|
||||
@@ -1477,8 +1500,8 @@ export default {
|
||||
this.toggleHistory()
|
||||
})
|
||||
|
||||
this.xg.on('videoStop', () => {
|
||||
if (this.miniMode) this.exitMiniEvent()
|
||||
this.xg.on('videoStop', async () => {
|
||||
if (this.miniMode) await this.exitMiniEvent()
|
||||
this.videoStop()
|
||||
})
|
||||
|
||||
@@ -1509,6 +1532,7 @@ export default {
|
||||
})
|
||||
|
||||
this.xg.on('play', () => {
|
||||
clearTimeout(stallIptvTimeout)
|
||||
if (!this.video.key) {
|
||||
if (!this.video.iptv && !this.video.info.ids) {
|
||||
// 如果当前播放页面的播放信息没有被赋值,播放历史记录
|
||||
@@ -1538,12 +1562,8 @@ export default {
|
||||
this.state.showTimespanSetting = false
|
||||
this.right.list = []
|
||||
this.getAllhistory()
|
||||
if (this.playerType !== 'flv') {
|
||||
this.getPlayer(this.playerType, true)
|
||||
} else {
|
||||
this.xg.destroy()
|
||||
this.getPlayer('hls', true)
|
||||
}
|
||||
if (this.playerType === 'flv') this.xg.destroy()
|
||||
this.getPlayer('hls', true)
|
||||
},
|
||||
minMaxEvent () {
|
||||
win.on('minimize', () => {
|
||||
|
||||
@@ -559,7 +559,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getSites()
|
||||
// this.getSites()
|
||||
this.getSetting()
|
||||
this.getShortcut()
|
||||
this.checkUpdate()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,182 +1 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"key": "mahuazy",
|
||||
"name": "麻花资源",
|
||||
"api": "http://www.mhapi123.com/inc/ldg_api.php",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"key": "1886zy",
|
||||
"name": "1886 资源",
|
||||
"api": "http://cj.1886zy.co/inc/api.php",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"key": "123ku",
|
||||
"name": "123 资源",
|
||||
"api": "http://cj.123ku2.com:12315/inc/api.php",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"key": "7K资源",
|
||||
"id": 4,
|
||||
"name": "7K资源",
|
||||
"api": "https://zy.7kjx.com/cjapi.php",
|
||||
"download": "",
|
||||
"jiexiUrl": "default",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"key": "1717云资源网",
|
||||
"id": 5,
|
||||
"name": "1717云资源网",
|
||||
"api": "http://zy.itono.cn/inc/api.php",
|
||||
"download": "",
|
||||
"jiexiUrl": "https://www.1717yun.com/jiexi/?url=",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"key": "subo988",
|
||||
"name": "速播资源站",
|
||||
"api": "https://www.subo988.com/inc/api.php",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"key": "88zyw",
|
||||
"name": "88 影视资源站",
|
||||
"api": "http://www.88zyw.net/inc/api.php",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"key": "zuidazy",
|
||||
"id": 8,
|
||||
"name": "最大资源网",
|
||||
"api": "http://www.zdziyuan.com/inc/ldg_sea.php",
|
||||
"download": "http://www.zdziyuan.com/inc/apidown.php",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"key": "mbo",
|
||||
"id": 9,
|
||||
"name": "秒播资源",
|
||||
"api": "http://caiji.mb77.vip/inc/seacmsapi.php",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"key": "apibdzy",
|
||||
"name": "百度云资源",
|
||||
"api": "https://api.apibdzy.com/api.php/provide/vod/at/xml",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"key": "okzy",
|
||||
"name": "OK 资源网",
|
||||
"api": "http://cj.okzy.tv/inc/api.php",
|
||||
"download": "http://cj.okzy.tv/inc/apidown.php",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"key": "kuyunzy",
|
||||
"name": "酷云资源",
|
||||
"api": "http://caiji.kuyun98.com/inc/ldg_api.php",
|
||||
"download": "http://caiji.kuyun98.com/inc/apidown.php",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"key": "kubozy",
|
||||
"name": "酷播资源",
|
||||
"api": "http://api.kbzyapi.com/inc/api.php",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"key": "yongjiuzy",
|
||||
"name": "永久资源",
|
||||
"api": "http://cj.yongjiuzyw.com/inc/api.php",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"key": "rrzy",
|
||||
"name": "人人资源",
|
||||
"api": "https://www.rrzyw.cc/api.php/provide/vod/from/rrm3u8/at/xml/",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"key": "bbkdj",
|
||||
"name": "步步高顶尖资源网",
|
||||
"api": "http://api.bbkdj.com/api",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"key": "zuixinzy",
|
||||
"name": "最新资源",
|
||||
"api": "http://api.zuixinapi.com/inc/api.php",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"key": "209zy",
|
||||
"name": "209 资源",
|
||||
"api": "http://cj.1156zy.com/inc/api.php",
|
||||
"download": "",
|
||||
"jiexiUrl": "",
|
||||
"group": "默认",
|
||||
"isActive": true
|
||||
}
|
||||
]
|
||||
[]
|
||||
|
||||
@@ -212,15 +212,20 @@ const zy = {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.getSite(key).then(res => {
|
||||
const site = res
|
||||
wd = encodeURI(wd)
|
||||
const url = `${site.api}?wd=${wd}`
|
||||
const url = `${site.api}?wd=${encodeURI(wd)}`
|
||||
axios.post(url, { timeout: 3000 }).then(res => {
|
||||
const data = res.data
|
||||
const json = parser.parse(data, this.xmlConfig)
|
||||
const jsondata = json.rss === undefined ? json : json.rss
|
||||
if (json && jsondata && jsondata.list) {
|
||||
const videoList = jsondata.list.video
|
||||
resolve(videoList)
|
||||
let videoList = jsondata.list.video
|
||||
if (Object.prototype.toString.call(videoList) === '[object Object]') videoList = [].concat(videoList)
|
||||
videoList = videoList.filter(e => e.name.toLowerCase().includes(wd.toLowerCase()))
|
||||
if (videoList.length) {
|
||||
resolve(videoList)
|
||||
} else {
|
||||
resolve()
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
reject(err)
|
||||
|
||||
58
yarn.lock
58
yarn.lock
@@ -3397,10 +3397,10 @@ core-js@^3.6.5:
|
||||
resolved "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a"
|
||||
integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==
|
||||
|
||||
core-js@^3.8.2:
|
||||
version "3.8.2"
|
||||
resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.8.2.tgz?cache=0&sync_timestamp=1609682099238&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.8.2.tgz#0a1fd6709246da9ca8eff5bb0cbd15fba9ac7044"
|
||||
integrity sha1-Ch/WcJJG2pyo7/W7DL0V+6mscEQ=
|
||||
core-js@^3.8.3:
|
||||
version "3.8.3"
|
||||
resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.8.3.tgz?cache=0&sync_timestamp=1611038873108&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.8.3.tgz#c21906e1f14f3689f93abcc6e26883550dd92dd0"
|
||||
integrity sha1-whkG4fFPNon5OrzG4miDVQ3ZLdA=
|
||||
|
||||
core-util-is@1.0.2, core-util-is@~1.0.0:
|
||||
version "1.0.2"
|
||||
@@ -4237,7 +4237,7 @@ electron-to-chromium@^1.3.591:
|
||||
|
||||
electron-updater@^4.3.5:
|
||||
version "4.3.5"
|
||||
resolved "https://registry.npm.taobao.org/electron-updater/download/electron-updater-4.3.5.tgz?cache=0&sync_timestamp=1610412511417&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felectron-updater%2Fdownload%2Felectron-updater-4.3.5.tgz#4fb36f593a031c87ea07ee141c9f064d5deffb15"
|
||||
resolved "https://registry.npm.taobao.org/electron-updater/download/electron-updater-4.3.5.tgz#4fb36f593a031c87ea07ee141c9f064d5deffb15"
|
||||
integrity sha1-T7NvWToDHIfqB+4UHJ8GTV3v+xU=
|
||||
dependencies:
|
||||
"@types/semver" "^7.3.1"
|
||||
@@ -4248,10 +4248,10 @@ electron-updater@^4.3.5:
|
||||
lodash.isequal "^4.5.0"
|
||||
semver "^7.3.2"
|
||||
|
||||
electron@^11.1.1:
|
||||
version "11.2.0"
|
||||
resolved "https://registry.npmjs.org/electron/-/electron-11.2.0.tgz#f8577ea4c9ba94068850256145be26b0b89a5dd7"
|
||||
integrity sha512-weszOPAJPoPu6ozL7vR9enXmaDSqH+KE9iZODfbGdnFgtVfVdfyedjlvEGIUJkLMPXM1y/QWwCl2dINzr0Jq5Q==
|
||||
electron@^11.2.1:
|
||||
version "11.2.1"
|
||||
resolved "https://registry.npm.taobao.org/electron/download/electron-11.2.1.tgz#8641dd1a62911a1144e0c73c34fd9f37ccc65c2b"
|
||||
integrity sha1-hkHdGmKRGhFE4Mc8NP2fN8zGXCs=
|
||||
dependencies:
|
||||
"@electron/get" "^1.0.1"
|
||||
"@types/node" "^12.0.12"
|
||||
@@ -6117,10 +6117,10 @@ ipaddr.js@1.9.1, ipaddr.js@^1.9.0:
|
||||
resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
|
||||
integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==
|
||||
|
||||
iptv-playlist-parser@^0.5.4:
|
||||
version "0.5.4"
|
||||
resolved "https://registry.npm.taobao.org/iptv-playlist-parser/download/iptv-playlist-parser-0.5.4.tgz#909cd4301a0b58c669926be7c5fce8d71db5320d"
|
||||
integrity sha1-kJzUMBoLWMZpkmvnxfzo1x21Mg0=
|
||||
iptv-playlist-parser@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.npmjs.org/iptv-playlist-parser/-/iptv-playlist-parser-0.6.0.tgz#7b59a2747b84114a09bc66fc4b5f053294a490a9"
|
||||
integrity sha512-dcqN5SaL+PCepJrFoT/ZAA3uHoyLVdomXQmSPCzcT700sUoCYORoVD0d/vIJFMRAlCU/uXCtVAJH17RRWTqmwQ==
|
||||
|
||||
is-absolute-url@^2.0.0:
|
||||
version "2.1.0"
|
||||
@@ -8018,10 +8018,10 @@ pinkie@^2.0.0:
|
||||
resolved "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
|
||||
integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA=
|
||||
|
||||
pinyin-match@^1.1.7:
|
||||
version "1.1.8"
|
||||
resolved "https://registry.npmjs.org/pinyin-match/-/pinyin-match-1.1.8.tgz#a172f26a13f9eb65b4e8a687fae3c2d243f8d87d"
|
||||
integrity sha512-n9vXGOICdX9bjFPW2hbOaIU3ZJxcYuyLGHYSY9gdPZxjzx5gIk5w3efDHr5U8slI4ANhQqRPxaaravy20YitCw==
|
||||
pinyin-match@^1.1.9:
|
||||
version "1.1.9"
|
||||
resolved "https://registry.npm.taobao.org/pinyin-match/download/pinyin-match-1.1.9.tgz#456a65f23f29bfc0510f99e6376d17c1032d89c8"
|
||||
integrity sha1-RWpl8j8pv8BRD5nmN20XwQMticg=
|
||||
|
||||
pkg-dir@^1.0.0:
|
||||
version "1.0.0"
|
||||
@@ -10919,28 +10919,28 @@ xdg-basedir@^4.0.0:
|
||||
resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13"
|
||||
integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==
|
||||
|
||||
xgplayer-flv.js@^2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.npmjs.org/xgplayer-flv.js/-/xgplayer-flv.js-2.1.2.tgz#e2da8ca05d7c9d2d1f9deded5af45f644f971186"
|
||||
integrity sha512-60RU7OsIzrjJjAMZODOjGT9iLtp+mg1+ghiF+ADzSq5isjMcrmu8rinlS/FUu8m9WoY46ubqnwNQjScstJ7+/w==
|
||||
xgplayer-flv.js@^2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.npm.taobao.org/xgplayer-flv.js/download/xgplayer-flv.js-2.2.0.tgz#4408d43b807077c6bef1ee3b6f06df3ae81d4d6d"
|
||||
integrity sha1-RAjUO4Bwd8a+8e47bwbfOugdTW0=
|
||||
dependencies:
|
||||
es6-promise "^4.2.4"
|
||||
glob "^7.1.2"
|
||||
webworkify "^1.5.0"
|
||||
|
||||
xgplayer-hls.js@^2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.npmjs.org/xgplayer-hls.js/-/xgplayer-hls.js-2.3.0.tgz#39db25f463d5b955abeeb53b8704824dac13a4ce"
|
||||
integrity sha512-YtrTJWaftruGQaXdwpN2HNkqYbUj7s5O8Xd8+7tRLteyqSXqyspg3AV8oYLiHf1wW4K1ZhP4tq4ieuSPKUCcuw==
|
||||
xgplayer-hls.js@^2.4.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.npm.taobao.org/xgplayer-hls.js/download/xgplayer-hls.js-2.4.0.tgz#67e2c862b7f2be2c22e2e28f5bb15e01c57c36b5"
|
||||
integrity sha1-Z+LIYrfyviwi4uKPW7FeAcV8NrU=
|
||||
dependencies:
|
||||
deepmerge "2.0.1"
|
||||
event-emitter "^0.3.5"
|
||||
eventemitter3 "^4.0.7"
|
||||
|
||||
xgplayer@^2.16.0:
|
||||
version "2.17.1"
|
||||
resolved "https://registry.npmjs.org/xgplayer/-/xgplayer-2.17.1.tgz#4c5b411f8f31b82dcab609839a0d6ac038ed15c0"
|
||||
integrity sha512-PAuJ7LVyxv9gUnXpoM6dV8LMzvuFpfPn07/AWa+nBBEvVaSCCS55HzgehiTnCWTx8n6oLAK4Roc24PEBarXD4Q==
|
||||
xgplayer@^2.17.3:
|
||||
version "2.17.3"
|
||||
resolved "https://registry.npm.taobao.org/xgplayer/download/xgplayer-2.17.3.tgz#6485231ca9e34ee80afb69bdfedba3d464141d5f"
|
||||
integrity sha1-ZIUjHKnjTugK+2m9/tuj1GQUHV8=
|
||||
dependencies:
|
||||
chalk "^2.3.2"
|
||||
commander "^2.15.1"
|
||||
|
||||
Reference in New Issue
Block a user