fix: restore SAF metadata fallback and preserve active transfers

Propagate filesystem errors from complete metadata reads so Android retries unreadable SAF descriptors through temporary files while accepting valid audio without tags.

Keep established segmented and chunked transfers outside the resolution allowance. Continue charging initial requests, retries, and progress callbacks, including during parallel native reads, while preserving stall cancellation.

Add metadata, transfer, and native fallback regression tests. Validated with Go tests, race detector, vet, Android tests, targeted Flutter tests, analyzer, and formatting checks.
This commit is contained in:
zarzet
2026-09-06 16:43:24 +07:00
parent 717e8967cd
commit 781661798b
9 changed files with 327 additions and 30 deletions
+4
View File
@@ -177,6 +177,10 @@ requests, URL resolution, retry waits, and refreshes, including HTTP headers
and the first audio byte. Native audio reads after the first byte and bounded
native FFmpeg conversion pause this clock; transfer stall limits and the
overall download timeout still apply. Progress callbacks do not reset it.
Within one native segmented or chunked download, a successfully received part
establishes the transfer: headers and the first byte of subsequent parts also
pause the clock. Retry attempts and waits still consume the allowance, and a
new native download call must establish its own transfer.
`options.resolutionTimeoutMs` reports the initial allowance, while
`utils.getResolutionRemainingMs()` reports the remaining allowance. Check for