mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
chore(deps): upgrade major server dependencies
This commit is contained in:
+2
-3
@@ -62,7 +62,7 @@
|
|||||||
"geoip-lite": "^2.0.1",
|
"geoip-lite": "^2.0.1",
|
||||||
"jose": "^6.2.2",
|
"jose": "^6.2.2",
|
||||||
"ms": "^2.1.3",
|
"ms": "^2.1.3",
|
||||||
"music-metadata": "^7.14.0",
|
"music-metadata": "^11.12.3",
|
||||||
"nestjs-pino": "^4.6.1",
|
"nestjs-pino": "^4.6.1",
|
||||||
"node-unrar-js": "^2.0.2",
|
"node-unrar-js": "^2.0.2",
|
||||||
"nodemailer": "^8.0.3",
|
"nodemailer": "^8.0.3",
|
||||||
@@ -87,11 +87,10 @@
|
|||||||
"@swc/cli": "^0.8.0",
|
"@swc/cli": "^0.8.0",
|
||||||
"@swc/core": "^1.15.21",
|
"@swc/core": "^1.15.21",
|
||||||
"@types/bcrypt": "^6.0.0",
|
"@types/bcrypt": "^6.0.0",
|
||||||
"@types/bcryptjs": "^3.0.0",
|
|
||||||
"@types/express": "^5.0.6",
|
"@types/express": "^5.0.6",
|
||||||
"@types/geoip-lite": "^1.4.4",
|
"@types/geoip-lite": "^1.4.4",
|
||||||
"@types/node": "^25.5.0",
|
"@types/node": "^25.5.0",
|
||||||
"@types/nodemailer": "^7.0.11",
|
"@types/nodemailer": "^6.4.23",
|
||||||
"@types/passport-jwt": "^4.0.1",
|
"@types/passport-jwt": "^4.0.1",
|
||||||
"@types/pg": "^8.18.0",
|
"@types/pg": "^8.18.0",
|
||||||
"@types/supertest": "^7.2.0",
|
"@types/supertest": "^7.2.0",
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export async function extractAudioMetadata(absolutePath: string): Promise<AudioE
|
|||||||
|
|
||||||
const publisher = common.label?.[0] ?? null;
|
const publisher = common.label?.[0] ?? null;
|
||||||
const publishedYear = common.year ?? null;
|
const publishedYear = common.year ?? null;
|
||||||
const description = common.comment?.[0] ?? null;
|
const description = extractCommentText(common.comment as unknown);
|
||||||
const language = common.language ?? null;
|
const language = common.language ?? null;
|
||||||
|
|
||||||
const durationSeconds = format.duration !== undefined ? Math.round(format.duration) : null;
|
const durationSeconds = format.duration !== undefined ? Math.round(format.duration) : null;
|
||||||
@@ -101,3 +101,19 @@ function splitArtists(raw: string): string[] {
|
|||||||
.map((s) => s.trim())
|
.map((s) => s.trim())
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function extractCommentText(rawComments: unknown): string | null {
|
||||||
|
if (!Array.isArray(rawComments)) return null;
|
||||||
|
|
||||||
|
for (const comment of rawComments) {
|
||||||
|
if (typeof comment === 'string' && comment.trim().length > 0) {
|
||||||
|
return comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof comment === 'object' && comment !== null && 'text' in comment && typeof comment.text === 'string' && comment.text.trim().length > 0) {
|
||||||
|
return comment.text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user