mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-14 07:55:27 +08:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dec62aa9c | ||
|
|
1f781ae92d | ||
|
|
4717299ae6 | ||
|
|
8d40cbd5fc | ||
|
|
4c8fa08166 | ||
|
|
ac513fbce6 | ||
|
|
9321d3a5d9 | ||
|
|
0f2776fb1c | ||
|
|
b577ce12c1 | ||
|
|
fa4c4e22fd | ||
|
|
a93d4042ba | ||
|
|
09bd9d8401 | ||
|
|
588e52c330 | ||
|
|
6c4e110bb8 | ||
|
|
54857b8501 | ||
|
|
a8a6fa2185 | ||
|
|
0e571efd6f | ||
|
|
79adbd1f81 | ||
|
|
214a267ba5 | ||
|
|
7aee9b9fbe |
35
.github/workflows/x86.yml
vendored
Normal file
35
.github/workflows/x86.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: release-build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- x86 *
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
|
||||
- run: |
|
||||
yarn
|
||||
yarn dist
|
||||
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 }}
|
||||
26
README.md
26
README.md
@@ -29,18 +29,20 @@
|
||||
3. 新增历史播放记录, 并记录播放进度
|
||||
4. 新增分享功能. 一键分享海报图片
|
||||
5. 新增精简模式. 支持修改透明度
|
||||
6. 全新布局配色
|
||||
7. 新增多语言
|
||||
8. 下载功能
|
||||
9. 更详细的视频分类
|
||||
10. 收藏夹同步更新视频追剧
|
||||
11. 后台自动更新
|
||||
6. 收藏夹同步更新视频追剧
|
||||
7. 支持演员名称搜索
|
||||
8. 更详细的视频分类
|
||||
9. 后台自动更新
|
||||
10. 全新布局配色
|
||||
11. 新增多语言
|
||||
12. 全局快捷键
|
||||
13. 支持演员名称搜索
|
||||
13. 下载功能
|
||||
14. ...
|
||||
|
||||
觉得软件不错的, 点击右上角 star 收藏关注一波呀~
|
||||
|
||||
> Tips: 资源加载不出来时, 点击列表下方链接, 浏览器打开一下网站. 原理是需要通过网站的人机检测.
|
||||
|
||||
#### 全局快捷键:
|
||||
|
||||
| 快捷键 | 说明 | 主界面 | 小窗口 |
|
||||
@@ -54,11 +56,17 @@
|
||||
|
||||
#### 下载:
|
||||
|
||||
1. [Github -- 官方下载](https://github.com/Hunlongyu/ZY-Player/releases)
|
||||
1. [Github -- 官方下载(最新版)](https://github.com/Hunlongyu/ZY-Player/releases)
|
||||
|
||||
2. [蓝奏云 -- 快速下载](https://www.lanzous.com/b04s6a3re) 密码:95px
|
||||
2. [蓝奏云 -- 快速下载(老版本)](https://www.lanzous.com/b04s6a3re) 密码:95px
|
||||
|
||||
3. 适用于32位操作系统的x86软件,在蓝奏云网盘里, 后缀名: ZY Player * 32位.exe
|
||||
|
||||
#### 截图:
|
||||
|
||||
0. 分享 ⇣ ↓
|
||||

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

|
||||
2. 搜索 ⇣ ↓
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "zy",
|
||||
"version": "1.0.11",
|
||||
"version": "1.0.18",
|
||||
"private": true,
|
||||
"author": {
|
||||
"name": "Hunlongyu",
|
||||
@@ -16,7 +16,8 @@
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"postuninstall": "electron-builder install-app-deps",
|
||||
"electron:generate-icons": "electron-icon-builder --input=./public/icon.png --output=build --flatten",
|
||||
"release": "vue-cli-service electron:build -p always"
|
||||
"release": "vue-cli-service electron:build -p always",
|
||||
"dist": "vue-cli-service electron:build --win --ia32"
|
||||
},
|
||||
"main": "background.js",
|
||||
"dependencies": {
|
||||
|
||||
@@ -16,7 +16,7 @@ let mini
|
||||
// Scheme must be registered before the app is ready
|
||||
protocol.registerSchemesAsPrivileged([{ scheme: 'app', privileges: { secure: true, standard: true } }])
|
||||
|
||||
function createWindow () {
|
||||
function createWindow() {
|
||||
win = new BrowserWindow({
|
||||
width: 1080,
|
||||
height: 720,
|
||||
@@ -44,7 +44,7 @@ function createWindow () {
|
||||
})
|
||||
}
|
||||
|
||||
function createMini () {
|
||||
function createMini() {
|
||||
mini = new BrowserWindow({
|
||||
width: 550,
|
||||
minWidth: 260,
|
||||
@@ -74,6 +74,10 @@ function createMini () {
|
||||
})
|
||||
}
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
app.dock.show()
|
||||
}
|
||||
|
||||
app.allowRendererProcessReuse = true
|
||||
app.commandLine.appendSwitch('disable-features', 'OutOfBlinkCors')
|
||||
if (process.platform === 'Linux') {
|
||||
@@ -81,9 +85,7 @@ if (process.platform === 'Linux') {
|
||||
}
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
app.quit()
|
||||
})
|
||||
|
||||
app.on('activate', () => {
|
||||
|
||||
@@ -299,7 +299,7 @@ export default {
|
||||
top: 50px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: calc(100 - 50px);
|
||||
height: calc(100% - 50px);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</div>
|
||||
<div class="tFooter">
|
||||
<span class="tFooter-span">今日更新: {{ tb.update }} 条</span>
|
||||
<span class="tFooter-span btn" @click="goWebsite">前往该资源网</span>
|
||||
<span class="tFooter-span btn" @click="goWebsite">加载不出来,点这里</span>
|
||||
<el-pagination small :page-size="tb.size" :total="tb.total" :current-page="tb.page" @current-change="tbPageChange" layout="total, prev, pager, next, jumper"></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -125,8 +125,8 @@ export default {
|
||||
id: 'xg',
|
||||
lang: 'zh-cn',
|
||||
url: '',
|
||||
width: 900,
|
||||
height: 500,
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
autoplay: false,
|
||||
videoInit: true,
|
||||
screenShot: true,
|
||||
@@ -201,39 +201,49 @@ export default {
|
||||
methods: {
|
||||
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE']),
|
||||
getUrls () {
|
||||
this.name = ''
|
||||
this.mask = true
|
||||
if (this.timer !== null) {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
}
|
||||
|
||||
if (this.xg) {
|
||||
this.xg.pause()
|
||||
}
|
||||
this.changeVideo()
|
||||
tools.detail_get(this.video.site, this.video.detail).then(res => {
|
||||
this.name = this.video.name
|
||||
this.right.listData = res.m3u8_urls
|
||||
if (res.m3u8_urls.length > 1) {
|
||||
const m3 = res.m3u8_urls
|
||||
const arr = []
|
||||
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
|
||||
if (this.xg.hasStart) {
|
||||
this.xg.pause()
|
||||
}
|
||||
const currentTime = this.video.currentTime
|
||||
if (currentTime !== '') {
|
||||
}
|
||||
|
||||
const index = this.video.index
|
||||
let time = 0
|
||||
|
||||
history.find({ detail: this.video.detail }).then(item => {
|
||||
if (item) {
|
||||
if (item.index === index) {
|
||||
time = item.currentTime
|
||||
}
|
||||
}
|
||||
this.playVideo(index, time)
|
||||
})
|
||||
},
|
||||
playVideo (index, time) {
|
||||
tools.detail_get(this.video.site, this.video.detail).then(res => {
|
||||
this.name = res.name
|
||||
this.right.listData = res.m3u8_urls
|
||||
|
||||
const m = res.m3u8_urls
|
||||
const arr = []
|
||||
for (const i of m) {
|
||||
arr.push(i.split('$')[1])
|
||||
}
|
||||
this.length = arr.length
|
||||
this.xg.src = arr[index]
|
||||
this.showNext = this.length > 1
|
||||
|
||||
if (time !== 0) {
|
||||
this.xg.play()
|
||||
this.xg.once('playing', () => {
|
||||
this.xg.currentTime = currentTime
|
||||
this.xg.currentTime = time
|
||||
})
|
||||
} else {
|
||||
this.xg.play()
|
||||
@@ -254,7 +264,6 @@ export default {
|
||||
changeVideo () {
|
||||
this.checkStar()
|
||||
this.checkTop()
|
||||
this.name = ''
|
||||
},
|
||||
checkStar () {
|
||||
video.find({ detail: this.video.detail }).then(res => {
|
||||
@@ -273,6 +282,7 @@ export default {
|
||||
},
|
||||
onPlayVideo () {
|
||||
this.more = true
|
||||
this.changeVideo()
|
||||
const h = { ...this.video }
|
||||
history.find({ detail: h.detail }).then(res => {
|
||||
if (res) {
|
||||
@@ -296,6 +306,14 @@ export default {
|
||||
history.update(res.id, h)
|
||||
}
|
||||
})
|
||||
video.find({ detail: d }).then(res => {
|
||||
if (res) {
|
||||
const h = { ...this.video }
|
||||
delete h.id
|
||||
delete h.currentTime
|
||||
video.update(res.id, h)
|
||||
}
|
||||
})
|
||||
}, 10000)
|
||||
},
|
||||
closeEvent () {
|
||||
@@ -303,21 +321,17 @@ export default {
|
||||
this.right.type = ''
|
||||
},
|
||||
nextEvent () {
|
||||
const v = { ...this.video }
|
||||
const i = v.index + 1
|
||||
if (i < this.right.listData.length) {
|
||||
this.video.currentTime = 0
|
||||
if (this.video.index < this.right.listData.length - 1) {
|
||||
this.video.index++
|
||||
this.video.currentTime = 0
|
||||
} else {
|
||||
this.$m.warning(this.$t('last_video'))
|
||||
}
|
||||
},
|
||||
prevEvent () {
|
||||
const v = { ...this.video }
|
||||
const i = v.index - 1
|
||||
if (i > 0) {
|
||||
this.video.currentTime = 0
|
||||
if (this.video.index > 0) {
|
||||
this.video.index--
|
||||
this.video.currentTime = 0
|
||||
} else {
|
||||
this.$m.warning(this.$t('first_video'))
|
||||
}
|
||||
@@ -395,10 +409,16 @@ export default {
|
||||
})
|
||||
},
|
||||
listItemEvent (n) {
|
||||
this.video.currentTime = 0
|
||||
this.video.index = n
|
||||
this.right.show = false
|
||||
this.right.type = ''
|
||||
history.find({ detail: this.video.detail }).then(item => {
|
||||
if (item) {
|
||||
item.currentTime = 0
|
||||
item.index = n
|
||||
history.update(item.id, item)
|
||||
}
|
||||
this.video.index = n
|
||||
this.right.show = false
|
||||
this.right.type = ''
|
||||
})
|
||||
},
|
||||
historyItemEvent (e) {
|
||||
this.video = e
|
||||
@@ -481,8 +501,9 @@ export default {
|
||||
align-items: center;
|
||||
}
|
||||
.xgBox{
|
||||
width: 900px;
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
flex: 1;
|
||||
}
|
||||
.more{
|
||||
width: 100%;
|
||||
|
||||
@@ -32,7 +32,7 @@ export default {
|
||||
name: '',
|
||||
png: ''
|
||||
},
|
||||
value: 'https://www.baidu.com',
|
||||
value: '',
|
||||
loading: true
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,32 +1,44 @@
|
||||
import setting from '../dexie/setting'
|
||||
|
||||
const os = require('os')
|
||||
const macadress = require('macaddress')
|
||||
const macaddress = require('macaddress')
|
||||
const AV = require('leancloud-storage')
|
||||
|
||||
setting.find().then(res => {
|
||||
const cloud = res.cloud
|
||||
if (!cloud) {
|
||||
macadress.one((err, mac) => {
|
||||
if (err) {
|
||||
return false
|
||||
}
|
||||
const system = os.hostname() + ' ' + os.type() + ' ' + os.arch()
|
||||
AV.init({
|
||||
appId: 'X6TRIcMjgOG7EJ0t1l5r9In1-gzGzoHsz',
|
||||
appKey: 'JmkGF9UqkWGQNYDcJ2g1QV1b',
|
||||
serverURL: 'https://x6tricmj.lc-cn-n1-shared.com'
|
||||
})
|
||||
macaddress.one((err, mac) => {
|
||||
if (err) {
|
||||
return false
|
||||
}
|
||||
AV.init({
|
||||
appId: 'X6TRIcMjgOG7EJ0t1l5r9In1-gzGzoHsz',
|
||||
appKey: 'JmkGF9UqkWGQNYDcJ2g1QV1b',
|
||||
serverURL: 'https://x6tricmj.lc-cn-n1-shared.com'
|
||||
})
|
||||
const system = os.hostname() + ' ' + os.type() + ' ' + os.arch()
|
||||
const query = new AV.Query('ZYPlayer')
|
||||
query.equalTo('os', system)
|
||||
query.equalTo('mac', mac)
|
||||
query.find().then(res => {
|
||||
// 存储新用户数据
|
||||
if (res.length === 0) {
|
||||
const ZYPlayer = AV.Object.extend('ZYPlayer')
|
||||
const zyPlayer = new ZYPlayer()
|
||||
zyPlayer.set('os', system)
|
||||
zyPlayer.set('mac', mac)
|
||||
zyPlayer.save().then(e => {
|
||||
const id = e.id
|
||||
res.cloud = true
|
||||
res.cloudKey = id
|
||||
setting.update(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
zyPlayer.set('times', 1)
|
||||
zyPlayer.save()
|
||||
return false
|
||||
}
|
||||
// 统计启动次数
|
||||
if (res.length === 1) {
|
||||
const id = res[0].id
|
||||
const times = AV.Object.createWithoutData('ZYPlayer', id)
|
||||
times.increment('times', 1)
|
||||
times.save()
|
||||
return false
|
||||
}
|
||||
// 清除冗余数据
|
||||
if (res.length > 1) {
|
||||
const arr = res
|
||||
arr.shift()
|
||||
AV.Object.destroyAll(arr)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user