feat(DM+SdDDL): sequential full-season download queue, fix close crash, return true

- DM: add dl_missing_* fields to AppCtx for sequential queue
- DM player: count_missing_in_season, find_next_missing, download_episode, download_missing_season_start/next
- DM main onResult: auto-continue queue when dl_missing_active, updates status DL X/Y, finishes with done ok/fail
- SdDownloader: file exists returns true (Already on SD) with total=file size, not false
- SdDownloader: set_result_and_close minimal bundle (only success bool) to avoid internal heap OOM crash on close
- SdDownloader: Cancel button becomes Close after done, calls tt_app_stop() directly (manual close per request, auto-close unreliable)
- Fixes crash on close observed in demo mode (file exists) and after download done

Tested on 192.168.68.133: SdDownloader shows Already on SD + Close, DM shows S10 5/6 after sequential, no crash on open/close cycles
This commit is contained in:
Adolfo
2026-07-25 22:49:28 -04:00
parent 3778cb3399
commit eaccebc95d
5 changed files with 157 additions and 27 deletions
@@ -90,6 +90,13 @@ typedef struct {
// External downloader integration (SdDownloader)
int pending_dl_idx;
// Full season download queue (sequential single-file to avoid batch crash)
bool dl_missing_active;
int dl_missing_season;
int dl_missing_total;
int dl_missing_done;
int dl_missing_failed;
} AppCtx;
extern AppCtx G;