Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

v2.4 #34

Merged
merged 35 commits into from
Jul 13, 2023
Merged

v2.4 #34

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8e6dcf0
修复登录
g2nnyS May 28, 2023
44269d9
修复/优化动态背景模块的问题
gozaoo Jun 2, 2023
9e06a28
Merge branch 'dev' of https://github.com/Project-And-Factory/BlurLyri…
gozaoo Jun 2, 2023
1b24054
修改按钮样式
gozaoo Jun 3, 2023
e8984b2
更新
gozaoo Jun 10, 2023
1bcfc42
增添动画细节
gozaoo Jun 16, 2023
37caa84
修复一些歌词解析错误和加载动画的下沉细节
gozaoo Jun 26, 2023
13da24e
升级更精准的歌词办法
gozaoo Jun 28, 2023
679535d
优化了上次更新的歌词新方法的性能
gozaoo Jun 29, 2023
a5123a4
补充修复
gozaoo Jun 29, 2023
bb4f0c1
修复发光歌词不发光问题,微调歌词效果
gozaoo Jun 30, 2023
558ee00
修复音乐名无法自动命名和后缀的问题 #32
gozaoo Jun 30, 2023
5a2aaf2
增加了将控键元素增加到系统控键的功能(beta)
gozaoo Jun 30, 2023
79d2c93
更新自定义的窗口控制按键,修复了背景无法淡下的bug
gozaoo Jul 1, 2023
2f73661
修复了因正则表达式错误,导致的歌词解析遗漏”,“导致英文歌词连在一起的问题
gozaoo Jul 1, 2023
a9f0115
修复自动构建错误
g2nnyS Jul 1, 2023
1fbf1c5
优化一部分算法
gozaoo Jul 1, 2023
1a1cc1b
Merge branch 'dev' of https://github.com/Project-And-Factory/BlurLyri…
gozaoo Jul 1, 2023
cf1f0b5
史诗级优化(cpu 50% =》 25%)
gozaoo Jul 3, 2023
9b92504
优化了未播放歌词行的算法
gozaoo Jul 3, 2023
ea80495
修复了getCurr事件因为重复启动导致的性能浪费
gozaoo Jul 9, 2023
b10d8e6
升级动画效果
gozaoo Jul 10, 2023
b55febd
Fix
gozaoo Jul 10, 2023
690ac52
持续修复 物理效果版本的 歌词闪烁问题
gozaoo Jul 10, 2023
032a16d
新增了强制音乐事件为24tick,逐字歌词部分使用过度来减少卡顿
gozaoo Jul 10, 2023
b9996f4
重新修复歌词突然从下面闪现的问题
gozaoo Jul 10, 2023
fea578a
微调弹簧参数
gozaoo Jul 10, 2023
e002014
微调
gozaoo Jul 10, 2023
2a5c7f0
歌词动画微调
gozaoo Jul 10, 2023
96d8f40
修复打包成客户端后,无法使用unblockmusic导致播放加载时间过长的问题
gozaoo Jul 10, 2023
c31d0dd
更新了netEaseCloudMusicApi,修复了一些包的问题
gozaoo Jul 10, 2023
16b4777
修复启动-开发环境.bat启动后无法启用vite
gozaoo Jul 10, 2023
8c3677f
修复启动-开发环境.bat启动后无法启用vite
gozaoo Jul 10, 2023
0fc3fe9
升级部分算法和样式
gozaoo Jul 13, 2023
3177fbf
Merge branch 'main' into dev
gozaoo Jul 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blurlyric/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var loadURL = 'http://localhost:18776/'
const server = await createServer({
// 任何合法的用户配置选项,加上 `mode` 和 `configFile`
configFile: path.join(__dirname, '../vite.config.js'),
root: __dirname,
root:path.join(__dirname, '../') ,
})

server.listen().then(()=>{
Expand Down
28 changes: 23 additions & 5 deletions blurlyric/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ var lastTime = +new Date(),createNum = 0;
module.exports = {
getUser,
createUser,
upsetConfig
upsetConfig,
upsetPlayList
};

async function getUser(id, fun) {
Expand All @@ -18,7 +19,7 @@ async function getUser(id, fun) {
return
}
fun(dataStr)
return
return dataStr
})
}

Expand Down Expand Up @@ -48,14 +49,31 @@ async function createUser(callback) {
async function upsetConfig(query, callback) {
let file = {
id: query.id,
config: dataJson(query.res)
config: dataJson(query.res),
}


superTool.writeJson('../data/user/' + file.id + '.json', file, (err, dataStr)=>{
if (err) {
callback(err);
} else {
callback(dataStr);
}
console.log(err,dataStr);
})
}
async function upsetPlayList(query, callback) {
let file = {
playList: dataJson(query.res)
}
let origin_file
getUser(query.id, (dataStr)=>{
origin_file = dataStr
origin_file['playList'] = file.playList
})
superTool.writeJson('../data/user/' + file.id + '.json', file, (err, dataStr)=>{
if (err) {
callback(err);
} else {

callback(dataStr);
}
console.log(err,dataStr);
Expand Down
2 changes: 1 addition & 1 deletion forge.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
packageConfig: {
name: 'Blurlyric',
icon: '/src/assets/icon',
icon: 'src/assets/ico/icon',
authors: "Gozaoo"
},
makers: [
Expand Down
19 changes: 12 additions & 7 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// main.js

const { app, BrowserWindow, ipcMain } = require('electron')
const { app, BrowserWindow, ipcMain ,contextBridge, ipcRenderer} = require('electron')
const path = require('path')

// app.commandLine.appendSwitch('force_high_performance_gpu')
const ipc = ipcMain

var mainWindow

//登录窗口最小化
// 登录窗口最小化
ipc.on('min',function(){
mainWindow.minimize();
})
Expand All @@ -25,6 +25,7 @@ ipc.on('close',function(){
})



// 加载vite
const { createServer } = require('vite')
var loadURL = 'http://localhost:18775/'
Expand Down Expand Up @@ -57,9 +58,9 @@ const createWindow = async () => {
title: "BlurLyric",
icon:"./src/assets/icon.ico",
titleBarStyle: 'hidden',
titleBarOverlay: {
color: '#00000000',symbolColor: 'black'
},
// titleBarOverlay: {
// color: '#00000000',symbolColor: 'black'
// },
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
nodeIntegration: true,
Expand All @@ -83,8 +84,12 @@ const createWindow = async () => {
app.on('activate', () => {
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (BrowserWindow.getAllWindows().length === 0) createWindow()
if (BrowserWindow.getAllWindows().length === 0) {createWindow()}
})
})


app.on('ready',()=>{
app.setAboutPanelOptions({
applicationName:'BlurLyric'
})
})
10 changes: 10 additions & 0 deletions module/pl_count.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// 数字专辑-新碟上架
module.exports = (query, request) => {
const data = {}
return request('POST', `https://music.163.com/weapi/pl/count`, data, {
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
})
}
9 changes: 7 additions & 2 deletions module/song_url_v1.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
// 歌曲链接 - v1
// 此版本不再采用 br 作为音质区分的标准
// 而是采用 standard, exhigh, lossless, hires 进行音质判断
// 而是采用 standard, exhigh, lossless, hires, jyeffect(高清环绕声), sky(沉浸环绕声), jymaster(超清母带) 进行音质判断

const crypto = require('crypto')
module.exports = (query, request) => {
query.cookie.os = 'pc'
query.cookie.os = 'android'
query.cookie.appver = '8.10.05'
const data = {
ids: '[' + query.id + ']',
level: query.level,
encodeType: 'flac',
}
if (data.level == 'sky') {
data.immerseType = 'c51'
}
console.log(data)
return request(
'POST',
`https://interface.music.163.com/eapi/song/enhance/player/url/v1`,
Expand Down
72 changes: 72 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
"name": "blurlyric",
"private": true,
"main": "main.js",
"version": "2.3.1",
"version": "2.4.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"start": "electron-forge start",
"test": "electron .",
"packager": "electron-packager ./ BlurLyric --win --out ./outputs --electron-version 15.5.1 --overwrite",
"package": "electron-forge package",
"make": "electron-forge make"
},
Expand All @@ -34,6 +33,7 @@
"stackblur-canvas": "^2.5.0",
"tunnel": "^0.0.6",
"vite": "^2.9.16",
"@vitejs/plugin-vue": "^2.3.3",
"vue": "^3.2.45",
"vue-router": "^4.1.1",
"vue-virtual-scroller": "^2.0.0-beta.5",
Expand All @@ -43,12 +43,20 @@
"devDependencies": {
"@electron-forge/cli": "^6.0.1",
"@electron-forge/maker-deb": "^6.0.1",
"@vitejs/plugin-vue": "^2.3.3",
"@electron-forge/maker-squirrel": "^6.0.1",
"@electron-forge/maker-zip": "^6.0.1",
"@vitejs/plugin-vue": "^2.3.3",
"@electron-forge/plugin-auto-unpack-natives": "^6.2.1",
"electron": "^24.0.0",
"@vitejs/plugin-vue": "^2.3.3",
"vite": "^2.9.16"
},
"build": {
"win": {
"icon": "src/assets/icon.ico",
"productName": "BlurLyric"
}
},
"description": "高颜值,高性能,多平台支持的网易云音乐第三方音乐播放器",
"repository": {
"type": "git",
Expand Down
20 changes: 18 additions & 2 deletions preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,25 @@

// 所有Node.js API都可以在预加载过程中使用。
// 它拥有与Chrome扩展一样的沙盒。
const { ipcRenderer ,contextBridge} = require('electron')


window.addEventListener('DOMContentLoaded', () => {
electronBar = document.createElement('style')
electronBar.type = "text/css"
document.body.appendChild(electronBar)
electronBar.appendChild(document.createTextNode(".electron-control{display:block !important}"))
})
electronBar.appendChild(document.createTextNode(".electron-control{display:block !important};.windowControlBar{display:flex !important}"))
})

contextBridge.exposeInMainWorld('electronAPI',{
min:()=>{
// mainWindow.minimize()
ipcRenderer.send('min')
},
close:()=>{
ipcRenderer.send('close')

},
max:()=>{
ipcRenderer.send('max')
}})
1 change: 1 addition & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ async function checkVersion() {
async function consturctServer(moduleDefs) {

const app = express()
app.set('maxHeaderSize',30 * 1024 * 1024)
app.use('/blurlyric',router_blurlyric)
app.use(express.static(path.join(__dirname, 'dist')))

Expand Down
25 changes: 22 additions & 3 deletions serverRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,34 @@ router.get('/writeUser',(req,res)=>{
return
}
let dataSize = strSize(req.query.res.toString())
if(strSize(dataSize,'utf8')>8000000){
jsonTool('405',{msg: '文件过大 (>8mb)'},req,res)
if(strSize(dataSize,'utf8')>20000000){
jsonTool('405',{msg: '文件过大 (>20mb)'},req,res)
return
}
user.upsetConfig(req.query,(data)=>{
jsonTool('200',data,req,res)
})
})

router.post('/writeUserPlaylist',(req,res)=>{
// console.log(req.query)
// if (!req.query.id||!req.query.res) {
// jsonTool('405',null,req,res)
// return
// }
// let dataSize = strSize(req.query.res.toString())
// if(strSize(dataSize,'utf8')>20000000){
// jsonTool('405',{msg: '文件过大 (>20mb)'},req,res)
// return
// }
console.log(req);
jsonTool('200',req,'',res)

// user.upsetPlaylist(req.query,(data)=>{
// jsonTool('200',data,req,res)
// })
})

function jsonTool(code,data,req,res) {
res.json({
"code": code || 200,
Expand Down Expand Up @@ -90,7 +109,7 @@ async function getFileByUrl(url,fileName){
method: 'GET',
headers: { 'Content-Type': 'application/octet-stream' },
}).then(res=>res.buffer()).then(_=>{
fs.writeFile(path.join(__dirname,'./blurlyric/download/'+fileName +'.mp3'),_,'binary',function (err) {
fs.writeFile(path.join(__dirname,'./blurlyric/download/'+fileName ),_,'binary',function (err) {
downloadTrack.freeThread++
downloadTrack.try()

Expand Down
Loading