straw/app
Justin L dc5c5b6604 Fix download resume corruption when server returns HTTP 200
When resuming a download after interruption, if the server returns
HTTP 200 (full resource) instead of HTTP 206 (partial content), the
code correctly resets mMission.done but fails to reset the 'start'
variable. This causes the subsequent file seek to use a stale offset,
writing new data at incorrect positions.

This bug causes file corruption for large downloads (>5GB) that are
interrupted and resumed, particularly when:
- Switching between WiFi networks
- Server CDN returning different responses
- Connection drops during long downloads

The corruption manifests as duplicate data regions in the file,
which for MP4 downloads results in multiple MOOV atoms and
broken seek functionality.

Fix: Reset start=0 when HTTP 200 is received, ensuring the file
write position correctly restarts from the beginning of the current
resource.

(cherry picked from commit 08008ca6f9)
2026-01-08 19:07:09 -08:00
..
sampledata Larger channel cards in search results 2023-02-09 06:15:22 +05:30
schemas/org.schabi.newpipe.database.AppDatabase Migrate database logic to Kotlin 2025-11-03 16:14:29 +08:00
src Fix download resume corruption when server returns HTTP 200 2026-01-08 19:07:09 -08:00
build.gradle.kts Prepare for version 0.28.1 (1006) 2026-01-03 11:55:59 +01:00
proguard-rules.pro Update NewPipe Extractor and add new proguard rules 2025-05-07 12:50:37 +02:00