Skip to content

[FEATURE] Implement Pause and Resume for downloads #2

@ted-devs

Description

@ted-devs

Description:
Currently, the downloader only supports "Start" and "Cancel." If a user needs to stop a download temporarily (e.g., switching from Wi-Fi to Data), they have to cancel the download and lose all progress. We need to implement a Pause/Resume mechanism to improve the user experience for large game files.

Proposed Functionality:

  • Add a Pause button to active downloads in the DownloadsScreen.
  • Add a Resume button for tasks with a "Paused" status.
  • Support for "Partial Downloads" so that the app only downloads the remaining bytes instead of restarting from zero.

Technical Requirements:

  1. HTTP Range Support: Use the Range header in Dio (e.g., Range: bytes=start-).
  2. State Management: Update DownloadStatus enum to include a paused state.
  3. File Management: Instead of overwriting files, the downloader must append data to the existing .pkg file in the temporary directory.
  4. Persistence: The current byte count must be saved so the app knows where to resume after a restart.

Constraints:

  • We must verify if the NPS servers support the Accept-Ranges header (most modern CDNs do).
  • Decryption should only trigger once the full file is verified.

Category: Feature Request / Enhancement
Priority: High (Essential for large 1GB+ titles)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions