mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-14 16:06:48 +08:00
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81b34ff54a | ||
|
|
9b9db55f49 | ||
|
|
e7c7367ea8 | ||
|
|
5e37ef32fd | ||
|
|
85525745a1 | ||
|
|
c7f581a088 | ||
|
|
a88dfb1bc3 | ||
|
|
410cd8fc1a | ||
|
|
bb30be3c4d | ||
|
|
6230c9e87a | ||
|
|
93efb64211 | ||
|
|
3c4dd91d36 | ||
|
|
45041fdab1 | ||
|
|
bcf0613ff0 | ||
|
|
3107b851c5 | ||
|
|
b27883ad0f | ||
|
|
e0c3502c3f | ||
|
|
4c2db002eb | ||
|
|
898f769d24 | ||
|
|
d6549c6a6b | ||
|
|
eea4081d58 | ||
|
|
1e9f48e48c | ||
|
|
0816933679 | ||
|
|
8af6ff2bd7 | ||
|
|
c5d979fd28 | ||
|
|
beb0c29326 | ||
|
|
5509ace412 |
10
.github/workflows/x86.yml
vendored
10
.github/workflows/x86.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: release-build
|
||||
name: x86-release-build
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -25,11 +25,3 @@ jobs:
|
||||
shell: pwsh
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: dist_electron
|
||||
path: dist_electron/*.exe
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
5837
package-lock.json
generated
5837
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
31
package.json
31
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "zy",
|
||||
"version": "2.8.4",
|
||||
"version": "2.8.8",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
@@ -17,15 +17,16 @@
|
||||
},
|
||||
"main": "background.js",
|
||||
"dependencies": {
|
||||
"axios": "^0.21.1",
|
||||
"bootstrap-vue": "^2.21.2",
|
||||
"cheerio": "^1.0.0-rc.6",
|
||||
"@electron/remote": "^2.0.8",
|
||||
"axios": "^0.21.2",
|
||||
"bootstrap-vue": "^2.22.0",
|
||||
"cheerio": "1.0.0-rc.6",
|
||||
"core-js": "^3.10.2",
|
||||
"dexie": "^3.0.3",
|
||||
"dexie": "^3.2.2",
|
||||
"electron-localshortcut": "^3.2.1",
|
||||
"electron-proxy-agent": "^1.2.0",
|
||||
"electron-updater": "^4.3.8",
|
||||
"element-ui": "^2.15.1",
|
||||
"element-ui": "^2.15.9",
|
||||
"fast-xml-parser": "^3.19.0",
|
||||
"html2canvas": "^1.0.0-rc.7",
|
||||
"iptv-playlist-parser": "^0.6.0",
|
||||
@@ -40,34 +41,26 @@
|
||||
"session": "^0.1.0",
|
||||
"sortablejs": "^1.13.0",
|
||||
"v-fit-columns": "^0.2.0",
|
||||
"vue": "^2.6.12",
|
||||
"vue": "^2.6.14",
|
||||
"vue-infinite-loading": "^2.4.5",
|
||||
"vue-waterfall-plugin": "^1.1.0",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuex": "^3.6.2",
|
||||
"xgplayer": "2.19.1",
|
||||
"xgplayer-flv.js": "^2.3.0",
|
||||
"xgplayer-hls.js": "^2.4.2"
|
||||
"xgplayer-hls.js": "^2.4.2",
|
||||
"xgplayer-mp4": "^1.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.11",
|
||||
"@vue/cli-plugin-eslint": "~4.5.11",
|
||||
"@vue/cli-plugin-vuex": "~4.5.11",
|
||||
"@vue/cli-service": "~4.5.11",
|
||||
"@vue/eslint-config-standard": "^6.0.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"electron": "^11.3.0",
|
||||
"electron": "^13.0.0",
|
||||
"electron-devtools-installer": "^3.1.1",
|
||||
"eslint": "^7.20.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.3.1",
|
||||
"eslint-plugin-standard": "^4.1.0",
|
||||
"eslint-plugin-vue": "^7.6.0",
|
||||
"sass": "^1.30.0",
|
||||
"sass-loader": "^10.1.0",
|
||||
"vue-cli-plugin-electron-builder": "2.0.0-rc.6",
|
||||
"vue-template-compiler": "^2.6.12"
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
<Setting v-show="view === 'Setting'" />
|
||||
<IPTV v-show="view === 'IPTV'" />
|
||||
<EditSites v-if="view === 'EditSites'"/>
|
||||
<Recommendation v-show="view === 'Recommendation'" />
|
||||
</div>
|
||||
<transition name="slide">
|
||||
<Detail v-if="detail.show"/>
|
||||
@@ -23,7 +22,7 @@
|
||||
|
||||
<script>
|
||||
import { setting } from './lib/dexie'
|
||||
const { remote } = require('electron')
|
||||
const remote = require('@electron/remote')
|
||||
export default {
|
||||
name: 'App',
|
||||
data () {
|
||||
|
||||
@@ -4,7 +4,10 @@ import { app, protocol, BrowserWindow, globalShortcut } from 'electron'
|
||||
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib'
|
||||
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
|
||||
import { initUpdater } from './lib/update/update'
|
||||
require('@electron/remote/main').initialize()
|
||||
|
||||
const isDevelopment = process.env.NODE_ENV !== 'production'
|
||||
|
||||
// const log = require('electron-log') // 用于调试主程序
|
||||
|
||||
app.commandLine.appendSwitch('disable-features', 'OutOfBlinkCors') // 允许跨域
|
||||
@@ -23,7 +26,8 @@ function createWindow () {
|
||||
webPreferences: {
|
||||
webSecurity: false,
|
||||
enableRemoteModule: true,
|
||||
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
allowRunningInsecureContent: false
|
||||
}
|
||||
})
|
||||
@@ -35,12 +39,13 @@ function createWindow () {
|
||||
createProtocol('app')
|
||||
win.loadURL('app://./index.html')
|
||||
}
|
||||
|
||||
|
||||
// 修改request headers
|
||||
// Sec-Fetch下禁止修改,浏览器自动加上请求头 https://www.cnblogs.com/fulu/p/13879080.html 暂时先用index.html的meta referer policy替代
|
||||
const filter = {
|
||||
urls: ['http://*/*', 'http://*/*']
|
||||
}
|
||||
require("@electron/remote/main").enable(win.webContents)
|
||||
win.webContents.session.webRequest.onBeforeSendHeaders(filter, (details, callback) => {
|
||||
const url = new URL(details.url)
|
||||
details.requestHeaders.Origin = url.origin
|
||||
@@ -63,7 +68,7 @@ function createWindow () {
|
||||
if (process.platform === 'darwin') {
|
||||
app.dock.show()
|
||||
}
|
||||
if (process.platform === 'Linux') {
|
||||
if (process.platform === 'linux') {
|
||||
app.disableHardwareAcceleration()
|
||||
app.commandLine.appendSwitch('--no-sandbox') // linux 关闭沙盒模式
|
||||
}
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
</g>
|
||||
</svg>
|
||||
</span>
|
||||
<span :class="[view === 'Recommendation' ? 'active ': ''] + 'zy-svg'" @click="changeView('Recommendation')">
|
||||
<!-- <span :class="[view === 'Recommendation' ? 'active ': ''] + 'zy-svg'" @click="changeView('Recommendation')">
|
||||
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="48px" height="48px" viewBox="0 0 24 24" aria-labelledby="thumbUpIconTitle" stroke="#2329D6" stroke-width="1" stroke-linecap="square" stroke-linejoin="miter" fill="none" color="#2329D6">
|
||||
<title id="thumbUpIconTitle">影视推荐</title>
|
||||
<path d="M8,8.73984815 C8,8.26242561 8.17078432,7.80075162 8.4814868,7.43826541 L13.2723931,1.84887469 C13.7000127,1.34998522 14.4122932,1.20614658 15,1.5 C15.5737957,1.78689785 15.849314,2.45205792 15.6464466,3.06066017 L14,8 L18.6035746,8 C18.7235578,8 18.8432976,8.01079693 18.9613454,8.03226018 C20.0480981,8.22985158 20.7689058,9.27101818 20.5713144,10.3577709 L19.2985871,17.3577709 C19.1256814,18.3087523 18.2974196,19 17.3308473,19 L10,19 C8.8954305,19 8,18.1045695 8,17 L8,8.73984815 Z"/>
|
||||
<path d="M4,18 L4,9"/>
|
||||
</svg>
|
||||
</span>
|
||||
</span> -->
|
||||
<span :class="[view === 'Play' ? 'active ': ''] + 'zy-svg'" @click="changeView('Play')">
|
||||
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="playIconTitle">
|
||||
<title id="playIconTitle">播放</title>
|
||||
|
||||
@@ -41,7 +41,18 @@
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isActive"
|
||||
@click.native.stop='isActiveChangeEvent(scope.row)'>
|
||||
@click.native.stop='propChangeEvent(scope.row)'>
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="reverseOrder"
|
||||
width="120"
|
||||
label="倒序排列">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.reverseOrder"
|
||||
@click.native.stop='propChangeEvent(scope.row)'>>
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -139,9 +150,9 @@
|
||||
import { mapMutations } from 'vuex'
|
||||
import { sites, setting } from '../lib/dexie'
|
||||
import zy from '../lib/site/tools'
|
||||
import { remote } from 'electron'
|
||||
import fs from 'fs'
|
||||
import Sortable from 'sortablejs'
|
||||
const remote = require('@electron/remote')
|
||||
|
||||
export default {
|
||||
name: 'editSites',
|
||||
@@ -269,6 +280,11 @@ export default {
|
||||
},
|
||||
getSites () {
|
||||
sites.all().then(res => {
|
||||
res.forEach(element => {
|
||||
if (element.reverseOrder === null || element.reverseOrder === undefined) {
|
||||
element.reverseOrder = false
|
||||
}
|
||||
})
|
||||
this.sites = res
|
||||
})
|
||||
},
|
||||
@@ -481,8 +497,7 @@ export default {
|
||||
resetSitesEvent () {
|
||||
let url = this.setting.sitesDataURL
|
||||
if (!url) {
|
||||
// 如果没有设置源站文件链接,使用默认的gitee源
|
||||
url = 'https://gitee.com/cuiocean/ZY-Player-Resources/raw/main/Sites/Sites.json'
|
||||
url = 'https://raw.iqiq.io/Hunlongyu/ZY-Player-Resources/main/Sites/20220713.json'
|
||||
}
|
||||
zy.getDefaultSites(url).then(res => {
|
||||
if (res.length > 0) {
|
||||
@@ -507,9 +522,10 @@ export default {
|
||||
this.sites = this.$refs.editSitesTable.tableData
|
||||
}
|
||||
},
|
||||
isActiveChangeEvent (row) {
|
||||
propChangeEvent (row) {
|
||||
sites.remove(row.id)
|
||||
sites.add(row)
|
||||
this.getSites()
|
||||
},
|
||||
resetId (inArray) {
|
||||
let id = 1
|
||||
|
||||
@@ -510,7 +510,7 @@ export default {
|
||||
switch (this.sortKeyword) {
|
||||
case '按上映年份':
|
||||
filteredData.sort(function (a, b) {
|
||||
return a.year - b.year
|
||||
return b.year - a.year
|
||||
})
|
||||
break
|
||||
case '按片名':
|
||||
@@ -524,8 +524,14 @@ export default {
|
||||
})
|
||||
break
|
||||
default:
|
||||
filteredData.sort(function (a, b) {
|
||||
return new Date(b.last) - new Date(a.last)
|
||||
})
|
||||
break
|
||||
}
|
||||
|
||||
// Get unique film data
|
||||
filteredData = Array.from(new Set(filteredData))
|
||||
if (this.showFind) {
|
||||
this.filteredSearchContents = filteredData
|
||||
} else {
|
||||
@@ -602,7 +608,7 @@ export default {
|
||||
FILM_DATA_CACHE[this.site.key] = {
|
||||
classList: this.classList
|
||||
}
|
||||
this.classClick(this.site.name)
|
||||
this.classClick(this.type.name)
|
||||
})
|
||||
},
|
||||
classClick (className) {
|
||||
@@ -658,11 +664,7 @@ export default {
|
||||
return ret
|
||||
},
|
||||
toFlipPagecount () {
|
||||
// 似乎需要解析的网站的视频排序和其他m3u8采集站的顺序正好相反
|
||||
if (this.site.jiexiUrl) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return this.site.reverseOrder
|
||||
},
|
||||
infiniteHandler ($state) {
|
||||
const key = this.site.key
|
||||
@@ -870,12 +872,34 @@ export default {
|
||||
this.showFind = false
|
||||
}
|
||||
},
|
||||
async getDefaultSites () {
|
||||
const s = await setting.find()
|
||||
zy.getDefaultSites(s.sitesDataURL).then(res => {
|
||||
if (res && typeof res === 'string') {
|
||||
const json = JSON.parse(res)
|
||||
sites.clear().then(sites.bulkAdd(json))
|
||||
}
|
||||
if (res && typeof res === 'object') {
|
||||
sites.clear().then(sites.bulkAdd(res))
|
||||
}
|
||||
sites.all().then(res => {
|
||||
if (res) {
|
||||
this.sites = res.filter(item => item.isActive)
|
||||
if (this.site === undefined || !this.sites.some(x => x.key === this.site.key)) {
|
||||
this.site = this.sites[0]
|
||||
this.selectedSiteName = this.sites[0].name
|
||||
}
|
||||
}
|
||||
})
|
||||
}).catch(error => {
|
||||
this.$message.error('获取云端源站失败. ' + error)
|
||||
})
|
||||
},
|
||||
getAllSites () {
|
||||
sites.all().then(res => {
|
||||
if (res.length <= 0) {
|
||||
this.site = {}
|
||||
this.type = {}
|
||||
this.list = []
|
||||
this.$message.warning('检测到视频源未能正常加载, 即将重置源.')
|
||||
this.getDefaultSites()
|
||||
} else {
|
||||
this.sites = res.filter(item => item.isActive)
|
||||
if (this.site === undefined || !this.sites.some(x => x.key === this.site.key)) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const { remote } = require('electron')
|
||||
const remote = require('@electron/remote')
|
||||
export default {
|
||||
name: 'frame',
|
||||
computed: {
|
||||
|
||||
@@ -154,9 +154,9 @@
|
||||
import { mapMutations } from 'vuex'
|
||||
import { history, sites, setting } from '../lib/dexie'
|
||||
import zy from '../lib/site/tools'
|
||||
import { remote } from 'electron'
|
||||
import fs from 'fs'
|
||||
import Waterfall from 'vue-waterfall-plugin'
|
||||
const remote = require('@electron/remote')
|
||||
const { clipboard } = require('electron')
|
||||
|
||||
export default {
|
||||
|
||||
@@ -110,10 +110,10 @@ import { mapMutations } from 'vuex'
|
||||
import { iptv, channelList, setting } from '../lib/dexie'
|
||||
import { iptv as defaultChannels } from '../lib/dexie/initData'
|
||||
import zy from '../lib/site/tools'
|
||||
import { remote } from 'electron'
|
||||
import fs from 'fs'
|
||||
import Sortable from 'sortablejs'
|
||||
import axios from 'axios'
|
||||
const remote = require('@electron/remote')
|
||||
export default {
|
||||
name: 'iptv',
|
||||
data () {
|
||||
|
||||
@@ -252,6 +252,7 @@ import { mapMutations } from 'vuex'
|
||||
import { star, history, setting, shortcut, mini, channelList, sites } from '../lib/dexie'
|
||||
import zy from '../lib/site/tools'
|
||||
import Player from 'xgplayer'
|
||||
import 'xgplayer-mp4'
|
||||
import HlsJsPlayer from 'xgplayer-hls.js'
|
||||
import FlvJsPlayer from 'xgplayer-flv.js'
|
||||
import mt from 'mousetrap'
|
||||
@@ -259,7 +260,8 @@ 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 { clipboard } = require('electron')
|
||||
const remote = require('@electron/remote')
|
||||
const win = remote.getCurrentWindow()
|
||||
const URL = require('url')
|
||||
const VIDEO_DETAIL_CACHE = {}
|
||||
|
||||
@@ -166,8 +166,8 @@ export default {
|
||||
filteredList: [],
|
||||
// 不同推荐
|
||||
recommendationsDefault: [],
|
||||
recommendationTypes: ['作者推荐', '豆瓣热门电影', '豆瓣高分电影', '豆瓣热门剧集', '豆瓣热门美剧', '豆瓣热门英剧', '豆瓣热门国产剧', '豆瓣热门综艺', '豆瓣热门动漫', '豆瓣热门纪录片', '豆瓣热门动画电影'],
|
||||
selectedRecommendationType: '作者推荐',
|
||||
recommendationTypes: ['豆瓣热门电影', '豆瓣高分电影', '豆瓣华语电影', '豆瓣冷门佳片', '豆瓣热门剧集', '豆瓣热门美剧', '豆瓣热门英剧', '豆瓣热门国产剧', '豆瓣热门综艺', '豆瓣热门动漫', '豆瓣热门纪录片', '豆瓣热门动画电影'],
|
||||
selectedRecommendationType: '豆瓣热门电影',
|
||||
// Toolbar
|
||||
showToolbar: false,
|
||||
selectedAreas: [],
|
||||
@@ -199,7 +199,11 @@ export default {
|
||||
hotBritishTVSeriesPageStart: 0,
|
||||
hotBritishTVSeries: [],
|
||||
hotChineseTVSeriesPageStart: 0,
|
||||
hotChineseTVSeries: []
|
||||
hotChineseTVSeries: [],
|
||||
goodButNotHotMoviesPageStart: 0,
|
||||
goodButNotHotMovies: [],
|
||||
chineseMoviesPageStart: 0,
|
||||
chineseMovies: []
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -299,6 +303,12 @@ export default {
|
||||
if (this.selectedRecommendationType === '豆瓣热门动画电影') {
|
||||
this.recommendations = [...this.douban.hotCartonMovie]
|
||||
}
|
||||
if (this.selectedRecommendationType === '豆瓣冷门佳片') {
|
||||
this.recommendations = [...this.douban.goodButNotHotMovies]
|
||||
}
|
||||
if (this.selectedRecommendationType === '豆瓣华语电影') {
|
||||
this.recommendations = [...this.douban.chineseMovies]
|
||||
}
|
||||
if (this.recommendations.length === 0) {
|
||||
this.updateDoubanRecommendationsEvent()
|
||||
}
|
||||
@@ -350,6 +360,12 @@ export default {
|
||||
if (this.selectedRecommendationType === '豆瓣热门动画电影') {
|
||||
this.douban.hotCartonMovie.push(movie)
|
||||
}
|
||||
if (this.selectedRecommendationType === '豆瓣冷门佳片') {
|
||||
this.douban.goodButNotHotMovies.push(movie)
|
||||
}
|
||||
if (this.selectedRecommendationType === '豆瓣华语电影') {
|
||||
this.douban.chineseMovies.push(movie)
|
||||
}
|
||||
},
|
||||
searchAndCacheMovie (element) {
|
||||
zy.searchFirstDetail(this.sites[0].key, element.title).then(detailRes => {
|
||||
@@ -436,6 +452,14 @@ export default {
|
||||
doubanUrl = `https://movie.douban.com/j/search_subjects?type=movie&tag=动画&sort=recommend&page_limit=${this.douban.page_limit}&page_start=${this.douban.hotCartonMoviePageStart}`
|
||||
this.douban.hotCartonMoviePageStart = this.douban.hotCartonMoviePageStart + this.douban.page_limit
|
||||
}
|
||||
if (this.selectedRecommendationType === '豆瓣冷门佳片') {
|
||||
doubanUrl = `https://movie.douban.com/j/search_subjects?type=movie&tag=冷门佳片&sort=recommend&page_limit=${this.douban.page_limit}&page_start=${this.douban.goodButNotHotMoviesPageStart}`
|
||||
this.douban.goodButNotHotMoviesPageStart = this.douban.goodButNotHotMoviesPageStart + this.douban.page_limit
|
||||
}
|
||||
if (this.selectedRecommendationType === '豆瓣华语电影') {
|
||||
doubanUrl = `https://movie.douban.com/j/search_subjects?type=movie&tag=华语&sort=recommend&page_limit=${this.douban.page_limit}&page_start=${this.douban.chineseMoviesPageStart}`
|
||||
this.douban.chineseMoviesPageStart = this.douban.chineseMoviesPageStart + this.douban.page_limit
|
||||
}
|
||||
this.getRecommendationsDoubanMovieOrTV(doubanUrl)
|
||||
},
|
||||
toggleViewMode () {
|
||||
@@ -474,7 +498,7 @@ export default {
|
||||
switch (this.sortKeyword) {
|
||||
case '按上映年份':
|
||||
filteredData.sort(function (a, b) {
|
||||
return a.detail.year - b.detail.year
|
||||
return b.detail.year - a.detail.year
|
||||
})
|
||||
break
|
||||
case '按片名':
|
||||
@@ -536,13 +560,9 @@ export default {
|
||||
})
|
||||
},
|
||||
getRecommendations () {
|
||||
recommendation.all().then(res => {
|
||||
this.recommendations = res.sort(function (a, b) {
|
||||
return b.id - a.id
|
||||
})
|
||||
this.recommendationsDefault = this.recommendations
|
||||
this.getFilterData()
|
||||
})
|
||||
this.recommendationsDefault = []
|
||||
this.changeRecommendationTypeEvent()
|
||||
this.getFilterData()
|
||||
},
|
||||
getFilterData () {
|
||||
this.types = [...new Set(this.recommendations.map(ele => ele.detail.type))].filter(x => x)
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
<div class="info">
|
||||
<a @click="linkOpen('http://zyplayer.fun/')">官网</a>
|
||||
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player')">Github</a>
|
||||
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/releases/tag/v' + pkg.version)">v{{pkg.version}}更新日志</a>
|
||||
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/issues/80')">常见问题</a>
|
||||
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/issues')">反馈建议</a>
|
||||
<a @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/discussions/776')">软件完全免费,如遇收费,请立即给差评并退费!</a>
|
||||
<a style="color:#38dd77" @click="openUpdate()" v-show="update.find" >最新版本v{{update.version}}</a>
|
||||
</div>
|
||||
<div class="shortcut">
|
||||
@@ -148,13 +146,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qrcode">
|
||||
<div class="title">请作者吃辣条</div>
|
||||
<div class="qrcode-box">
|
||||
<img class="qrcode-item" src="../assets/image/wepay-hunlongyu.png">
|
||||
<img class="qrcode-item" src="../assets/image/wepay_cuiocean.jpg">
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearDB">
|
||||
<span @click="clearDBEvent" class="clearBtn">软件重置</span>
|
||||
<span @click="changePasswordEvent" class="clearBtn">设置密码</span>
|
||||
@@ -265,7 +256,8 @@ import { mapMutations } from 'vuex'
|
||||
import pkg from '../../package.json'
|
||||
import { setting, sites, shortcut } from '../lib/dexie'
|
||||
import { localKey as defaultShortcuts } from '../lib/dexie/initData'
|
||||
import { shell, clipboard, remote, ipcRenderer } from 'electron'
|
||||
import { shell, clipboard, ipcRenderer } from 'electron'
|
||||
const remote = require('@electron/remote')
|
||||
import db from '../lib/dexie/dexie'
|
||||
import zy from '../lib/site/tools'
|
||||
export default {
|
||||
@@ -337,9 +329,14 @@ export default {
|
||||
if (!this.setting.sitesDataURL) this.resetDefaultSitesDataURL()
|
||||
})
|
||||
},
|
||||
getDefaultSites () {
|
||||
zy.getDefaultSites(this.setting.sitesDataURL).then(res => {
|
||||
if (res.length > 0) {
|
||||
async getDefaultSites () {
|
||||
const s = await setting.find()
|
||||
zy.getDefaultSites(s.sitesDataURL).then(res => {
|
||||
if (res && typeof res === 'string') {
|
||||
const json = JSON.parse(res)
|
||||
sites.clear().then(sites.bulkAdd(json))
|
||||
}
|
||||
if (res && typeof res === 'object') {
|
||||
sites.clear().then(sites.bulkAdd(res))
|
||||
}
|
||||
}).catch(error => {
|
||||
@@ -390,7 +387,7 @@ export default {
|
||||
this.updateSettingEvent()
|
||||
},
|
||||
resetDefaultSitesDataURL () {
|
||||
this.setting.sitesDataURL = 'https://gitee.com/cuiocean/ZY-Player-Resources/raw/main/Sites/Sites.json'
|
||||
this.setting.sitesDataURL = 'https://raw.iqiq.io/Hunlongyu/ZY-Player-Resources/main/Sites/20220713.json'
|
||||
},
|
||||
configSitesDataURL () {
|
||||
if (!this.setting.sitesDataURL) this.resetDefaultSitesDataURL()
|
||||
@@ -598,7 +595,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getSites()
|
||||
// this.getSites()
|
||||
this.getSetting()
|
||||
this.getShortcut()
|
||||
this.checkUpdate()
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
import { mapMutations } from 'vuex'
|
||||
import { history, star, sites, setting } from '../lib/dexie'
|
||||
import zy from '../lib/site/tools'
|
||||
import { remote } from 'electron'
|
||||
const remote = require('@electron/remote')
|
||||
import fs from 'fs'
|
||||
import Sortable from 'sortablejs'
|
||||
import Waterfall from 'vue-waterfall-plugin'
|
||||
@@ -324,7 +324,7 @@ export default {
|
||||
switch (this.sortKeyword) {
|
||||
case '按上映年份':
|
||||
filteredData.sort(function (a, b) {
|
||||
return a.detail.year - b.detail.year
|
||||
return b.detail.year - a.detail.year
|
||||
})
|
||||
break
|
||||
case '按片名':
|
||||
|
||||
@@ -10,7 +10,7 @@ import Share from './Share'
|
||||
import History from './History'
|
||||
import EditSites from './EditSites'
|
||||
import IPTV from './IPTV'
|
||||
import Recommendation from './Recommendation'
|
||||
// import Recommendation from './Recommendation'
|
||||
export default {
|
||||
registerComponents () {
|
||||
Vue.component('Aside', Aside)
|
||||
@@ -24,6 +24,6 @@ export default {
|
||||
Vue.component('History', History)
|
||||
Vue.component('EditSites', EditSites)
|
||||
Vue.component('IPTV', IPTV)
|
||||
Vue.component('Recommendation', Recommendation)
|
||||
// Vue.component('Recommendation', Recommendation)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,11 +96,19 @@ db.version(11).stores({
|
||||
'windowPositionAndSize, pauseWhenMinimize, sitesDataURL, defaultParseURL'
|
||||
}).upgrade(trans => {
|
||||
trans.setting.toCollection().modify(setting => {
|
||||
setting.sitesDataURL = 'https://gitee.com/cuiocean/ZY-Player-Resources/raw/main/Sites/Sites.json'
|
||||
setting.sitesDataURL = 'https://raw.iqiq.io/Hunlongyu/ZY-Player-Resources/main/Sites/20220713.json'
|
||||
setting.defaultParseURL = 'https://jx.bpba.cc/?v='
|
||||
})
|
||||
})
|
||||
|
||||
db.version(12).stores({
|
||||
sites: '++id, key, name, api, download, jiexiUrl, isActive, group, reverseOrder'
|
||||
}).upgrade(trans => {
|
||||
trans.sites.toCollection().modify(site => {
|
||||
site.reverseOrder = false
|
||||
})
|
||||
})
|
||||
|
||||
db.on('populate', () => {
|
||||
db.setting.bulkAdd(iniSetting)
|
||||
db.sites.bulkAdd(sites)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"autocleanWhenIptvCheck": false,
|
||||
"autoChangeSourceWhenIptvStalling": true,
|
||||
"shortcutModified": false,
|
||||
"sitesDataURL": "https://gitee.com/cuiocean/ZY-Player-Resources/raw/main/Sites/Sites.json",
|
||||
"sitesDataURL": "https://raw.iqiq.io/Hunlongyu/ZY-Player-Resources/main/Sites/20220713.json",
|
||||
"rootClassFilter": [
|
||||
"电影",
|
||||
"电影片",
|
||||
|
||||
@@ -11,7 +11,7 @@ import SocksProxyAgent from 'socks-proxy-agent'
|
||||
// 要在设置中添加代理设置,可参考https://stackoverflow.com/questions/37393248/how-connect-to-proxy-in-electron-webview
|
||||
const http = require('http')
|
||||
const https = require('http')
|
||||
const { remote } = require('electron')
|
||||
const remote = require('@electron/remote')
|
||||
const win = remote.getCurrentWindow()
|
||||
const session = win.webContents.session
|
||||
const ElectronProxyAgent = require('electron-proxy-agent')
|
||||
@@ -563,8 +563,7 @@ const zy = {
|
||||
})
|
||||
})
|
||||
},
|
||||
getDefaultSites () {
|
||||
const url = 'https://gitee.com/cuiocean/ZY-Player-Resources/raw/main/Sites/Sites.json'
|
||||
getDefaultSites (url) {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.get(url).then(res => {
|
||||
resolve(res.data)
|
||||
|
||||
Reference in New Issue
Block a user