This commit is contained in:
hunlongyu
2020-11-22 16:38:49 +08:00
8 changed files with 196 additions and 198 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "zy",
"version": "2.6.5",
"version": "2.6.6",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
@@ -21,11 +21,11 @@
"cheerio": "^1.0.0-rc.3",
"core-js": "^3.7.0",
"cors": "^2.8.5",
"dexie": "^3.0.2",
"dexie": "^3.0.3",
"electron-localshortcut": "^3.2.1",
"electron-proxy-agent": "^1.2.0",
"electron-updater": "^4.3.5",
"element-ui": "^2.14.0",
"element-ui": "^2.14.1",
"express": "^4.17.1",
"fast-xml-parser": "^3.17.4",
"html2canvas": "^1.0.0-rc.7",
@@ -47,28 +47,28 @@
"vue-waterfall-plugin": "^1.1.0",
"vuedraggable": "^2.24.3",
"vuex": "^3.5.1",
"xgplayer": "^2.13.0",
"xgplayer": "^2.13.1",
"xgplayer-hls.js": "^2.2.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-plugin-eslint": "~4.4.0",
"@vue/cli-plugin-vuex": "~4.4.0",
"@vue/cli-service": "~4.4.0",
"@vue/cli-plugin-babel": "~4.5.9",
"@vue/cli-plugin-eslint": "~4.5.9",
"@vue/cli-plugin-vuex": "~4.5.9",
"@vue/cli-service": "~4.5.9",
"@vue/eslint-config-standard": "^5.1.2",
"babel-eslint": "^10.1.0",
"babel-plugin-component": "^1.1.1",
"electron": "^10.1.5",
"electron-devtools-installer": "^3.1.0",
"eslint": "^6.7.2",
"electron": "^11.0.2",
"electron-devtools-installer": "^3.1.1",
"eslint": "^7.14.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.2",
"eslint-plugin-vue": "^6.2.2",
"eslint-plugin-standard": "^4.1.0",
"eslint-plugin-vue": "^7.1.0",
"sass": "^1.29.0",
"sass-loader": "^8.0.2",
"vue-cli-plugin-electron-builder": "2.0.0-rc.4",
"sass-loader": "^10.1.0",
"vue-cli-plugin-electron-builder": "2.0.0-rc.5",
"vue-template-compiler": "^2.6.12"
}
}

View File

