fix(library): a listing poll can no longer put back an older resume point

A poll already out when the player closed answered with the point the server held before the
closing beacon, over the row's patch; Continue then opened there and wrote it back. The close now
cancels the listings' fetches before patching and reads them again once the beacon has landed.
This commit is contained in:
2026-10-07 23:16:25 +02:00
parent 0a35f2a3b1
commit 891dc628f3
4 changed files with 59 additions and 12 deletions
+9 -4
View File
@@ -299,11 +299,16 @@ export const downloadsApi = {
id: number,
positionSeconds: number,
durationSeconds: number,
onSettled?: () => void,
): void =>
beacon(`/api/downloads/${id}/progress`, {
position_seconds: Math.floor(positionSeconds),
duration_seconds: Math.floor(durationSeconds),
}),
beacon(
`/api/downloads/${id}/progress`,
{
position_seconds: Math.floor(positionSeconds),
duration_seconds: Math.floor(durationSeconds),
},
onSettled,
),
// A plain <a> navigation can't send the X-Siftlode-Account header, so pass the active
// account via ?account= (the server honours it only for an account in this browser's wallet) —
// otherwise the download resolves to the session-default account and 404s for a per-tab