commit
42a94eb696
206
package-lock.json
generated
206
package-lock.json
generated
@ -46,8 +46,8 @@
|
|||||||
"@types/better-sqlite3": "^7.6.4",
|
"@types/better-sqlite3": "^7.6.4",
|
||||||
"@types/needle": "^3.2.0",
|
"@types/needle": "^3.2.0",
|
||||||
"@types/tunnel": "^0.0.3",
|
"@types/tunnel": "^0.0.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
||||||
"@typescript-eslint/parser": "^5.59.8",
|
"@typescript-eslint/parser": "^5.59.9",
|
||||||
"@volar/vue-language-plugin-pug": "^1.6.5",
|
"@volar/vue-language-plugin-pug": "^1.6.5",
|
||||||
"babel-loader": "^9.1.2",
|
"babel-loader": "^9.1.2",
|
||||||
"browserslist": "^4.21.7",
|
"browserslist": "^4.21.7",
|
||||||
@ -63,7 +63,7 @@
|
|||||||
"electron-builder": "^24.4.0",
|
"electron-builder": "^24.4.0",
|
||||||
"electron-debug": "^3.2.0",
|
"electron-debug": "^3.2.0",
|
||||||
"electron-devtools-installer": "^3.2.0",
|
"electron-devtools-installer": "^3.2.0",
|
||||||
"electron-to-chromium": "^1.4.419",
|
"electron-to-chromium": "^1.4.425",
|
||||||
"electron-updater": "^6.1.0",
|
"electron-updater": "^6.1.0",
|
||||||
"eslint": "^8.42.0",
|
"eslint": "^8.42.0",
|
||||||
"eslint-config-standard": "^17.1.0",
|
"eslint-config-standard": "^17.1.0",
|
||||||
@ -98,8 +98,8 @@
|
|||||||
"vue-eslint-parser": "^9.3.0",
|
"vue-eslint-parser": "^9.3.0",
|
||||||
"vue-loader": "^17.2.2",
|
"vue-loader": "^17.2.2",
|
||||||
"vue-template-compiler": "^2.7.14",
|
"vue-template-compiler": "^2.7.14",
|
||||||
"webpack": "^5.85.0",
|
"webpack": "^5.86.0",
|
||||||
"webpack-cli": "^5.1.2",
|
"webpack-cli": "^5.1.4",
|
||||||
"webpack-dev-server": "^4.15.0",
|
"webpack-dev-server": "^4.15.0",
|
||||||
"webpack-hot-middleware": "github:lyswhut/webpack-hot-middleware#329c4375134b89d39da23a56a94db651247c74a1",
|
"webpack-hot-middleware": "github:lyswhut/webpack-hot-middleware#329c4375134b89d39da23a56a94db651247c74a1",
|
||||||
"webpack-merge": "^5.9.0"
|
"webpack-merge": "^5.9.0"
|
||||||
@ -3317,15 +3317,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.9.tgz",
|
||||||
"integrity": "sha512-JDMOmhXteJ4WVKOiHXGCoB96ADWg9q7efPWHRViT/f09bA8XOMLAVHHju3l0MkZnG1izaWXYmgvQcUjTRcpShQ==",
|
"integrity": "sha512-4uQIBq1ffXd2YvF7MAvehWKW3zVv/w+mSfRAu+8cKbfj3nwzyqJLNcZJpQ/WZ1HLbJDiowwmQ6NO+63nCA+fqA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/regexpp": "^4.4.0",
|
"@eslint-community/regexpp": "^4.4.0",
|
||||||
"@typescript-eslint/scope-manager": "5.59.8",
|
"@typescript-eslint/scope-manager": "5.59.9",
|
||||||
"@typescript-eslint/type-utils": "5.59.8",
|
"@typescript-eslint/type-utils": "5.59.9",
|
||||||
"@typescript-eslint/utils": "5.59.8",
|
"@typescript-eslint/utils": "5.59.9",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"grapheme-splitter": "^1.0.4",
|
"grapheme-splitter": "^1.0.4",
|
||||||
"ignore": "^5.2.0",
|
"ignore": "^5.2.0",
|
||||||
@ -3384,14 +3384,14 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.9.tgz",
|
||||||
"integrity": "sha512-AnR19RjJcpjoeGojmwZtCwBX/RidqDZtzcbG3xHrmz0aHHoOcbWnpDllenRDmDvsV0RQ6+tbb09/kyc+UT9Orw==",
|
"integrity": "sha512-FsPkRvBtcLQ/eVK1ivDiNYBjn3TGJdXy2fhXX+rc7czWl4ARwnpArwbihSOHI2Peg9WbtGHrbThfBUkZZGTtvQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "5.59.8",
|
"@typescript-eslint/scope-manager": "5.59.9",
|
||||||
"@typescript-eslint/types": "5.59.8",
|
"@typescript-eslint/types": "5.59.9",
|
||||||
"@typescript-eslint/typescript-estree": "5.59.8",
|
"@typescript-eslint/typescript-estree": "5.59.9",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -3411,13 +3411,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/scope-manager": {
|
"node_modules/@typescript-eslint/scope-manager": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.9.tgz",
|
||||||
"integrity": "sha512-/w08ndCYI8gxGf+9zKf1vtx/16y8MHrZs5/tnjHhMLNSixuNcJavSX4wAiPf4aS5x41Es9YPCn44MIe4cxIlig==",
|
"integrity": "sha512-8RA+E+w78z1+2dzvK/tGZ2cpGigBZ58VMEHDZtpE1v+LLjzrYGc8mMaTONSxKyEkz3IuXFM0IqYiGHlCsmlZxQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "5.59.8",
|
"@typescript-eslint/types": "5.59.9",
|
||||||
"@typescript-eslint/visitor-keys": "5.59.8"
|
"@typescript-eslint/visitor-keys": "5.59.9"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
@ -3428,13 +3428,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/type-utils": {
|
"node_modules/@typescript-eslint/type-utils": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.9.tgz",
|
||||||
"integrity": "sha512-+5M518uEIHFBy3FnyqZUF3BMP+AXnYn4oyH8RF012+e7/msMY98FhGL5SrN29NQ9xDgvqCgYnsOiKp1VjZ/fpA==",
|
"integrity": "sha512-ksEsT0/mEHg9e3qZu98AlSrONAQtrSTljL3ow9CGej8eRo7pe+yaC/mvTjptp23Xo/xIf2mLZKC6KPv4Sji26Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/typescript-estree": "5.59.8",
|
"@typescript-eslint/typescript-estree": "5.59.9",
|
||||||
"@typescript-eslint/utils": "5.59.8",
|
"@typescript-eslint/utils": "5.59.9",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"tsutils": "^3.21.0"
|
"tsutils": "^3.21.0"
|
||||||
},
|
},
|
||||||
@ -3455,9 +3455,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/types": {
|
"node_modules/@typescript-eslint/types": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.9.tgz",
|
||||||
"integrity": "sha512-+uWuOhBTj/L6awoWIg0BlWy0u9TyFpCHrAuQ5bNfxDaZ1Ppb3mx6tUigc74LHcbHpOHuOTOJrBoAnhdHdaea1w==",
|
"integrity": "sha512-uW8H5NRgTVneSVTfiCVffBb8AbwWSKg7qcA4Ot3JI3MPCJGsB4Db4BhvAODIIYE5mNj7Q+VJkK7JxmRhk2Lyjw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
@ -3468,13 +3468,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree": {
|
"node_modules/@typescript-eslint/typescript-estree": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.9.tgz",
|
||||||
"integrity": "sha512-Jy/lPSDJGNow14vYu6IrW790p7HIf/SOV1Bb6lZ7NUkLc2iB2Z9elESmsaUtLw8kVqogSbtLH9tut5GCX1RLDg==",
|
"integrity": "sha512-pmM0/VQ7kUhd1QyIxgS+aRvMgw+ZljB3eDb+jYyp6d2bC0mQWLzUDF+DLwCTkQ3tlNyVsvZRXjFyV0LkU/aXjA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "5.59.8",
|
"@typescript-eslint/types": "5.59.9",
|
||||||
"@typescript-eslint/visitor-keys": "5.59.8",
|
"@typescript-eslint/visitor-keys": "5.59.9",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
@ -3528,17 +3528,17 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils": {
|
"node_modules/@typescript-eslint/utils": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.9.tgz",
|
||||||
"integrity": "sha512-Tr65630KysnNn9f9G7ROF3w1b5/7f6QVCJ+WK9nhIocWmx9F+TmCAcglF26Vm7z8KCTwoKcNEBZrhlklla3CKg==",
|
"integrity": "sha512-1PuMYsju/38I5Ggblaeb98TOoUvjhRvLpLa1DoTOFaLWqaXl/1iQ1eGurTXgBY58NUdtfTXKP5xBq7q9NDaLKg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.2.0",
|
"@eslint-community/eslint-utils": "^4.2.0",
|
||||||
"@types/json-schema": "^7.0.9",
|
"@types/json-schema": "^7.0.9",
|
||||||
"@types/semver": "^7.3.12",
|
"@types/semver": "^7.3.12",
|
||||||
"@typescript-eslint/scope-manager": "5.59.8",
|
"@typescript-eslint/scope-manager": "5.59.9",
|
||||||
"@typescript-eslint/types": "5.59.8",
|
"@typescript-eslint/types": "5.59.9",
|
||||||
"@typescript-eslint/typescript-estree": "5.59.8",
|
"@typescript-eslint/typescript-estree": "5.59.9",
|
||||||
"eslint-scope": "^5.1.1",
|
"eslint-scope": "^5.1.1",
|
||||||
"semver": "^7.3.7"
|
"semver": "^7.3.7"
|
||||||
},
|
},
|
||||||
@ -3587,12 +3587,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/visitor-keys": {
|
"node_modules/@typescript-eslint/visitor-keys": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.9.tgz",
|
||||||
"integrity": "sha512-pJhi2ms0x0xgloT7xYabil3SGGlojNNKjK/q6dB3Ey0uJLMjK2UDGJvHieiyJVW/7C3KI+Z4Q3pEHkm4ejA+xQ==",
|
"integrity": "sha512-bT7s0td97KMaLwpEBckbzj/YohnvXtqbe2XgqNvTl6RJVakY5mvENOTPvw5u66nljfZxthESpDozs86U+oLY8Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "5.59.8",
|
"@typescript-eslint/types": "5.59.9",
|
||||||
"eslint-visitor-keys": "^3.3.0"
|
"eslint-visitor-keys": "^3.3.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -7543,9 +7543,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.4.419",
|
"version": "1.4.425",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.419.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.425.tgz",
|
||||||
"integrity": "sha512-jdie3RiEgygvDTyS2sgjq71B36q2cDSBfPlwzUyuOrfYTNoYWyBxxjGJV/HAu3A2hB0Y+HesvCVkVAFoCKwCSw==",
|
"integrity": "sha512-wv1NufHxu11zfDbY4fglYQApMswleE9FL/DSeyOyauVXDZ+Kco96JK/tPfBUaDqfRarYp2WH2hJ/5UnVywp9Jg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/electron-updater": {
|
"node_modules/electron-updater": {
|
||||||
@ -17974,9 +17974,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/webpack": {
|
"node_modules/webpack": {
|
||||||
"version": "5.85.0",
|
"version": "5.86.0",
|
||||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.85.0.tgz",
|
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.86.0.tgz",
|
||||||
"integrity": "sha512-7gazTiYqwo5OSqwH1tigLDL2r3qDeP2dOKYgd+LlXpsUMqDTklg6tOghexqky0/+6QY38kb/R/uRPUleuL43zg==",
|
"integrity": "sha512-3BOvworZ8SO/D4GVP+GoRC3fVeg5MO4vzmq8TJJEkdmopxyazGDxN8ClqN12uzrZW9Tv8EED8v5VSb6Sqyi0pg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/eslint-scope": "^3.7.3",
|
"@types/eslint-scope": "^3.7.3",
|
||||||
@ -18021,9 +18021,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/webpack-cli": {
|
"node_modules/webpack-cli": {
|
||||||
"version": "5.1.2",
|
"version": "5.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz",
|
||||||
"integrity": "sha512-RI4KfVpjX1qdy5Sq4A1ycCxgTZ2rLLtrTJDBYh3A3DpSSDZ+WP4oBlj/CuD70oXz4wB1WqVjg+lMxH/MPYWb5g==",
|
"integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discoveryjs/json-ext": "^0.5.0",
|
"@discoveryjs/json-ext": "^0.5.0",
|
||||||
@ -20873,15 +20873,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/eslint-plugin": {
|
"@typescript-eslint/eslint-plugin": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.9.tgz",
|
||||||
"integrity": "sha512-JDMOmhXteJ4WVKOiHXGCoB96ADWg9q7efPWHRViT/f09bA8XOMLAVHHju3l0MkZnG1izaWXYmgvQcUjTRcpShQ==",
|
"integrity": "sha512-4uQIBq1ffXd2YvF7MAvehWKW3zVv/w+mSfRAu+8cKbfj3nwzyqJLNcZJpQ/WZ1HLbJDiowwmQ6NO+63nCA+fqA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@eslint-community/regexpp": "^4.4.0",
|
"@eslint-community/regexpp": "^4.4.0",
|
||||||
"@typescript-eslint/scope-manager": "5.59.8",
|
"@typescript-eslint/scope-manager": "5.59.9",
|
||||||
"@typescript-eslint/type-utils": "5.59.8",
|
"@typescript-eslint/type-utils": "5.59.9",
|
||||||
"@typescript-eslint/utils": "5.59.8",
|
"@typescript-eslint/utils": "5.59.9",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"grapheme-splitter": "^1.0.4",
|
"grapheme-splitter": "^1.0.4",
|
||||||
"ignore": "^5.2.0",
|
"ignore": "^5.2.0",
|
||||||
@ -20917,53 +20917,53 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/parser": {
|
"@typescript-eslint/parser": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.9.tgz",
|
||||||
"integrity": "sha512-AnR19RjJcpjoeGojmwZtCwBX/RidqDZtzcbG3xHrmz0aHHoOcbWnpDllenRDmDvsV0RQ6+tbb09/kyc+UT9Orw==",
|
"integrity": "sha512-FsPkRvBtcLQ/eVK1ivDiNYBjn3TGJdXy2fhXX+rc7czWl4ARwnpArwbihSOHI2Peg9WbtGHrbThfBUkZZGTtvQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/scope-manager": "5.59.8",
|
"@typescript-eslint/scope-manager": "5.59.9",
|
||||||
"@typescript-eslint/types": "5.59.8",
|
"@typescript-eslint/types": "5.59.9",
|
||||||
"@typescript-eslint/typescript-estree": "5.59.8",
|
"@typescript-eslint/typescript-estree": "5.59.9",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/scope-manager": {
|
"@typescript-eslint/scope-manager": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.9.tgz",
|
||||||
"integrity": "sha512-/w08ndCYI8gxGf+9zKf1vtx/16y8MHrZs5/tnjHhMLNSixuNcJavSX4wAiPf4aS5x41Es9YPCn44MIe4cxIlig==",
|
"integrity": "sha512-8RA+E+w78z1+2dzvK/tGZ2cpGigBZ58VMEHDZtpE1v+LLjzrYGc8mMaTONSxKyEkz3IuXFM0IqYiGHlCsmlZxQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "5.59.8",
|
"@typescript-eslint/types": "5.59.9",
|
||||||
"@typescript-eslint/visitor-keys": "5.59.8"
|
"@typescript-eslint/visitor-keys": "5.59.9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/type-utils": {
|
"@typescript-eslint/type-utils": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.9.tgz",
|
||||||
"integrity": "sha512-+5M518uEIHFBy3FnyqZUF3BMP+AXnYn4oyH8RF012+e7/msMY98FhGL5SrN29NQ9xDgvqCgYnsOiKp1VjZ/fpA==",
|
"integrity": "sha512-ksEsT0/mEHg9e3qZu98AlSrONAQtrSTljL3ow9CGej8eRo7pe+yaC/mvTjptp23Xo/xIf2mLZKC6KPv4Sji26Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/typescript-estree": "5.59.8",
|
"@typescript-eslint/typescript-estree": "5.59.9",
|
||||||
"@typescript-eslint/utils": "5.59.8",
|
"@typescript-eslint/utils": "5.59.9",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"tsutils": "^3.21.0"
|
"tsutils": "^3.21.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/types": {
|
"@typescript-eslint/types": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.9.tgz",
|
||||||
"integrity": "sha512-+uWuOhBTj/L6awoWIg0BlWy0u9TyFpCHrAuQ5bNfxDaZ1Ppb3mx6tUigc74LHcbHpOHuOTOJrBoAnhdHdaea1w==",
|
"integrity": "sha512-uW8H5NRgTVneSVTfiCVffBb8AbwWSKg7qcA4Ot3JI3MPCJGsB4Db4BhvAODIIYE5mNj7Q+VJkK7JxmRhk2Lyjw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@typescript-eslint/typescript-estree": {
|
"@typescript-eslint/typescript-estree": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.9.tgz",
|
||||||
"integrity": "sha512-Jy/lPSDJGNow14vYu6IrW790p7HIf/SOV1Bb6lZ7NUkLc2iB2Z9elESmsaUtLw8kVqogSbtLH9tut5GCX1RLDg==",
|
"integrity": "sha512-pmM0/VQ7kUhd1QyIxgS+aRvMgw+ZljB3eDb+jYyp6d2bC0mQWLzUDF+DLwCTkQ3tlNyVsvZRXjFyV0LkU/aXjA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "5.59.8",
|
"@typescript-eslint/types": "5.59.9",
|
||||||
"@typescript-eslint/visitor-keys": "5.59.8",
|
"@typescript-eslint/visitor-keys": "5.59.9",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
@ -20998,17 +20998,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/utils": {
|
"@typescript-eslint/utils": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.9.tgz",
|
||||||
"integrity": "sha512-Tr65630KysnNn9f9G7ROF3w1b5/7f6QVCJ+WK9nhIocWmx9F+TmCAcglF26Vm7z8KCTwoKcNEBZrhlklla3CKg==",
|
"integrity": "sha512-1PuMYsju/38I5Ggblaeb98TOoUvjhRvLpLa1DoTOFaLWqaXl/1iQ1eGurTXgBY58NUdtfTXKP5xBq7q9NDaLKg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@eslint-community/eslint-utils": "^4.2.0",
|
"@eslint-community/eslint-utils": "^4.2.0",
|
||||||
"@types/json-schema": "^7.0.9",
|
"@types/json-schema": "^7.0.9",
|
||||||
"@types/semver": "^7.3.12",
|
"@types/semver": "^7.3.12",
|
||||||
"@typescript-eslint/scope-manager": "5.59.8",
|
"@typescript-eslint/scope-manager": "5.59.9",
|
||||||
"@typescript-eslint/types": "5.59.8",
|
"@typescript-eslint/types": "5.59.9",
|
||||||
"@typescript-eslint/typescript-estree": "5.59.8",
|
"@typescript-eslint/typescript-estree": "5.59.9",
|
||||||
"eslint-scope": "^5.1.1",
|
"eslint-scope": "^5.1.1",
|
||||||
"semver": "^7.3.7"
|
"semver": "^7.3.7"
|
||||||
},
|
},
|
||||||
@ -21040,12 +21040,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/visitor-keys": {
|
"@typescript-eslint/visitor-keys": {
|
||||||
"version": "5.59.8",
|
"version": "5.59.9",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.8.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.9.tgz",
|
||||||
"integrity": "sha512-pJhi2ms0x0xgloT7xYabil3SGGlojNNKjK/q6dB3Ey0uJLMjK2UDGJvHieiyJVW/7C3KI+Z4Q3pEHkm4ejA+xQ==",
|
"integrity": "sha512-bT7s0td97KMaLwpEBckbzj/YohnvXtqbe2XgqNvTl6RJVakY5mvENOTPvw5u66nljfZxthESpDozs86U+oLY8Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "5.59.8",
|
"@typescript-eslint/types": "5.59.9",
|
||||||
"eslint-visitor-keys": "^3.3.0"
|
"eslint-visitor-keys": "^3.3.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -24106,9 +24106,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"electron-to-chromium": {
|
"electron-to-chromium": {
|
||||||
"version": "1.4.419",
|
"version": "1.4.425",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.419.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.425.tgz",
|
||||||
"integrity": "sha512-jdie3RiEgygvDTyS2sgjq71B36q2cDSBfPlwzUyuOrfYTNoYWyBxxjGJV/HAu3A2hB0Y+HesvCVkVAFoCKwCSw==",
|
"integrity": "sha512-wv1NufHxu11zfDbY4fglYQApMswleE9FL/DSeyOyauVXDZ+Kco96JK/tPfBUaDqfRarYp2WH2hJ/5UnVywp9Jg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"electron-updater": {
|
"electron-updater": {
|
||||||
@ -32045,9 +32045,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"webpack": {
|
"webpack": {
|
||||||
"version": "5.85.0",
|
"version": "5.86.0",
|
||||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.85.0.tgz",
|
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.86.0.tgz",
|
||||||
"integrity": "sha512-7gazTiYqwo5OSqwH1tigLDL2r3qDeP2dOKYgd+LlXpsUMqDTklg6tOghexqky0/+6QY38kb/R/uRPUleuL43zg==",
|
"integrity": "sha512-3BOvworZ8SO/D4GVP+GoRC3fVeg5MO4vzmq8TJJEkdmopxyazGDxN8ClqN12uzrZW9Tv8EED8v5VSb6Sqyi0pg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/eslint-scope": "^3.7.3",
|
"@types/eslint-scope": "^3.7.3",
|
||||||
@ -32090,9 +32090,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"webpack-cli": {
|
"webpack-cli": {
|
||||||
"version": "5.1.2",
|
"version": "5.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz",
|
||||||
"integrity": "sha512-RI4KfVpjX1qdy5Sq4A1ycCxgTZ2rLLtrTJDBYh3A3DpSSDZ+WP4oBlj/CuD70oXz4wB1WqVjg+lMxH/MPYWb5g==",
|
"integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@discoveryjs/json-ext": "^0.5.0",
|
"@discoveryjs/json-ext": "^0.5.0",
|
||||||
|
|||||||
10
package.json
10
package.json
@ -220,8 +220,8 @@
|
|||||||
"@types/better-sqlite3": "^7.6.4",
|
"@types/better-sqlite3": "^7.6.4",
|
||||||
"@types/needle": "^3.2.0",
|
"@types/needle": "^3.2.0",
|
||||||
"@types/tunnel": "^0.0.3",
|
"@types/tunnel": "^0.0.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
||||||
"@typescript-eslint/parser": "^5.59.8",
|
"@typescript-eslint/parser": "^5.59.9",
|
||||||
"@volar/vue-language-plugin-pug": "^1.6.5",
|
"@volar/vue-language-plugin-pug": "^1.6.5",
|
||||||
"babel-loader": "^9.1.2",
|
"babel-loader": "^9.1.2",
|
||||||
"browserslist": "^4.21.7",
|
"browserslist": "^4.21.7",
|
||||||
@ -237,7 +237,7 @@
|
|||||||
"electron-builder": "^24.4.0",
|
"electron-builder": "^24.4.0",
|
||||||
"electron-debug": "^3.2.0",
|
"electron-debug": "^3.2.0",
|
||||||
"electron-devtools-installer": "^3.2.0",
|
"electron-devtools-installer": "^3.2.0",
|
||||||
"electron-to-chromium": "^1.4.419",
|
"electron-to-chromium": "^1.4.425",
|
||||||
"electron-updater": "^6.1.0",
|
"electron-updater": "^6.1.0",
|
||||||
"eslint": "^8.42.0",
|
"eslint": "^8.42.0",
|
||||||
"eslint-config-standard": "^17.1.0",
|
"eslint-config-standard": "^17.1.0",
|
||||||
@ -272,8 +272,8 @@
|
|||||||
"vue-eslint-parser": "^9.3.0",
|
"vue-eslint-parser": "^9.3.0",
|
||||||
"vue-loader": "^17.2.2",
|
"vue-loader": "^17.2.2",
|
||||||
"vue-template-compiler": "^2.7.14",
|
"vue-template-compiler": "^2.7.14",
|
||||||
"webpack": "^5.85.0",
|
"webpack": "^5.86.0",
|
||||||
"webpack-cli": "^5.1.2",
|
"webpack-cli": "^5.1.4",
|
||||||
"webpack-dev-server": "^4.15.0",
|
"webpack-dev-server": "^4.15.0",
|
||||||
"webpack-hot-middleware": "github:lyswhut/webpack-hot-middleware#329c4375134b89d39da23a56a94db651247c74a1",
|
"webpack-hot-middleware": "github:lyswhut/webpack-hot-middleware#329c4375134b89d39da23a56a94db651247c74a1",
|
||||||
"webpack-merge": "^5.9.0"
|
"webpack-merge": "^5.9.0"
|
||||||
|
|||||||
@ -75,7 +75,7 @@ const defaultSetting: LX.AppSetting = {
|
|||||||
'desktopLyric.height': 300,
|
'desktopLyric.height': 300,
|
||||||
'desktopLyric.x': null,
|
'desktopLyric.x': null,
|
||||||
'desktopLyric.y': null,
|
'desktopLyric.y': null,
|
||||||
'desktopLyric.isLockScreen': true,
|
'desktopLyric.isLockScreen': isWin,
|
||||||
'desktopLyric.isDelayScroll': true,
|
'desktopLyric.isDelayScroll': true,
|
||||||
'desktopLyric.scrollAlign': 'center',
|
'desktopLyric.scrollAlign': 'center',
|
||||||
'desktopLyric.isHoverHide': false,
|
'desktopLyric.isHoverHide': false,
|
||||||
|
|||||||
@ -10,7 +10,7 @@ export default {
|
|||||||
|
|
||||||
let timestamp = Date.now()
|
let timestamp = Date.now()
|
||||||
const params = `appid=1005&clienttime=${timestamp}&clienttoken=0&clientver=11409&code=fc4be23b4e972707f36b8a828a93ba8a&dfid=0&extdata=${hash}&kugouid=0&mid=16249512204336365674023395779019&mixsongid=0&p=${page}&pagesize=${limit}&uuid=0&ver=10`
|
const params = `appid=1005&clienttime=${timestamp}&clienttoken=0&clientver=11409&code=fc4be23b4e972707f36b8a828a93ba8a&dfid=0&extdata=${hash}&kugouid=0&mid=16249512204336365674023395779019&mixsongid=0&p=${page}&pagesize=${limit}&uuid=0&ver=10`
|
||||||
const _requestObj = httpFetch(`http://m.comment.service.kugou.com/v1/cmtlist?${params}&signature=${signatureParams(params)}`, {
|
const _requestObj = httpFetch(`http://m.comment.service.kugou.com/r/v1/rank/newest?${params}&signature=${signatureParams(params)}`, {
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.24',
|
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.24',
|
||||||
},
|
},
|
||||||
|
|||||||
86
src/renderer/utils/musicSdk/kg/singer.js
Normal file
86
src/renderer/utils/musicSdk/kg/singer.js
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
import { getMusicInfosByList } from './musicInfo'
|
||||||
|
import { createHttpFetch } from './util'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
/**
|
||||||
|
* 获取歌手信息
|
||||||
|
* @param {*} id
|
||||||
|
*/
|
||||||
|
getInfo(id) {
|
||||||
|
if (id == 0) throw new Error('歌手不存在') // kg源某些歌曲在歌手没被kg收录时返回的歌手id为0
|
||||||
|
return createHttpFetch(`http://mobiles.kugou.com/api/v5/singer/info?singerid=${id}`).then(body => {
|
||||||
|
if (!body) throw new Error('get singer info faild.')
|
||||||
|
|
||||||
|
return {
|
||||||
|
source: 'kg',
|
||||||
|
id: body.singerid,
|
||||||
|
info: {
|
||||||
|
name: body.singername,
|
||||||
|
desc: body.intro,
|
||||||
|
avatar: body.imgurl.replace('{size}', 480),
|
||||||
|
gender: body.grade === 1 ? '1' : '2',
|
||||||
|
},
|
||||||
|
count: {
|
||||||
|
music: body.songcount,
|
||||||
|
album: body.albumcount,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取歌手专辑列表
|
||||||
|
* @param {*} id
|
||||||
|
* @param {*} page
|
||||||
|
* @param {*} limit
|
||||||
|
*/
|
||||||
|
getAlbumList(id, page, limit) {
|
||||||
|
if (id == 0) throw new Error('歌手不存在')
|
||||||
|
return createHttpFetch(`http://mobiles.kugou.com/api/v5/singer/album?singerid=${id}&page=${page}&pagesize=${limit}`).then(body => {
|
||||||
|
if (!body.info) throw new Error('get singer album faild.')
|
||||||
|
|
||||||
|
const list = this.filterAlbumList(body.info)
|
||||||
|
return {
|
||||||
|
source: 'kg',
|
||||||
|
list,
|
||||||
|
limit,
|
||||||
|
page,
|
||||||
|
total: body.total,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取歌手歌曲列表
|
||||||
|
* @param {*} id
|
||||||
|
* @param {*} page
|
||||||
|
* @param {*} limit
|
||||||
|
*/
|
||||||
|
async getSongList(id, page = 1, limit = 100) {
|
||||||
|
if (id == 0) throw new Error('歌手不存在')
|
||||||
|
const body = await createHttpFetch(`http://mobiles.kugou.com/api/v5/singer/song?singerid=${id}&page=${page}&pagesize=${limit}`)
|
||||||
|
if (!body.info) throw new Error('get singer song list faild.')
|
||||||
|
|
||||||
|
const list = await getMusicInfosByList(body.info)
|
||||||
|
return {
|
||||||
|
source: 'kg',
|
||||||
|
list,
|
||||||
|
limit,
|
||||||
|
page,
|
||||||
|
total: body.total,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filterAlbumList(raw) {
|
||||||
|
return raw.map(item => {
|
||||||
|
return {
|
||||||
|
id: item.albumid,
|
||||||
|
count: item.songcount,
|
||||||
|
info: {
|
||||||
|
name: item.albumname,
|
||||||
|
author: item.singername,
|
||||||
|
img: item.replaceAll('{size}', '480'),
|
||||||
|
desc: item.intro,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
149
src/renderer/utils/musicSdk/wy/singer.js
Normal file
149
src/renderer/utils/musicSdk/wy/singer.js
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
import { createEapiFetch } from './utils/index'
|
||||||
|
import { formatPlayTime, sizeFormate } from '../../index'
|
||||||
|
import { formatSingerName } from '../utils'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
/**
|
||||||
|
* 获取歌手信息
|
||||||
|
* @param {*} id
|
||||||
|
*/
|
||||||
|
getInfo(id) {
|
||||||
|
return createEapiFetch('/api/artist/head/info/get', { id }).then(body => {
|
||||||
|
if (!body) throw new Error("get singer info faild.")
|
||||||
|
return {
|
||||||
|
source: 'wy',
|
||||||
|
id: body.artist.id,
|
||||||
|
info: {
|
||||||
|
name: body.artist.name,
|
||||||
|
desc: body.artist.briefDesc,
|
||||||
|
avatar: body.user.avatarUrl,
|
||||||
|
gender: body.user.gender === 1 ? '1' : '2',
|
||||||
|
},
|
||||||
|
count: {
|
||||||
|
music: body.artist.musicSize,
|
||||||
|
album: body.artist.albumSize,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取歌手歌曲列表
|
||||||
|
* @param {*} id
|
||||||
|
* @param {*} page
|
||||||
|
* @param {*} limit
|
||||||
|
*/
|
||||||
|
getSongList(id, page = 1, limit = 100) {
|
||||||
|
if (page === 1) page = 0
|
||||||
|
return createEapiFetch('/api/v2/artist/songs', {
|
||||||
|
id,
|
||||||
|
limit,
|
||||||
|
offset: limit * page
|
||||||
|
}).then(body => {
|
||||||
|
if (!body.songs) throw new Error("get singer songs faild.")
|
||||||
|
|
||||||
|
const list = this.filterSongList(body.songs)
|
||||||
|
return {
|
||||||
|
list,
|
||||||
|
limit,
|
||||||
|
page,
|
||||||
|
total: body.total,
|
||||||
|
source: 'wy',
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取歌手专辑列表
|
||||||
|
* @param {*} id
|
||||||
|
* @param {*} page
|
||||||
|
* @param {*} limit
|
||||||
|
*/
|
||||||
|
getAlbumList(id, page = 1, limit = 10) {
|
||||||
|
if (page === 1) page = 0
|
||||||
|
return createEapiFetch(`/api/artist/albums/${id}`, {
|
||||||
|
limit,
|
||||||
|
offset: limit * page
|
||||||
|
}).then(body => {
|
||||||
|
if (!body.hotAlbums) throw new Error("get singer songs faild.")
|
||||||
|
|
||||||
|
const list = this.filterAlbumList(body.hotAlbums)
|
||||||
|
return {
|
||||||
|
source: 'wy',
|
||||||
|
list,
|
||||||
|
limit,
|
||||||
|
page,
|
||||||
|
total: body.artist.albumSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
filterAlbumList(raw) {
|
||||||
|
const list = []
|
||||||
|
raw.forEach(item => {
|
||||||
|
if (!item.id) return
|
||||||
|
list.push({
|
||||||
|
id: item.id,
|
||||||
|
count: item.size,
|
||||||
|
info: {
|
||||||
|
name: item.name,
|
||||||
|
author: formatSingerName(item.artists),
|
||||||
|
img: item.picUrl,
|
||||||
|
desc: null,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return list
|
||||||
|
},
|
||||||
|
filterSongList(raw) {
|
||||||
|
const list = []
|
||||||
|
raw.forEach(item => {
|
||||||
|
if (!item.id) return
|
||||||
|
|
||||||
|
const types = []
|
||||||
|
const _types = {}
|
||||||
|
item.privilege.chargeInfoList.forEach(i => {
|
||||||
|
switch (i.rate) {
|
||||||
|
case 128000:
|
||||||
|
size = item.lMusic ? sizeFormate(item.lMusic.size) : null
|
||||||
|
types.push({ type: '128k', size })
|
||||||
|
_types['128k'] = {
|
||||||
|
size,
|
||||||
|
}
|
||||||
|
case 320000:
|
||||||
|
size = item.hMusic ? sizeFormate(item.hMusic.size) : null
|
||||||
|
types.push({ type: '320k', size })
|
||||||
|
_types['320k'] = {
|
||||||
|
size,
|
||||||
|
}
|
||||||
|
case 999000:
|
||||||
|
size = item.sqMusic ? sizeFormate(item.sqMusic.size) : null
|
||||||
|
types.push({ type: 'flac', size })
|
||||||
|
_typesflac = {
|
||||||
|
size,
|
||||||
|
}
|
||||||
|
case 1999000:
|
||||||
|
size = item.hrMusic ? sizeFormate(item.hrMusic.size) : null
|
||||||
|
types.push({ type: 'flac24bit', size })
|
||||||
|
_types.flac24bit = {
|
||||||
|
size,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
list.push({
|
||||||
|
singer: formatSingerName(item.artists),
|
||||||
|
name: item.name,
|
||||||
|
albumName: item.album.name,
|
||||||
|
albumId: item.album.id,
|
||||||
|
songmid: item.id,
|
||||||
|
source: 'wy',
|
||||||
|
interval: formatPlayTime(item.duration),
|
||||||
|
img: null,
|
||||||
|
lrc: null,
|
||||||
|
otherSource: null,
|
||||||
|
types,
|
||||||
|
_types,
|
||||||
|
typeUrl: {},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return list
|
||||||
|
},
|
||||||
|
}
|
||||||
@ -1,6 +1,17 @@
|
|||||||
import { httpFetch } from '../../../request'
|
import { httpFetch } from '../../../request'
|
||||||
import { eapi } from './crypto'
|
import { eapi } from './crypto'
|
||||||
|
|
||||||
|
const buildEapiRequest = (formData) => {
|
||||||
|
return httpFetch('http://interface.music.163.com/eapi/batch', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36',
|
||||||
|
origin: 'https://music.163.com',
|
||||||
|
},
|
||||||
|
form: formData,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export const eapiRequest = (url, data) => {
|
export const eapiRequest = (url, data) => {
|
||||||
return httpFetch('http://interface.music.163.com/eapi/batch', {
|
return httpFetch('http://interface.music.163.com/eapi/batch', {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@ -20,3 +31,26 @@ export const eapiRequest = (url, data) => {
|
|||||||
// })
|
// })
|
||||||
// return requestObj
|
// return requestObj
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建一个适用于WY的Eapi请求
|
||||||
|
* @param {*} url
|
||||||
|
* @param {*} options
|
||||||
|
* @param {*} retryNum
|
||||||
|
*/
|
||||||
|
export const createEapiFetch = async(url, data, retryNum = 0) => {
|
||||||
|
if (retryNum > 2) throw new Error('try max num')
|
||||||
|
const formData = eapi(url, data)
|
||||||
|
|
||||||
|
let result
|
||||||
|
try {
|
||||||
|
result = await buildEapiRequest(formData).promise
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
return createEapiFetch(url, data, ++retryNum)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.statusCode !== 200 || result.body.code != 200) return createEapiFetch(url, data, ++retryNum)
|
||||||
|
if (result.body.data) return result.body.data
|
||||||
|
return result.body
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user