fix: check file info without download all file
Déploiement FRONT PROD / check (push) Successful in 2m0s
Déploiement FRONT PROD / deploy (push) Successful in 20s

This commit is contained in:
2026-06-01 00:28:11 +04:00
parent 9f8e60d56f
commit cb37979fc4
+5 -1
View File
@@ -78,7 +78,11 @@ export default function FilesList({files}) {
await Promise.all( await Promise.all(
audioFiles.map(async file => { audioFiles.map(async file => {
try { try {
const meta = await mm.fetchFromUrl(`${apiUrl}${file.url}`, {skipCovers: true}) const response = await fetch(`${apiUrl}${file.url}`, {
headers: {Range: 'bytes=0-262143'},
})
const buffer = await response.arrayBuffer()
const meta = await mm.parseBuffer(new Uint8Array(buffer), {mimeType: file.mime, skipCovers: true})
results[file.id] = meta.format results[file.id] = meta.format
} catch { } catch {
results[file.id] = null results[file.id] = null