From 76d7ce6ccd47849085f475f5b9a20bba1bd3036c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sat, 29 Aug 2026 07:36:19 +0100 Subject: [PATCH] =?UTF-8?q?drop=20the=20temporary=20stream-range=20log=20?= =?UTF-8?q?=E2=80=94=20it=20found=20its=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 28 range requests per song start on iOS turned out to be AVPlayer paging through ~1 MB of embedded cover art in 32 KB round trips. The library has been slimmed (23,833 files rewritten, art capped at 80 KB, ID3v1 stripped); the log served its purpose. --- sidecar/stream-audio.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sidecar/stream-audio.ts b/sidecar/stream-audio.ts index a5cbe6a..7ae4034 100644 --- a/sidecar/stream-audio.ts +++ b/sidecar/stream-audio.ts @@ -54,13 +54,6 @@ export async function streamAudioFile( } if (!s.isFile()) return new Response('Not a file', { status: 404 }); - // TEMPORARY diagnostic (2026-08-29): iOS first-play issues ~28 range requests in 2 s where Android - // issues one. This prints each request range so we can see WHICH bytes AVPlayer asks for — small - // sequential chunks would mean a transport problem, scattered offsets a VBR duration scan. - console.log( - `[stream] ${new Date().toISOString().slice(11, 23)} ${rangeHeader ?? "FULL"} · ${relPath.slice(relPath.lastIndexOf("/") + 1)}`, - ); - const total = s.size; const ext = absPath.slice(absPath.lastIndexOf('.') + 1).toLowerCase(); const contentType = CONTENT_TYPES[ext] ?? 'application/octet-stream';