@@ -425,7 +425,6 @@ export default {
this.classList = []
this.type = {}
this.getClass().then(res => {
this.infiniteId += 1
this.classClick(this.classList[0].name)
})
}
@@ -494,7 +493,7 @@ export default {
const type = this.type.tid
const page = this.pagecount
this.statusText = ' '
if (key && page < 1) { // OK资源前几类硬是去不掉
if (key === undefined || page < 1 || type === undefined) { // OK资源前几类硬是去不掉
$state.complete()
this.statusText = '暂无数据'
return false
@@ -612,9 +611,6 @@ export default {
if (this.$refs.filmWaterfall) {
this.$refs.filmWaterfall.refresh()
}
this.getPage().then(() => {
this.infiniteId += 1
})
}
}
},

View File

@@ -1,7 +1,7 @@
<template>
<div class="frame">
<span class="top" @click="frameClickEvent('top')" title="置顶">
<svg t="1595919317571" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1188" style="width:10px;height:14px"><path d="M43.072 974.72l380.864-301.952 151.936 161.6c0 0 63.424 17.28 67.328-30.72l-3.904-163.584 225.088-259.648 98.048-5.696c0 0 76.928-15.488 21.184-82.752l-275.072-276.928c0 0-74.944-9.6-69.248 59.584l0 75.008L383.552 367.104 225.856 376.64c0 0-57.728 19.2-36.608 69.248l148.16 146.176L43.072 974.72 43.072 974.72z" p-id="1189" :fill="isAlwaysOnTop ? '#555555' : '#ffffff'"></path></svg>
<svg t="1595919317571" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1188" style="width:10px;height:14px"><path d="M43.072 974.72l380.864-301.952 151.936 161.6c0 0 63.424 17.28 67.328-30.72l-3.904-163.584 225.088-259.648 98.048-5.696c0 0 76.928-15.488 21.184-82.752l-275.072-276.928c0 0-74.944-9.6-69.248 59.584l0 75.008L383.552 367.104 225.856 376.64c0 0-57.728 19.2-36.608 69.248l148.16 146.176L43.072 974.72 43.072 974.72z" p-id="1189" :fill="appState.windowIsOnTop ? '#555555' : '#ffffff'"></path></svg>
</span>
<span class="min" @click="frameClickEvent('min')" title="最小化">
<svg t="1595917239849" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1155" style="width:8px;height:14px"><path d="M0 479.936C0 444.64 28.448 416 64.064 416L959.936 416C995.328 416 1024 444.736 1024 479.936L1024 544.064C1024 579.392 995.552 608 959.936 608L64.064 608C28.672 608 0 579.264 0 544.064L0 479.936Z" p-id="1156" fill="#ffffff"></path></svg>
@@ -18,10 +18,14 @@
const { remote } = require('electron')
export default {
name: 'frame',
data () {
const win = remote.getCurrentWindow()
return {
isAlwaysOnTop: win.isAlwaysOnTop()
computed: {
appState: {
get () {
return this.$store.getters.getAppState
},
set (val) {
this.SET_APPSTATE(val)
}
}
},
methods: {
@@ -37,8 +41,8 @@ export default {
win.destroy()
}
if (e === 'top') {
this.isAlwaysOnTop = !this.isAlwaysOnTop
win.setAlwaysOnTop(this.isAlwaysOnTop)
this.appState.windowIsOnTop = !this.appState.windowIsOnTop
win.setAlwaysOnTop(this.appState.windowIsOnTop)
}
}
}

View File

@@ -91,7 +91,7 @@
align="right"
:width="200">
<template #header>
<span>频道数:{{ iptvList.length }}</span>
<span>{{ enableBatchEdit ? `频道数:${channelList.length}` : `资源总数:${iptvList.length}` }}</span>
</template>
<template slot-scope="scope">
<el-button @click.stop="moveToTopEvent(scope.row)" type="text" v-if="scope.row.channels">置顶</el-button>

View File

@@ -230,6 +230,7 @@ import { directive as onClickaway } from 'vue-clickaway'
import { exec, execFile } from 'child_process'
const { remote, clipboard } = require('electron')
const win = remote.getCurrentWindow()
const PinyinMatch = require('pinyin-match')
const VIDEO_DETAIL_CACHE = {}
@@ -382,6 +383,14 @@ export default {
this.SET_SHARE(val)
}
},
appState: {
get () {
return this.$store.getters.getAppState
},
set (val) {
this.SET_APPSTATE(val)
}
},
setting () {
return this.$store.getters.getSetting
}
@@ -392,7 +401,9 @@ export default {
this.right.type = ''
if (this.view === 'Play') {
this.getChannelList()
if (this.video.key === '' && !this.video.iptv) this.channelListShow = true
if (this.video.key === '' && !this.video.iptv) {
this.channelListShow = true
}
}
},
video: {
@@ -427,7 +438,7 @@ export default {
}
},
methods: {
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE']),
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE', 'SET_APPSTATE']),
handleNodeClick (node) {
if (node.channel) {
this.playChannel(node.channel)
@@ -519,7 +530,6 @@ export default {
ele.isActive = ele.channels.some(e => e.isActive)
channelList.remove(ele.id)
channelList.add(ele)
this.getChannelList()
},
playChannel (channel) {
if (channel.channels) {
@@ -530,7 +540,6 @@ export default {
ele.prefer = channel.id
channelList.remove(ele.id)
channelList.add(ele)
this.getChannelList()
this.right.sources = ele.channels.filter(e => e.isActive)
}
this.video.iptv = channel
@@ -642,7 +651,6 @@ export default {
this.timerEvent()
},
changeVideo () {
const win = remote.getCurrentWindow()
win.setProgressBar(-1)
this.checkStar()
this.checkTop()
@@ -652,7 +660,6 @@ export default {
const endTime = this.xg.duration
const currentTime = this.xg.currentTime
const progress = parseFloat((currentTime / endTime).toFixed(2))
const win = remote.getCurrentWindow()
win.setProgressBar(progress)
const db = await history.find({ site: this.video.key, ids: this.video.info.id })
if (db) {
@@ -666,7 +673,7 @@ export default {
},
prevEvent () {
if (this.video.iptv) {
var index = this.channelList.findIndex(obj => obj.prefer === this.video.iptv.id)
var index = this.channelList.findIndex(obj => obj.id === this.video.iptv.channelID)
if (index >= 1) {
var channel = this.channelList[index - 1]
this.playChannel(channel)
@@ -684,7 +691,7 @@ export default {
},
nextEvent () {
if (this.video.iptv) {
var index = this.channelList.findIndex(obj => obj.prefer === this.video.iptv.id)
var index = this.channelList.findIndex(obj => obj.id === this.video.iptv.channelID)
if (index < (this.channelList.length - 1)) {
var channel = this.channelList[index + 1]
this.playChannel(channel)
@@ -768,7 +775,6 @@ export default {
}
},
async miniEvent () {
const win = remote.getCurrentWindow()
this.mainWindowBounds = JSON.parse(JSON.stringify(win.getBounds()))
let miniWindowBounds
await mini.find().then(res => { if (res) miniWindowBounds = res.bounds })
@@ -778,7 +784,6 @@ export default {
this.miniMode = true
},
async exitMiniEvent () {
const win = remote.getCurrentWindow()
await mini.find().then(res => {
let doc = {}
doc = {
@@ -873,8 +878,7 @@ export default {
}
},
checkTop () {
const win = remote.getCurrentWindow()
this.isTop = win.isAlwaysOnTop()
this.isTop = this.appState.windowIsOnTop
},
closeListEvent () {
this.right.show = false
@@ -1023,7 +1027,7 @@ export default {
if (this.xg.paused) {
this.xg.play()
// 继续播放时,隐藏进度条
remote.getCurrentWindow().setProgressBar(-1)
win.setProgressBar(-1)
} else {
this.xg.pause()
}
@@ -1061,11 +1065,12 @@ export default {
return false
}
if (e === 'top') {
const win = remote.getCurrentWindow()
if (win.isAlwaysOnTop()) {
if (this.appState.windowIsOnTop) {
win.setAlwaysOnTop(false)
this.appState.windowIsOnTop = false
} else {
win.setAlwaysOnTop(true)
this.appState.windowIsOnTop = true
}
return false
}
@@ -1109,7 +1114,6 @@ export default {
return false
}
if (e === 'opacityUp') {
const win = remote.getCurrentWindow()
const num = win.getOpacity()
if (num > 0.1) {
win.setOpacity(num - 0.1)
@@ -1117,7 +1121,6 @@ export default {
return false
}
if (e === 'opacityDown') {
const win = remote.getCurrentWindow()
const num = win.getOpacity()
if (num < 1) {
win.setOpacity(num + 0.1)
@@ -1146,6 +1149,11 @@ export default {
this.miniEvent()
return false
}
if (e === 'resetMini') {
const miniWindowBounds = { x: this.mainWindowBounds.x, y: this.mainWindowBounds.y, width: 550, height: 340 }
win.setBounds(miniWindowBounds)
return false
}
},
changeSetting () {
this.mtEvent()
@@ -1319,7 +1327,6 @@ export default {
})
},
videoStop () {
const win = remote.getCurrentWindow()
win.setProgressBar(-1)
if (this.xg.fullscreen) {
this.xg.exitFullscreen()
@@ -1340,7 +1347,6 @@ export default {
}, 1000)
},
minMaxEvent () {
const win = remote.getCurrentWindow()
win.on('minimize', () => {
if (this.xg && this.xg.hasStart) {
this.xg.pause()

View File

@@ -3,7 +3,7 @@
"id": 1,
"key": "mahuazy",
"name": "麻花资源",
"api": "https://www.mhapi123.com/inc/api.php",
"api": "http://www.mhapi123.com/inc/ldg_api.php",
"download": "",
"group": "默认",
"isActive": true,
@@ -11,56 +11,25 @@
},
{
"id": 2,
"key": "niuniucj",
"name": "牛牛资源",
"api": "http://v.niuniucj.com/inc/api.php",
"key": "1886zy",
"name": "1886 资源",
"api": "http://cj.1886zy.co/inc/api.php",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"key": "wolongzy",
"id": 3,
"key": "88zyw",
"name": "88 影视资源站",
"api": "http://www.88zyw.net/inc/api.php",
"name": "卧龙资源网",
"api": "https://www.mhapi123.com/inc/api.php",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
"isActive": true
},
{
"id": 4,
"key": "apibdzy",
"name": "百度云资源",
"api": "https://api.apibdzy.com/api.php/provide/vod/at/xml",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 5,
"key": "mbo",
"name": "秒播资源",
"api": "http://caiji.mb77.vip/inc/api.php",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 6,
"key": "zuidazy",
"name": "最大资源网",
"api": "http://www.zdziyuan.com/inc/api.php",
"download": "http://www.zdziyuan.com/inc/apidown.php",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 7,
"key": "123ku",
"name": "123 资源",
"api": "http://cj.123ku2.com:12315/inc/api.php",
@@ -70,97 +39,7 @@
"status": "可用"
},
{
"id": 8,
"key": "okzy",
"name": "OK 资源网",
"api": "http://cj.okzy.tv/inc/api.php",
"download": "http://cj.okzy.tv/inc/apidown.php",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 9,
"key": "kuyunzy",
"name": "酷云资源",
"api": "http://caiji.kuyun98.com/inc/ldg_api.php",
"download": "http://caiji.kuyun98.com/inc/apidown.php",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 10,
"key": "kubozy",
"name": "酷播资源",
"api": "http://api.kbzyapi.com/inc/api.php",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 11,
"key": "yongjiuzy",
"name": "永久资源",
"api": "http://cj.yongjiuzyw.com/inc/api.php",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 12,
"key": "rrzy",
"name": "人人资源",
"api": "https://www.rrzyw.cc/api.php/provide/vod/from/rrm3u8/at/xml/",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 13,
"key": "bbkdj",
"name": "步步高顶尖资源网",
"api": "http://api.bbkdj.com/api",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 14,
"key": "solezy",
"name": "搜乐资源网",
"api": "https://www.caijizy.vip/api.php/provide/vod/at/xml/",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 15,
"key": "zuixinzy",
"name": "最新资源",
"api": "http://api.zuixinapi.com/inc/api.php",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 16,
"key": "605zy",
"name": "605资源",
"api": "http://www.605zy.net/inc/seacmsapi.php",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 17,
"id": 5,
"key": "subo988",
"name": "速播资源站",
"api": "https://www.subo988.com/inc/api.php",
@@ -169,11 +48,129 @@
"isActive": true,
"status": "可用"
},
{
"id": 6,
"key": "88zyw",
"name": "88 影视资源站",
"api": "http://www.88zyw.net/inc/api.php",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"key": "zuidazy",
"id": 7,
"name": "最大资源网",
"api": "http://www.zdziyuan.com/inc/ldg_sea.php",
"download": "http://www.zdziyuan.com/inc/apidown.php",
"group": "默认",
"isActive": true
},
{
"key": "mbo",
"id": 8,
"name": "秒播资源",
"api": "http://caiji.mb77.vip/inc/seacmsapi.php",
"download": "",
"group": "默认",
"isActive": true
},
{
"id": 9,
"key": "apibdzy",
"name": "百度云资源",
"api": "https://api.apibdzy.com/api.php/provide/vod/at/xml",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 10,
"key": "okzy",
"name": "OK 资源网",
"api": "http://cj.okzy.tv/inc/api.php",
"download": "http://cj.okzy.tv/inc/apidown.php",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 11,
"key": "kuyunzy",
"name": "酷云资源",
"api": "http://caiji.kuyun98.com/inc/ldg_api.php",
"download": "http://caiji.kuyun98.com/inc/apidown.php",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 12,
"key": "kubozy",
"name": "酷播资源",
"api": "http://api.kbzyapi.com/inc/api.php",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 13,
"key": "yongjiuzy",
"name": "永久资源",
"api": "http://cj.yongjiuzyw.com/inc/api.php",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 14,
"key": "rrzy",
"name": "人人资源",
"api": "https://www.rrzyw.cc/api.php/provide/vod/from/rrm3u8/at/xml/",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 15,
"key": "bbkdj",
"name": "步步高顶尖资源网",
"api": "http://api.bbkdj.com/api",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 16,
"key": "solezy",
"name": "搜乐资源网",
"api": "https://www.caijizy.vip/api.php/provide/vod/at/xml/",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 17,
"key": "zuixinzy",
"name": "最新资源",
"api": "http://api.zuixinapi.com/inc/api.php",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 18,
"key": "1886zy",
"name": "1886 资源",
"api": "http://cj.1886zy.co/inc/api.php",
"key": "605zy",
"name": "605资源",
"api": "http://www.605zy.net/inc/seacmsapi.php",
"download": "",
"group": "默认",
"isActive": true,
@@ -231,16 +228,6 @@
},
{
"id": 24,
"key": "wolongzy",
"name": "卧龙资源",
"api": "http://cj.wlzy.tv/inc/api_mac.php",
"download": "",
"group": "默认",
"isActive": true,
"status": "可用"
},
{
"id": 25,
"key": "mokazy",
"name": "魔卡资源网",
"api": "https://cj.heiyap.com/api.php/provide/vod/at/xml/",
@@ -250,7 +237,7 @@
"status": "可用"
},
{
"id": 26,
"id": 25,
"key": "158zy",
"name": "壹伍捌资源网",
"api": "http://cj.158zyz.net:158/inc/api.php",
@@ -260,7 +247,7 @@
"status": "可用"
},
{
"id": 27,
"id": 26,
"key": "kyzy",
"name": "快影资源站",
"api": "https://www.kyzy.tv/api.php/kyyun/vod/at/xml/",

View File

@@ -113,6 +113,11 @@ const localKey = [
name: 'mini',
desc: '进入或退出mini模式',
key: 'alt+m'
},
{
name: 'resetMini',
desc: '恢复mini窗口默认',
key: 'ctrl+0'
}
]

View File

@@ -26,8 +26,8 @@ export default new Vuex.Store({
key: '',
info: {}
},
editSites: {
sites: []
appState: {
windowIsOnTop: false
}
},
getters: {
@@ -46,8 +46,8 @@ export default new Vuex.Store({
getVideo: state => {
return state.video
},
getEditSites: state => {
return state.editSites
getAppState: state => {
return state.appState
}
},
mutations: {
@@ -66,8 +66,8 @@ export default new Vuex.Store({
SET_VIDEO: (state, payload) => {
state.video = payload
},
SET_EDITSITES: (state, payload) => {
state.editSites = payload
SET_APPSTATE: (state, payload) => {
state.appState = payload
}
}
})