Skip to content

Commit

Permalink
Merge pull request #120 from Sherlockouo/dev
Browse files Browse the repository at this point in the history
V2.7.5
  • Loading branch information
Sherlockouo authored Feb 18, 2024
2 parents e911044 + 52ff0b0 commit 0b40e81
Show file tree
Hide file tree
Showing 36 changed files with 710 additions and 715 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
- name: Install Node.js 18
uses: actions/setup-node@v2
with:
node-version: 18.12.1
node-version: 18.18.2
cache: 'pnpm'

- name: Install global dependencies
run: npm i prisma fastify-cli turbo tsx electron-builder@23.6.0 -g
run: npm i prisma fastify-cli turbo tsx electron-builder@23.6.0 node-gyp-install -g && node-gyp-install --python=python3

- name: Install dependencies
run: pnpm install
Expand Down Expand Up @@ -129,13 +129,20 @@ jobs:
path: ./packages/desktop/release/latest.yml
if-no-files-found: ignore

- name: Upload Artifact (Linux)
- name: Upload Artifact (Linux Appimage)
uses: actions/upload-artifact@v3
with:
name: R3PLAYX-linux
path: ./packages/desktop/release/*.AppImage
if-no-files-found: ignore

- name: Upload Artifact (Linux deb)
uses: actions/upload-artifact@v3
with:
name: R3PLAYX-linux-deb
path: ./packages/desktop/release/*.deb
if-no-files-found: ignore

- name: Upload linux latest yml
uses: actions/upload-artifact@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-unstable-dev.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Build-Unstable-Dev-Product
name: Build-Unstable-Dev

on:
push:
branches:
- wdf_dev
- yuzh_dev

jobs:
release:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,20 @@ jobs:
path: ./packages/desktop/release/latest.yml
if-no-files-found: ignore

- name: Upload Artifact (Linux)
- name: Upload Artifact (Linux Appimage)
uses: actions/upload-artifact@v3
with:
name: R3PLAYX-linux
path: ./packages/desktop/release/*.AppImage
if-no-files-found: ignore

- name: Upload Artifact (Linux deb)
uses: actions/upload-artifact@v3
with:
name: R3PLAYX-linux-deb
path: ./packages/desktop/release/*.deb
if-no-files-found: ignore

- name: Upload linux latest yml
uses: actions/upload-artifact@v3
with:
Expand Down
63 changes: 41 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<p align="center">
<h2 align="center" style="font-weight: 600">基于 YesPlayMusic-Alpha 版本</h2>
<h2 align="center">
<a href="https://t.me/+MrhsgG741wQxNjg9">💻 加入TG群组,参与开发讨论 👊</a>
<h2 align="center">
<a href="https://t.me/+MrhsgG741wQxNjg9">💻 加入TG群组,参与开发讨论 👊</a> <br><br>
<a href="https://github.com/Sherlockouo/music/wiki/For-Developers">🧭 开发指南 👆 点这里,查看wiki </a>
</h2>
<p align="center">
高颜值的第三方音乐播放器
<br />
<a href="https://music.xtify.top/" target="blank"><strong>🌎 访问最新DEMO</strong></a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://r3play.app/" target="blank"><strong>🌎 访问原版DEMO</strong></a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://github.com/Sherlockouo/music/releases" target="blank"><strong>📦️ 下载安装包</strong></a>
<br />
高颜值的第三方音乐播放器
<br />
<a href="https://music.xtify.top/" target="blank"><strong>🌎 访问最新DEMO</strong></a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://r3play.app/" target="blank"><strong>🌎 访问原版DEMO</strong></a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://github.com/Sherlockouo/music/releases" target="blank"><strong>📦️ 下载安装包</strong></a>
<br />
</p>
</p>
<div align="center">
<img src="https://github.com/sherlockouo/music/actions/workflows/build-dev.yml/badge.svg" />
<img src="https://img.shields.io/badge/downloads-1.3k-deepgreen" />
<img src="https://img.shields.io/badge/latest_version-2.7.1-deepgreen" />
<img src="https://github.com/sherlockouo/music/actions/workflows/build-dev.yml/badge.svg" />
<img src="https://img.shields.io/badge/downloads-5.0k-deepgreen" />
<img src="https://img.shields.io/badge/latest_version-2.7.4-deepgreen" />
</div>


## 关于 Alpha 版本

目前 R3PLAYX 处于 Alpha 阶段,仍在开发中,功能尚未完善。建议每次更新时,先卸载旧版本的 R3PLAY,再重新安装。如遇到问题,欢迎提 issue。
Expand All @@ -29,23 +29,20 @@
- 🔴 网易云账号登录(扫码/手机/邮箱登录)
- 📺 支持 MV 播放
- 🚫🤝 无任何社交功能
- 🛠 更多特性开发中

---

## 💡 新特性

- 📖 支持歌词展示
- 🎨 新增全局背景
- 🎵 支持更多音源
- 🐳 支持 docker 部署
- 🔊 支持私人 FM
- 🔧 更多特性,期待你的建议和加入

## 📦️ 安装

访问本项目的 [Releases](https://github.com/qier222/YesPlayMusic/releases)
页面下载安装包。

对于 NixOS 上的安装,请参考 [EndCredits/R3PLAYX-nix](https://github.com/EndCredits/R3PLAYX-nix)

## 📜 开源许可

API 源代码来自 [Binaryify/NeteaseCloudMusicApi](https://github.com/Binaryify/NeteaseCloudMusicApi)
Expand All @@ -66,10 +63,22 @@ API 源代码来自 [Binaryify/NeteaseCloudMusicApi](https://github.com/Binaryif
![lyrics-screenshot](https://github.com/Sherlockouo/music/assets/34598208/82123958-db58-4026-ab4d-19f7c8e26495)
- 新增音源,全局背景
![background](https://github.com/Sherlockouo/music/assets/34598208/87bbca8f-705a-4925-9ac7-7444ab11f0c0)
- 新增歌词特效
![lyric-effect](https://github.com/Sherlockouo/music/assets/34598208/cba01737-5522-4387-81c8-587c5c261ffe)
- 完善右键功能 ing
![menu](https://github.com/Sherlockouo/music/assets/34598208/56543dbd-fa37-4642-8645-7bae856ee6d4)
- ~~新增歌词特效~~ 由于性能问题被干掉了


如果你遇到了任何问题,我会尽力帮助你解决。以下是一些常见问题的解决方案:

1. **无法登录网易云账号**:请确保你的账号和密码输入正确,如果是扫码登录,请扫描二维码并在手机上确认登录。

2. **如何播放MV**:在播放器界面的右下角有一个 "MV" 按钮,点击它即可打开 MV 播放器。

3. **找不到歌词**:在播放器界面的右上角有一个 "歌词" 按钮,点击它即可显示当前歌曲的歌词。如果歌曲没有歌词信息,可能是因为该歌曲没有提供歌词。

4. **如何更改全局背景**:你可以在设置中选择一个背景图像作为全局背景。在播放器界面的右上角有一个 "设置" 按钮,点击它并在 "主题" 选项卡中选择一个背景图像。

如果你的问题不在上述范围内,请提供更多详细信息,我会尽力提供帮助。同时,你也可以加入我们的开发讨论群组,与其他开发者一起讨论问题和分享经验。

希望以上解决方案对你有帮助!如果你还有其他问题,随时提问。

## 赞赏(这将被用于为开发者充能,进行更加激情的创造)

Expand All @@ -83,6 +92,16 @@ API 源代码来自 [Binaryify/NeteaseCloudMusicApi](https://github.com/Binaryif
- 如果您认为本代码库侵犯了您的知识产权,请发布 PR, Issue 或 DMCA 请求,表达您删除相关引擎或代码的意图。
</p>

## Star History

<a href="https://star-history.com/#Sherlockouo/music&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Sherlockouo/music&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Sherlockouo/music&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Sherlockouo/music&type=Date" />
</picture>
</a>

## Credit

Designed by [JACKCRING](https://jackcring.com)
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "r3playx",
"productName": "R3PLAYX",
"private": true,
"version": "2.7.2",
"version": "2.7.5",
"description": "A nifty third-party NetEase Music player",
"homepage": "https://github.com/sherlockouo/music",
"license": "MIT",
Expand All @@ -24,20 +24,21 @@
},
"devDependencies": {
"cross-env": "^7.0.3",
"electron": "^23.1.4",
"electron": "^28.1.3",
"electron-winstaller": "^5.1.0",
"eslint": "^8.31.0",
"prettier": "^2.8.1",
"prettier-plugin-tailwindcss": "^0.2.1",
"prisma": "^5.1.1",
"tsx": "^3.12.1",
"turbo": "^1.10.16",
"turbo": "^1.11.2",
"typescript": "^4.9.5"
},
"dependencies": {
"@prisma/client": "^5.1.1",
"@unblockneteasemusic/server": "^0.27.3",
"NeteaseCloudMusicApi": "^4.13.2",
"electron-window-state": "^5.0.3",
"log4js": "^6.9.1",
"sax": "^1.2.4"
}
Expand Down
17 changes: 8 additions & 9 deletions packages/desktop/.electron-builder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,13 @@ module.exports = {
},
linux: {
target: [
// {
// target: 'deb',
// arch: [
// 'x64',
// 'arm64',
// // 'armv7l'
// ],
// },
{
target: 'deb',
arch: [
'x64',
'arm64',
],
},
{
target: 'AppImage',
arch: ['x64'],
Expand All @@ -104,7 +103,7 @@ module.exports = {
// arch: ['x64'],
// },
],
artifactName: '${productName}-${version}-${os}.${ext}',
artifactName: '${productName}-${version}-${os}-${arch}.${ext}',
category: 'Music',
icon: './build/icon.png',
},
Expand Down
23 changes: 16 additions & 7 deletions packages/desktop/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { bindingKeyboardShortcuts } from './keyboardShortcuts'
import { createDockMenu } from './dockMenu'
import { checkForUpdates } from './updateWindow'
import { createTouchBar } from './touchBar'
import windowStateKeeper from 'electron-window-state'

log.info('[electron] index.ts')

Expand Down Expand Up @@ -107,15 +108,23 @@ class Main {
}

createWindow() {
let mainWindowStateKeeper = windowStateKeeper({
defaultWidth: 1440,
defaultHeight: 1024,
path: `${app.getPath('userData')}/WindowsState`,
file: 'mainWindowStateKeeper.json',
})
const options: BrowserWindowConstructorOptions = {
title: appName,
webPreferences: {
preload: join(__dirname, 'rendererPreload.js'),
sandbox: false,
},
width: store.get('window.width'),
height: store.get('window.height'),
minWidth: 1240,
width: mainWindowStateKeeper.width || store.get('window.width'),
height: mainWindowStateKeeper.height || store.get('window.height'),
x: mainWindowStateKeeper.x || store.get('window.x'),
y: mainWindowStateKeeper.y || store.get('window.y'),
minWidth: 1260,
minHeight: 800,
titleBarStyle: 'hidden',
trafficLightPosition: { x: 18, y: 20 },
Expand All @@ -126,11 +135,11 @@ class Main {
backgroundColor: 'rgba(0, 0, 0, 0)',
show: false,
}
if (store.get('window')) {
options.x = store.get('window.x')
options.y = store.get('window.y')
if(isWindows) {
options.transparent = false
}
this.win = new BrowserWindow(options)
mainWindowStateKeeper.manage(this.win)

// Web server, load the web server to the electron
const url = `http://localhost:${process.env.ELECTRON_WEB_SERVER_PORT}`
Expand Down Expand Up @@ -238,7 +247,7 @@ class Main {
}
let closeWindowInMinimize = store.get('settings.closeWindowInMinimize')

if (closeWindowInMinimize === 'true') {
if (closeWindowInMinimize == true) {
e.preventDefault()
this.win?.hide()
return
Expand Down
20 changes: 12 additions & 8 deletions packages/desktop/main/lyricsWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import store from './store'
import { IpcChannels, IpcChannelsParams } from '@/shared/IpcChannels'
import { handleLyricsWinClose } from './ipcMain'
import { appName } from './env'
import windowStateKeeper from 'electron-window-state'

const on = <T extends keyof IpcChannelsParams>(
channel: T,
Expand All @@ -29,14 +30,22 @@ export class LyricsWindow {
}

createWindow(pWin: BrowserWindow) {
let lyricsWindowStateKeeper = windowStateKeeper({
defaultWidth: 300,
defaultHeight: 600,
path: `${app.getPath('userData')}/WindowsState`,
file: 'lyricsWindowStateKeeper.json',
})
const options: BrowserWindowConstructorOptions = {
title: appName + 'Lyrics',
webPreferences: {
preload: join(__dirname, 'rendererPreload.js'),
sandbox: false,
},
width: store.get('lyricsWindow.width'),
height: store.get('lyricsWindow.height'),
width: lyricsWindowStateKeeper.width || store.get('lyricsWindow.width'),
height: lyricsWindowStateKeeper.height || store.get('lyricsWindow.height'),
x: lyricsWindowStateKeeper.x || store.get('lyricsWindow.x'),
y: lyricsWindowStateKeeper.y || store.get('lyricsWindow.y'),
minWidth: 300,
maxWidth: 300,
minHeight: 640,
Expand All @@ -50,13 +59,8 @@ export class LyricsWindow {
transparent: true,
backgroundColor: 'rgba(0, 0, 0, 0)',
}

if (store.get('lyricsWindow')) {
options.x = store.get('lyricsWindow.x')
options.y = store.get('lyricsWindow.y')
}

this.win = new BrowserWindow(options)
lyricsWindowStateKeeper.manage(this.win)
this.win.webContents.setAudioMuted(true)
// Web server, load the web server to the electron
// const url = `http://localhost:${process.env.ELECTRON_WEB_SERVER_PORT}`
Expand Down
7 changes: 4 additions & 3 deletions packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "desktop",
"productName": "R3PLAYX",
"private": true,
"version": "2.7.2",
"version": "2.7.5",
"main": "./main/index.js",
"author": "qier222 <qier222@outlook.com> && feng <wdf.coder@gmail.com>",
"homepage": "https://github.com/sherlockouo/music",
Expand All @@ -29,7 +29,7 @@
"@sentry/electron": "^3.0.7",
"@tanstack/react-query": "^4.26.1",
"NeteaseCloudMusicApi": "^4.13.2",
"better-sqlite3": "8.5.0",
"better-sqlite3": "9.2.2",
"change-case": "^4.1.2",
"compare-versions": "^4.1.3",
"electron-log": "^4.4.8",
Expand All @@ -40,6 +40,7 @@
"fastify": "^4.5.3",
"fastify-cors": "^6.1.0",
"http-proxy-agent": "^5.0.0",
"node-abi": "^3.54.0",
"pretty-bytes": "^6.0.0",
"ytdl-core": "^4.11.2"
},
Expand All @@ -49,7 +50,7 @@
"axios": "^1.4.0",
"cross-env": "^7.0.3",
"dotenv": "^16.0.3",
"electron": "^23.1.4",
"electron": "^28.1.3",
"electron-builder": "23.6.0",
"electron-devtools-installer": "^3.2.0",
"electron-rebuild": "^3.2.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/scripts/build.sqlite3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async function build(arch: Arch) {
}

async function main() {
await getElectronModuleVersion()
// await getElectronModuleVersion()
if (argv.x64 || argv.arm64 || argv.arm) {
if (argv.x64) await build('x64')
if (argv.arm64) await build('arm64')
Expand Down
Loading

0 comments on commit 0b40e81

Please sign in to comment.