Skip to content

[ENHANCEMENT] Implement Sequential Download Queue with Mandatory Cache Purge #3

@ted-devs

Description

@ted-devs

Description:
Currently, the application allows multiple downloads to run in parallel. To ensure stability and manage device storage effectively, we need to implement a sequential queuing system.

Critical Requirement: Cache Management
A key part of this queue is storage safety. Before the next item in the queue begins, the app must verify that the previous item's temporary cache (the .pkg file) has been completely deleted. This prevents "storage stacking" where multiple 1GB+ temporary files could fill up the user's internal memory before they have a chance to be decrypted and moved.

Proposed Behavior:

  1. User adds multiple games; they all enter a queued state.
  2. Item 1 begins downloading.
  3. Item 1 finishes downloading and starts decryption.
  4. Once decryption is complete, the Cache Purge triggers immediately for Item 1.
  5. Only after the cache is confirmed clear does Item 2 begin its download.

Benefits:

  • Storage Safety: Prevents the device from running out of space during bulk download sessions.
  • Stability: Avoids overloading the native decryption engine.
  • Bandwidth Efficiency: Focuses all speed on one file at a time.

Implementation Notes:

  • The finally block in the background service should signal the "Queue Manager" that it is safe to proceed to the next item.
  • Add a check to ensure tempDir is lean before starting a new download.

🤝 Acknowledgments
Special thanks to Talal Rajpoot (@mtr_zegamer) for his testing and feedback which led to the design of this sequential queuing and storage safety system.

Category: Performance / Storage Management
Priority: High

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions