mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 12:30:06 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| be0ebac362 | |||
| 8eb8290fc4 |
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "feishin",
|
"name": "feishin",
|
||||||
"version": "0.12.0",
|
"version": "0.12.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "feishin",
|
"name": "feishin",
|
||||||
"version": "0.12.0",
|
"version": "0.12.1",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"name": "feishin",
|
"name": "feishin",
|
||||||
"productName": "Feishin",
|
"productName": "Feishin",
|
||||||
"description": "Feishin music server",
|
"description": "Feishin music server",
|
||||||
"version": "0.12.0",
|
"version": "0.12.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "concurrently \"npm run build:main\" \"npm run build:renderer\" \"npm run build:remote\"",
|
"build": "concurrently \"npm run build:main\" \"npm run build:renderer\" \"npm run build:remote\"",
|
||||||
"build:main": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.prod.ts",
|
"build:main": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.prod.ts",
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "feishin",
|
"name": "feishin",
|
||||||
"version": "0.12.0",
|
"version": "0.12.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "feishin",
|
"name": "feishin",
|
||||||
"version": "0.12.0",
|
"version": "0.12.1",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "feishin",
|
"name": "feishin",
|
||||||
"version": "0.12.0",
|
"version": "0.12.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./dist/main/main.js",
|
"main": "./dist/main/main.js",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export const SubsonicController: ControllerEndpoint = {
|
|||||||
const cleanServerUrl = `${url.replace(/\/$/, '')}/rest`;
|
const cleanServerUrl = `${url.replace(/\/$/, '')}/rest`;
|
||||||
|
|
||||||
if (body.legacy) {
|
if (body.legacy) {
|
||||||
credential = `u=${body.username}&p=${body.password}`;
|
credential = `u=${encodeURIComponent(body.username)}&p=${encodeURIComponent(body.password)}`;
|
||||||
credentialParams = {
|
credentialParams = {
|
||||||
p: body.password,
|
p: body.password,
|
||||||
u: body.username,
|
u: body.username,
|
||||||
@@ -73,7 +73,7 @@ export const SubsonicController: ControllerEndpoint = {
|
|||||||
} else {
|
} else {
|
||||||
const salt = randomString(12);
|
const salt = randomString(12);
|
||||||
const hash = md5(body.password + salt);
|
const hash = md5(body.password + salt);
|
||||||
credential = `u=${body.username}&s=${salt}&t=${hash}`;
|
credential = `u=${encodeURIComponent(body.username)}&s=${encodeURIComponent(salt)}&t=${encodeURIComponent(hash)}`;
|
||||||
credentialParams = {
|
credentialParams = {
|
||||||
s: salt,
|
s: salt,
|
||||||
t: hash,
|
t: hash,
|
||||||
|
|||||||
@@ -24,15 +24,14 @@ const getCoverArtUrl = (args: {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const url =
|
return (
|
||||||
`${args.baseUrl}/rest/getCoverArt.view` +
|
`${args.baseUrl}/rest/getCoverArt.view` +
|
||||||
`?id=${args.coverArtId}` +
|
`?id=${args.coverArtId}` +
|
||||||
`&${encodeURIComponent(args.credential || '')}` +
|
`&${args.credential}` +
|
||||||
'&v=1.13.0' +
|
'&v=1.13.0' +
|
||||||
'&c=feishin' +
|
'&c=feishin' +
|
||||||
`&size=${size}`;
|
`&size=${size}`
|
||||||
|
);
|
||||||
return url;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const normalizeSong = (
|
const normalizeSong = (
|
||||||
@@ -49,7 +48,7 @@ const normalizeSong = (
|
|||||||
size: size || 300,
|
size: size || 300,
|
||||||
}) || null;
|
}) || null;
|
||||||
|
|
||||||
const streamUrl = `${server?.url}/rest/stream.view?id=${item.id}&v=1.13.0&c=feishin_${deviceId}&${encodeURIComponent(server?.credential || '')}`;
|
const streamUrl = `${server?.url}/rest/stream.view?id=${item.id}&v=1.13.0&c=feishin_${deviceId}&${server?.credential}`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
album: item.album || '',
|
album: item.album || '',
|
||||||
|
|||||||
Reference in New Issue
Block a user