mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-14 07:55:27 +08:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbcffd7587 | ||
|
|
fc26c04666 | ||
|
|
e2cda9a100 | ||
|
|
ffe432d19e | ||
|
|
ae31e9ba74 | ||
|
|
24f78563b6 | ||
|
|
8c0e35e766 | ||
|
|
f94d00e36c | ||
|
|
c0c4d9ad88 | ||
|
|
3afa38beb7 | ||
|
|
68fe961791 | ||
|
|
3d7a686ca7 | ||
|
|
57e6ea50ad |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -24,4 +24,4 @@ jobs:
|
||||
yarn release
|
||||
shell: pwsh
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
56
README.md
56
README.md
@@ -1,5 +1,9 @@
|
||||
<p align="center">
|
||||
<img src="https://i.loli.net/2020/05/07/9kLvPnWVCp7538c.png" >
|
||||
<img width="128" src="https://i.loli.net/2020/05/07/9kLvPnWVCp7538c.png" >
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="http://zyplayer.fun/" target="_blank">官网</a>
|
||||
<a href="https://github.com/Hunlongyu/ZY-Player/issues" target="_blank">反馈</a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<img src="https://forthebadge.com/images/badges/built-with-love.svg">
|
||||
@@ -18,19 +22,34 @@
|
||||
<p>
|
||||
|
||||
|
||||
## ZY Player
|
||||
## ZY Player 资源播放器
|
||||
|
||||
1. 全平台支持. windows, mac, linux.
|
||||
2. 12个视频源. 未来更新更多的视频源.
|
||||
3. 新增历史播放记录, 并记录播放进度.
|
||||
4. 新增分享功能. 一键分享海报图片.
|
||||
5. 新增精简模式. 支持修改透明度.
|
||||
6. 全新布局配色.
|
||||
7. 新增多语言.
|
||||
8. 下载功能 (最大资源网和OK资源网支持下载.)
|
||||
9. 更详细的视频分类
|
||||
10. 收藏夹同步更新视频追剧.(手动更新)
|
||||
11. 后台自动更新
|
||||
12. 全局快捷键
|
||||
13. 支持演员名称搜索
|
||||
14. ...
|
||||
|
||||
### 新版内测
|
||||
觉得软件不错的, 点击右上角 star 收藏关注一波呀~
|
||||
|
||||
新版本: v0.9.x 已开发完, 现进行内测, [点击查看内测公告](https://github.com/Hunlongyu/ZY-Player/issues/24)
|
||||
#### 全局快捷键:
|
||||
|
||||
[点击这里可以查看开发计划](https://github.com/Hunlongyu/ZY-Player/projects/3).
|
||||
| 快捷键 | 说明 | 主界面 | 小窗口 |
|
||||
| :----------------------: | ---------- | :----: | :----: |
|
||||
| `⌘ + ➡` 或 `Ctrl + ➡` | 下一集 | √ | √ |
|
||||
| `⌘ + ⬅` 或 `Ctrl + ⬅` | 上一集 | √ | √ |
|
||||
| `⌘ + ⬆` 或 `Ctrl + ⬆` | 减少透明度 | | √ |
|
||||
| `⌘ + ⬇` 或 `Ctrl + ⬇` | 增加透明度 | | √ |
|
||||
|
||||
大家有什么新的需求建议欢迎踊跃提出[点击这里提意见](https://github.com/Hunlongyu/ZY-Player/issues/14)
|
||||
|
||||
觉得软件不错的, 请点击 star 收藏一波呀~
|
||||
<img height="30" src="https://i.loli.net/2020/05/09/cNnvGobekWEqfjZ.jpg">
|
||||
|
||||
#### 下载:
|
||||
|
||||
@@ -39,9 +58,22 @@
|
||||
2. [蓝奏云 -- 快速下载](https://www.lanzous.com/b04s6a3re) 密码:95px
|
||||
|
||||
#### 截图:
|
||||

|
||||

|
||||

|
||||
1. 浏览 ⇣ ↓
|
||||

|
||||
2. 搜索 ⇣ ↓
|
||||

|
||||
3. 详情 ⇣ ↓
|
||||

|
||||
4. 播放 ⇣ ↓
|
||||

|
||||
5. 收藏 ⇣ ↓
|
||||

|
||||
6. 白色主题皮肤 ⇣ ↓
|
||||

|
||||
7. 绿色主题皮肤 ⇣ ↓
|
||||

|
||||
8. 粉色色主题皮肤 ⇣ ↓
|
||||

|
||||
|
||||
### 重要:
|
||||
所有资源来自网上, 该软件不参与任何制作, 上传, 储存, 下载等内容. 该软件仅供学习参考, 请于安装后24小时内删除.
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
<h4>友情链接</h4>
|
||||
<ul>
|
||||
<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://github.com/Hunlongyu/ZY-Player">Github</a></li>
|
||||
<li><i class="bx bx-chevron-right"></i> <a target="_blank" href="https://www.ghpym.com/zyplayer.html">果核剥壳</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "zy",
|
||||
"version": "0.9.33",
|
||||
"version": "1.0.7",
|
||||
"private": true,
|
||||
"author": {
|
||||
"name": "Hunlongyu",
|
||||
@@ -33,8 +33,8 @@
|
||||
"vue": "^2.6.11",
|
||||
"vue-i18n": "^8.17.0",
|
||||
"vuex": "^3.1.3",
|
||||
"xgplayer": "^2.6.20",
|
||||
"xgplayer-hls.js": "^2.2.0"
|
||||
"xgplayer": "^2.6.24",
|
||||
"xgplayer-hls.js": "^2.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.3.0",
|
||||
@@ -44,7 +44,7 @@
|
||||
"@vue/eslint-config-standard": "^5.1.2",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"electron": "^8.2.5",
|
||||
"electron": "^8.3.0",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
width: 120px;
|
||||
}
|
||||
&.operate{
|
||||
width: 120px;
|
||||
width: 170px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,7 +133,7 @@
|
||||
width: 120px;
|
||||
}
|
||||
&.operate{
|
||||
width: 120px;
|
||||
width: 170px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,8 @@ import {
|
||||
import path from 'path'
|
||||
import { autoUpdater } from 'electron-updater'
|
||||
const isDevelopment = process.env.NODE_ENV !== 'production'
|
||||
const globalShortcut = require('electron').globalShortcut
|
||||
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
// be closed automatically when the JavaScript object is garbage collected.
|
||||
let win
|
||||
let mini
|
||||
|
||||
@@ -22,7 +21,7 @@ function createWindow () {
|
||||
width: 1080,
|
||||
height: 720,
|
||||
frame: false,
|
||||
resizable: false,
|
||||
resizable: true,
|
||||
transparent: true,
|
||||
webPreferences: {
|
||||
webSecurity: false,
|
||||
@@ -76,6 +75,7 @@ function createMini () {
|
||||
}
|
||||
|
||||
app.allowRendererProcessReuse = true
|
||||
app.commandLine.appendSwitch('--no-sandbox')
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
@@ -128,6 +128,32 @@ if (!gotTheLock) {
|
||||
|
||||
// 创建 win, 加载应用的其余部分, etc...
|
||||
app.on('ready', () => {
|
||||
globalShortcut.register('CommandOrControl+right', function () {
|
||||
if (win) {
|
||||
win.webContents.send('next', 0)
|
||||
}
|
||||
if (mini) {
|
||||
mini.webContents.send('next', 0)
|
||||
}
|
||||
})
|
||||
globalShortcut.register('CommandOrControl+left', function () {
|
||||
if (win) {
|
||||
win.webContents.send('prev', 0)
|
||||
}
|
||||
if (mini) {
|
||||
mini.webContents.send('prev', 0)
|
||||
}
|
||||
})
|
||||
globalShortcut.register('CommandOrControl+up', function () {
|
||||
if (mini) {
|
||||
mini.webContents.send('up', 0)
|
||||
}
|
||||
})
|
||||
globalShortcut.register('CommandOrControl+down', function () {
|
||||
if (mini) {
|
||||
mini.webContents.send('down', 0)
|
||||
}
|
||||
})
|
||||
if (!process.env.WEBPACK_DEV_SERVER_URL) {
|
||||
createProtocol('app')
|
||||
}
|
||||
|
||||
@@ -136,10 +136,10 @@ export default {
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 680px;
|
||||
height: calc(100% - 40px);
|
||||
z-index: 999;
|
||||
.detail-content{
|
||||
height: 680px;
|
||||
height: calc(100% - 10px);
|
||||
padding: 0 60px;
|
||||
position: relative;
|
||||
.detail-header{
|
||||
@@ -157,14 +157,14 @@ export default {
|
||||
}
|
||||
}
|
||||
.detail-body{
|
||||
height: 630px;
|
||||
height: calc(100% - 50px);
|
||||
overflow-y: auto;
|
||||
.info{
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
width: 955px;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border: 1px solid;
|
||||
border-radius: 2px;
|
||||
@@ -256,7 +256,7 @@ export default {
|
||||
.desc{
|
||||
border: 1px solid;
|
||||
padding: 10px;
|
||||
width: 955px;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 2px;
|
||||
font-size: 14px;
|
||||
@@ -265,7 +265,7 @@ export default {
|
||||
.m3u8_urls, .mp4_urls{
|
||||
border: 1px solid;
|
||||
padding: 10px;
|
||||
width: 955px;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 2px;
|
||||
.title{
|
||||
@@ -295,10 +295,11 @@ export default {
|
||||
}
|
||||
}
|
||||
.detail-mask{
|
||||
width: 980px;
|
||||
height: 600px;
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: calc(100 - 50px);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
<span class="btn" @click.stop="playEvent(i)">{{$t('play')}}</span>
|
||||
<span class="btn" @click.stop="starEvent(i)">{{$t('star')}}</span>
|
||||
<span class="btn" @click.stop="shareEvent(i)">{{$t('share')}}</span>
|
||||
<span class="btn" @click.stop="downloadEvent(i)">{{$t('download')}}</span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -80,6 +81,7 @@ import { sites, getSite } from '../lib/site/sites'
|
||||
import tools from '../lib/site/tools'
|
||||
import video from '../lib/dexie/video'
|
||||
import setting from '../lib/dexie/setting'
|
||||
const { clipboard } = require('electron')
|
||||
export default {
|
||||
name: 'film',
|
||||
data () {
|
||||
@@ -261,6 +263,33 @@ export default {
|
||||
v: e
|
||||
}
|
||||
},
|
||||
downloadEvent (e) {
|
||||
tools.detail_get(e.site, e.detail).then(res => {
|
||||
if (res.mp4_urls.length > 0) {
|
||||
const urls = [...res.mp4_urls]
|
||||
let txt = `${e.name}\n`
|
||||
for (const i of urls) {
|
||||
const name = i.split('$')[0]
|
||||
const url = encodeURI(i.split('$')[1])
|
||||
txt += (name + ': ' + url + '\n')
|
||||
}
|
||||
clipboard.writeText(txt)
|
||||
this.$m.success('〖MP4〗: ' + this.$t('copy_success'))
|
||||
return false
|
||||
}
|
||||
if (res.m3u8_urls.length > 0) {
|
||||
const urls = [...res.m3u8_urls]
|
||||
let txt = `${e.name}\n`
|
||||
for (const i of urls) {
|
||||
const name = i.split('$')[0]
|
||||
const url = encodeURI(i.split('$')[1])
|
||||
txt += (name + ': ' + url + '\n')
|
||||
}
|
||||
clipboard.writeText(txt)
|
||||
this.$m.success('〖M3U8〗: ' + this.$t('copy_success'))
|
||||
}
|
||||
})
|
||||
},
|
||||
tbPageChange (e) {
|
||||
this.tb.loading = true
|
||||
this.tb.page = e
|
||||
@@ -277,7 +306,7 @@ export default {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.film{
|
||||
height: 670px;
|
||||
height: calc(100% - 40px);
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -323,7 +352,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.middle{
|
||||
height: 620px;
|
||||
height: calc(100% - 40px);
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
padding-bottom: 0px;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<div class="play">
|
||||
<div class="box">
|
||||
<div class="title">{{name}}</div>
|
||||
<div class="title" v-if="length === 1">{{name}}</div>
|
||||
<div class="title" v-if="length > 1">『第 {{(video.index + 1)}} 集』 {{name}}</div>
|
||||
<div class="xgBox">
|
||||
<div id="xg"></div>
|
||||
</div>
|
||||
@@ -136,6 +137,7 @@ export default {
|
||||
playbackRate: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 3, 4, 5]
|
||||
},
|
||||
name: '',
|
||||
length: 0,
|
||||
timer: null,
|
||||
scroll: false,
|
||||
more: true,
|
||||
@@ -217,11 +219,13 @@ export default {
|
||||
for (const i of m3) {
|
||||
arr.push(i.split('$')[1])
|
||||
}
|
||||
this.length = arr.length
|
||||
this.xg.src = arr[this.video.index]
|
||||
this.showNext = true
|
||||
} else {
|
||||
const link = res.m3u8_urls[this.video.index]
|
||||
const src = link.split('$')[1]
|
||||
this.length = 1
|
||||
this.xg.src = src
|
||||
this.showNext = false
|
||||
}
|
||||
@@ -308,6 +312,16 @@ export default {
|
||||
this.$m.warning(this.$t('last_video'))
|
||||
}
|
||||
},
|
||||
prevEvent () {
|
||||
const v = { ...this.video }
|
||||
const i = v.index - 1
|
||||
if (i > 0) {
|
||||
this.video.currentTime = 0
|
||||
this.video.index--
|
||||
} else {
|
||||
this.$m.warning(this.$t('first_video'))
|
||||
}
|
||||
},
|
||||
listEvent () {
|
||||
if (this.right.type === 'list') {
|
||||
this.right.show = false
|
||||
@@ -404,13 +418,27 @@ export default {
|
||||
history.all().then(res => {
|
||||
this.right.historyData = res
|
||||
})
|
||||
ipc.on('next', () => {
|
||||
if (this.xg) {
|
||||
if (this.xg.hasStart) {
|
||||
this.nextEvent()
|
||||
}
|
||||
}
|
||||
})
|
||||
ipc.on('prev', () => {
|
||||
if (this.xg) {
|
||||
if (this.xg.hasStart) {
|
||||
this.prevEvent()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.play{
|
||||
position: relative;
|
||||
height: 660px;
|
||||
height: calc(100% - 40px);
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
@@ -60,6 +60,10 @@
|
||||
<img class="qrcode-item" src="../assets/image/wepay.jpg">
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearDB">
|
||||
<span @click="clearDBEvent" class="clearBtn">{{$t('clearDB')}}</span>
|
||||
<span class="clearTips">{{$t('clearTips')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -67,9 +71,11 @@
|
||||
import { mapMutations } from 'vuex'
|
||||
import setting from '../lib/dexie/setting'
|
||||
import { sites } from '../lib/site/sites'
|
||||
import db from '../lib/dexie/index'
|
||||
import '../lib/cloud/index.js'
|
||||
import { shell } from 'electron'
|
||||
import pkg from '../../package.json'
|
||||
const ipc = require('electron').ipcRenderer
|
||||
export default {
|
||||
name: 'setting',
|
||||
data () {
|
||||
@@ -148,6 +154,12 @@ export default {
|
||||
setting.update(this.s).then(res => {
|
||||
this.$m.success(this.$t('set_success'))
|
||||
})
|
||||
},
|
||||
clearDBEvent () {
|
||||
db.delete().then(res => {
|
||||
this.$m.success(this.$t('set_success'))
|
||||
ipc.send('close')
|
||||
})
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -162,7 +174,7 @@ export default {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.setting{
|
||||
height: 660px;
|
||||
height: calc(100% - 40px);
|
||||
width: 100%;
|
||||
padding: 20px 0;
|
||||
.setting-box{
|
||||
@@ -248,5 +260,26 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.clearDB{
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
.clearBtn{
|
||||
margin-left: 20px;
|
||||
color: red;
|
||||
cursor: pointer;
|
||||
border: 1px solid #ff000088;
|
||||
display: inline-block;
|
||||
width: 160px;
|
||||
height: 32px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
line-height: 32px;
|
||||
}
|
||||
.clearTips{
|
||||
font-size: 12px;
|
||||
color: #ff000088;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<span class="type">{{$t('type')}}</span>
|
||||
<span class="time">{{$t('time')}}</span>
|
||||
<span class="from">{{$t('from')}}</span>
|
||||
<span class="operate" style="width: 170px">{{$t('operate')}}</span>
|
||||
<span class="operate" style="width: 220px">{{$t('operate')}}</span>
|
||||
</div>
|
||||
<div class="tBody zy-scroll">
|
||||
<ul v-show="!loading">
|
||||
@@ -15,11 +15,12 @@
|
||||
<span class="type">{{i.type}}</span>
|
||||
<span class="time">{{i.time}}</span>
|
||||
<span class="from">{{i.site | ftSite}}</span>
|
||||
<span class="operate" style="width: 170px">
|
||||
<span class="operate" style="width: 220px">
|
||||
<span class="btn" @click.stop="playEvent(i)">{{$t('play')}}</span>
|
||||
<span class="btn" @click.stop="deleteEvent(i)">{{$t('delete')}}</span>
|
||||
<span class="btn" @click.stop="shareEvent(i)">{{$t('share')}}</span>
|
||||
<span class="btn" @click.stop="updateEvent(i)">{{$t('sync')}}</span>
|
||||
<span class="btn" @click.stop="downloadEvent(i)">{{$t('download')}}</span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -38,6 +39,7 @@ import { mapMutations } from 'vuex'
|
||||
import tools from '../lib/site/tools'
|
||||
import video from '../lib/dexie/video'
|
||||
import { sites, getSite } from '../lib/site/sites'
|
||||
const { clipboard } = require('electron')
|
||||
export default {
|
||||
name: 'star',
|
||||
data () {
|
||||
@@ -136,6 +138,33 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
downloadEvent (e) {
|
||||
tools.detail_get(e.site, e.detail).then(res => {
|
||||
if (res.mp4_urls.length > 0) {
|
||||
const urls = [...res.mp4_urls]
|
||||
let txt = `${e.name}\n`
|
||||
for (const i of urls) {
|
||||
const name = i.split('$')[0]
|
||||
const url = encodeURI(i.split('$')[1])
|
||||
txt += (name + ': ' + url + '\n')
|
||||
}
|
||||
clipboard.writeText(txt)
|
||||
this.$m.success('〖MP4〗: ' + this.$t('copy_success'))
|
||||
return false
|
||||
}
|
||||
if (res.m3u8_urls.length > 0) {
|
||||
const urls = [...res.m3u8_urls]
|
||||
let txt = `${e.name}\n`
|
||||
for (const i of urls) {
|
||||
const name = i.split('$')[0]
|
||||
const url = encodeURI(i.split('$')[1])
|
||||
txt += (name + ': ' + url + '\n')
|
||||
}
|
||||
clipboard.writeText(txt)
|
||||
this.$m.success('〖M3U8〗: ' + this.$t('copy_success'))
|
||||
}
|
||||
})
|
||||
},
|
||||
getAllStar () {
|
||||
video.all().then(res => {
|
||||
this.data = res.reverse()
|
||||
@@ -150,7 +179,7 @@ export default {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.star{
|
||||
height: 660px;
|
||||
height: calc(100% - 40px);
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"delete_success": "Delete successful.",
|
||||
"delete_failed": "Delete failed.",
|
||||
"star_success": "Collection success.",
|
||||
"first_video": "This is the first episode.",
|
||||
"last_video": "This is the last episode.",
|
||||
"qr_tips": "Long click recognition.",
|
||||
"zy_tips": "Prohibit the dissemination of illegal resources.",
|
||||
@@ -44,5 +45,7 @@
|
||||
"copy_success": "has been copied, Download it now",
|
||||
"async_failed": "Synchronization successful, no updates found.",
|
||||
"async_success": "Synchronization succeeded, update found.",
|
||||
"no_history": "No history data."
|
||||
"no_history": "No history data.",
|
||||
"clearDB": "Reset software",
|
||||
"clearTips": "Click to clear the database and close the software"
|
||||
}
|
||||
|
||||
@@ -29,13 +29,14 @@
|
||||
"sync": "同步",
|
||||
"total": "条数据",
|
||||
"website": "官网",
|
||||
"issues": "内测反馈",
|
||||
"issues": "反馈",
|
||||
"theme": "主题",
|
||||
"donate": "捐赠",
|
||||
"set_success": "设置成功。",
|
||||
"delete_success": "删除成功。",
|
||||
"delete_failed": "删除失败。",
|
||||
"star_success": "收藏成功。",
|
||||
"first_video": "这已经是第一集了。",
|
||||
"last_video": "这已经是最后一集了。",
|
||||
"qr_tips": "长按二维码,识别播放。",
|
||||
"zy_tips": "『ZY Player』技术支持,严禁传播违法资源。",
|
||||
@@ -44,5 +45,7 @@
|
||||
"copy_success": "已复制,快去下载吧。",
|
||||
"async_failed": "同步成功, 未查询到更新。",
|
||||
"async_success": "同步成功, 查询到更新。",
|
||||
"no_history": "无历史记录"
|
||||
"no_history": "无历史记录",
|
||||
"clearDB": "重置软件",
|
||||
"clearTips": "软件没有问题,请勿重置软件,否则数据丢失概不负责.点击即清空数据库,并关闭软件."
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<div class="mini">
|
||||
<div class="top">
|
||||
<div class="left">
|
||||
<span class="number" v-show="show.number">{{index + 1}} / {{length}}</span>
|
||||
<span class="zy-svg" @click="prevEvent" v-show="show.prev">
|
||||
<span class="number" v-show="length > 0">{{index + 1}} / {{length}}</span>
|
||||
<span class="zy-svg" @click="prevEvent" v-show="index > 0">
|
||||
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="backIconTitle">
|
||||
<title id="backIconTitle">上一集</title>
|
||||
<path d="M14 14.74L21 19V5l-7 4.26V5L2 12l12 7v-4.26z"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="zy-svg" @click="nextEvent" v-show="show.next">
|
||||
<span class="zy-svg" @click="nextEvent" v-show="index < (length - 1)">
|
||||
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-labelledby="forwardIconTitle">
|
||||
<title id="forwardIconTitle">下一集</title>
|
||||
<path d="M10 14.74L3 19V5l7 4.26V5l12 7-12 7v-4.26z"></path>
|
||||
@@ -57,11 +57,6 @@ export default {
|
||||
opacity: 100,
|
||||
video: {},
|
||||
d: {},
|
||||
show: {
|
||||
prev: false,
|
||||
next: false,
|
||||
number: false
|
||||
},
|
||||
index: 0,
|
||||
length: 0
|
||||
}
|
||||
@@ -76,16 +71,9 @@ export default {
|
||||
getUrls () {
|
||||
mini.find().then(res => {
|
||||
const v = res
|
||||
if (v.index > 0) {
|
||||
this.show.next = true
|
||||
this.show.number = true
|
||||
}
|
||||
this.video = res
|
||||
tools.detail_get(v.site, v.detail).then(res => {
|
||||
this.d = res
|
||||
if (v.index >= this.d.m3u8_urls.length) {
|
||||
this.show.next = false
|
||||
}
|
||||
this.index = v.index
|
||||
this.length = this.d.m3u8_urls.length
|
||||
const link = res.m3u8_urls[v.index]
|
||||
@@ -101,6 +89,16 @@ export default {
|
||||
this.xg.play()
|
||||
}
|
||||
this.onPlayVideo()
|
||||
this.xg.on('ended', () => {
|
||||
if (this.d.m3u8_urls.length > 1 && (this.d.m3u8_urls.length - 1 > this.index)) {
|
||||
this.video.currentTime = 0
|
||||
this.index++
|
||||
let src = this.d.m3u8_urls[this.index]
|
||||
src = src.split('$')[1]
|
||||
this.xg.src = src
|
||||
this.xg.play()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -122,37 +120,48 @@ export default {
|
||||
this.timer = setInterval(() => {
|
||||
history.find({ detail: d }).then(res => {
|
||||
if (res) {
|
||||
const h = { ...this.video }
|
||||
h.currentTime = this.xg.currentTime
|
||||
h.id = res.id
|
||||
history.update(res.id, h)
|
||||
const v = res
|
||||
v.currentTime = this.xg.currentTime
|
||||
const id = v.id
|
||||
delete v.id
|
||||
history.update(id, v)
|
||||
}
|
||||
})
|
||||
}, 10000)
|
||||
},
|
||||
prevEvent () {
|
||||
if (this.index > 0) {
|
||||
this.index--
|
||||
let src = this.d.m3u8_urls[this.index]
|
||||
src = src.split('$')[1]
|
||||
this.xg.src = src
|
||||
this.show.next = true
|
||||
}
|
||||
if (this.index === 0) {
|
||||
this.show.prev = false
|
||||
return false
|
||||
}
|
||||
history.find({ detail: this.video.detail }).then(res => {
|
||||
const v = res
|
||||
v.index--
|
||||
const id = v.id
|
||||
delete v.id
|
||||
history.update(id, v).then(e => {
|
||||
let src = this.d.m3u8_urls[v.index]
|
||||
src = src.split('$')[1]
|
||||
this.xg.src = src
|
||||
this.index--
|
||||
})
|
||||
})
|
||||
},
|
||||
nextEvent () {
|
||||
if (this.index < this.d.m3u8_urls.length - 1) {
|
||||
this.index++
|
||||
let src = this.d.m3u8_urls[this.index]
|
||||
src = src.split('$')[1]
|
||||
this.xg.src = src
|
||||
this.show.prev = true
|
||||
}
|
||||
if (this.index === this.d.m3u8_urls.length - 1) {
|
||||
this.show.next = false
|
||||
if (this.index >= this.d.m3u8_urls.length - 1) {
|
||||
return false
|
||||
}
|
||||
history.find({ detail: this.video.detail }).then(res => {
|
||||
const v = res
|
||||
v.index++
|
||||
const id = v.id
|
||||
delete v.id
|
||||
history.update(id, v).then(e => {
|
||||
let src = this.d.m3u8_urls[v.index]
|
||||
src = src.split('$')[1]
|
||||
this.xg.src = src
|
||||
this.index++
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -160,6 +169,32 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
this.xg = new Hls(this.config)
|
||||
ipc.on('next', () => {
|
||||
if (this.xg) {
|
||||
if (this.xg.hasStart) {
|
||||
this.nextEvent()
|
||||
}
|
||||
}
|
||||
})
|
||||
ipc.on('prev', () => {
|
||||
if (this.xg) {
|
||||
if (this.xg.hasStart) {
|
||||
this.prevEvent()
|
||||
}
|
||||
}
|
||||
})
|
||||
ipc.on('up', () => {
|
||||
if (this.opacity <= 95) {
|
||||
this.opacity = this.opacity + 5
|
||||
this.opacityChange(this.opacity)
|
||||
}
|
||||
})
|
||||
ipc.on('down', () => {
|
||||
if (this.opacity >= 10) {
|
||||
this.opacity = this.opacity - 5
|
||||
this.opacityChange(this.opacity)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -13,7 +13,7 @@ module.exports = {
|
||||
},
|
||||
appId: 'com.hunlongyu.zy',
|
||||
copyright: 'Copyright @ 2020 Hunlongyu',
|
||||
productName: 'ZY Player 内测版',
|
||||
productName: 'ZY Player',
|
||||
publish: [
|
||||
{
|
||||
provider: 'github',
|
||||
|
||||
Reference in New Issue
Block a user