Skip to content

Implement resume support for video downloads#3220

Open
kikoso wants to merge 1 commit intofuto-org:masterfrom
kikoso:master
Open

Implement resume support for video downloads#3220
kikoso wants to merge 1 commit intofuto-org:masterfrom
kikoso:master

Conversation

@kikoso
Copy link
Copy Markdown

@kikoso kikoso commented Mar 27, 2026

This pull request introduces the ability to resume interrupted or cancelled video downloads instead of forcing them to start from scratch. Previously, whenever a download failed or was manually stopped, the app would automatically delete the remaining partial video and audio files from the disk. With these changes, partial files are now retained on the filesystem, and the byte-range download logic has been updated to check the existing file length and seamlessly append new data using the correct initial read offset.

Under the hood, VideoDownload now utilizes an appending FileOutputStream when resuming a byte-range download, allowing it to gracefully skip the chunks that have already been saved. Additionally, the cleanupDownloads routine in StateDownloads has been patched to recognize actively downloading (or paused) files as "valid." This fix makes sure that the app's internal storage cleanup sweeps do not accidentally delete incomplete files before the user has a chance to resume their download.

2026-03-30.13.47.56.mp4

@futo-cla-pr-labler
Copy link
Copy Markdown

Please sign our contributor license agreement at https://cla.futo.org

@futo-cla-pr-labler
Copy link
Copy Markdown

Please sign our contributor license agreement at https://cla.futo.org

@kikoso kikoso marked this pull request as ready for review March 30, 2026 12:11
@Zvonimir-FUTO Zvonimir-FUTO added Enhancement New feature or request Downloads labels Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants