Skip to content

Commit c1cd318

Browse files
committed
feat: updates
1 parent ce75721 commit c1cd318

86 files changed

Lines changed: 1063 additions & 793 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ vercel.json
5757
packages/web/bundle-stats-renderer.html
5858
packages/web/bundle-stats.html
5959
packages/web/storybook-static
60-
packages/desktop/prisma/client
60+
packages/desktop/esbuild-kit

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ API 源代码来自 [Binaryify/NeteaseCloudMusicApi](https://github.com/Binaryif
4949

5050
任何基于此项目开发的项目都必须遵守开源协议,在项目 README/应用内的关于页面和介绍网站中明确说明基于此项目开发,并附上此项目 GitHub 页面的链接。
5151

52+
## Credit
53+
54+
Designed by [JACKCRING](https://jackcring.com)
55+
5256
<!-- ## 🖼️ 截图 -->
5357

5458
<!-- ![lyrics][lyrics-screenshot]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"cross-env": "^7.0.3",
2727
"eslint": "^8.31.0",
2828
"prettier": "^2.8.1",
29-
"turbo": "^1.6.3",
29+
"turbo": "^1.8.3",
3030
"typescript": "^4.9.5",
3131
"tsx": "^3.12.1",
3232
"prettier-plugin-tailwindcss": "^0.2.1"

packages/desktop/.electron-builder.config.js

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ const electronVersion = pkg.devDependencies.electron.replaceAll('^', '')
99
module.exports = {
1010
appId: 'app.r3play',
1111
productName: pkg.productName,
12-
copyright: 'Copyright © 2022 qier222',
12+
executableName: pkg.productName,
13+
copyright: 'Copyright © 2023 qier222',
1314
asar: true,
1415
directories: {
1516
output: 'release',
@@ -70,14 +71,14 @@ module.exports = {
7071
},
7172
linux: {
7273
target: [
73-
{
74-
target: 'deb',
75-
arch: [
76-
'x64',
77-
// 'arm64',
78-
// 'armv7l'
79-
],
80-
},
74+
// {
75+
// target: 'deb',
76+
// arch: [
77+
// 'x64',
78+
// // 'arm64',
79+
// // 'armv7l'
80+
// ],
81+
// },
8182
{
8283
target: 'AppImage',
8384
arch: ['x64'],
@@ -105,19 +106,13 @@ module.exports = {
105106
},
106107
files: [
107108
'!**/*.ts',
108-
'!**/node_modules/better-sqlite3/{bin,build,deps}/**',
109-
'!**/node_modules/*/{*.MD,*.md,README,readme}',
110-
'!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}',
111-
'!**/node_modules/*.d.ts',
112-
'!**/node_modules/.bin',
113109
'!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}',
114110
'!.editorconfig',
115111
'!**/._*',
116112
'!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}',
117-
'!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}',
118-
'!**/{appveyor.yml,.travis.yml,circle.yml}',
119-
'!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json,pnpm-lock.yaml}',
113+
'!**/{pnpm-lock.yaml}',
120114
'!**/*.{map,debug.min.js}',
115+
'!**/node_modules/*',
121116

122117
{
123118
from: './dist',

packages/desktop/main/appServer/appServer.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
import fastifyCookie from '@fastify/cookie'
2-
import fastifyMultipart from '@fastify/multipart'
3-
import fastifyStatic from '@fastify/static'
4-
import fastify from 'fastify'
51
import path from 'path'
62
import { isProd } from '../env'
73
import log from '../log'
8-
import netease from './routes/netease/netease'
94
import appleMusic from './routes/r3play/appleMusic'
5+
import netease from './routes/netease/netease'
106
import audio from './routes/r3play/audio'
7+
import fastifyCookie from '@fastify/cookie'
8+
import fastifyMultipart from '@fastify/multipart'
9+
import fastifyStatic from '@fastify/static'
10+
import fastify from 'fastify'
11+
12+
log.info('[electron] appServer/appServer.ts')
1113

1214
const initAppServer = async () => {
1315
const server = fastify({

packages/desktop/main/appServer/routes/netease/netease.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import cache from '../../../cache'
12
import log from '@/desktop/main/log'
23
import { CacheAPIs } from '@/shared/CacheAPIs'
34
import { pathCase, snakeCase } from 'change-case'
45
import { FastifyInstance, FastifyRequest, FastifyReply } from 'fastify'
56
import NeteaseCloudMusicApi from 'NeteaseCloudMusicApi'
6-
import cache from '../../../cache'
7+
8+
log.info('[electron] appServer/routes/netease.ts')
79

810
async function netease(fastify: FastifyInstance) {
911
const getHandler = (name: string, neteaseApi: (params: any) => any) => {

packages/desktop/main/appServer/routes/r3play/appleMusic.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { FastifyInstance } from 'fastify'
22
import proxy from '@fastify/http-proxy'
33
import { isDev } from '@/desktop/main/env'
4+
import log from '@/desktop/main/log'
5+
6+
log.info('[electron] appServer/routes/r3play/appleMusic.ts')
47

58
async function appleMusic(fastify: FastifyInstance) {
69
fastify.register(proxy, {

packages/desktop/main/appServer/routes/r3play/audio.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import { FetchTracksResponse } from '@/shared/api/Track'
1111
import store from '@/desktop/main/store'
1212
import { db, Tables } from '@/desktop/main/db'
1313

14+
log.info('[electron] appServer/routes/r3play/audio.ts')
15+
1416
const getAudioFromCache = async (id: number) => {
1517
// get from cache
1618
const cache = await db.find(Tables.Audio, id)

packages/desktop/main/cache.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { CacheAPIs, CacheAPIsParams } from '@/shared/CacheAPIs'
88
import { TablesStructures } from './db'
99
import { FastifyReply } from 'fastify'
1010

11+
log.info('[electron] cache.ts')
12+
1113
class Cache {
1214
constructor() {
1315
//

packages/desktop/main/db.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import pkg from '../../../package.json'
99
import { compare, validate } from 'compare-versions'
1010
import os from 'os'
1111

12+
log.info('[electron] db.ts')
13+
1214
export const enum Tables {
1315
Track = 'Track',
1416
Album = 'Album',
@@ -108,7 +110,7 @@ class DB {
108110
const prodBinPaths = {
109111
darwin: path.resolve(app.getPath('exe'), `../../Resources/bin/better_sqlite3.node`),
110112
win32: path.resolve(app.getPath('exe'), `../resources/bin/better_sqlite3.node`),
111-
linux: '',
113+
linux: path.resolve(app.getPath('exe'), `../resources/bin/better_sqlite3.node`),
112114
}
113115
return isProd
114116
? prodBinPaths[os.platform as unknown as 'darwin' | 'win32' | 'linux']

0 commit comments

Comments
 (0)