From cb37979fc492b9e4095e06a0bd46106a8c87ea50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Mon, 1 Jun 2026 00:28:11 +0400 Subject: [PATCH] fix: check file info without download all file --- components/files/files-list.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/files/files-list.js b/components/files/files-list.js index 26af1b7..a115cb3 100644 --- a/components/files/files-list.js +++ b/components/files/files-list.js @@ -78,7 +78,11 @@ export default function FilesList({files}) { await Promise.all( audioFiles.map(async file => { 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 } catch { results[file.id] = null