Skip to content

fix: timelapse download robustness + device-switch + open-folder - #656

Merged
SukiSunYuhang merged 1 commit into
Snapmaker:feature_wcp_downloadfilesfrom
SukiSunYuhang:feature_wcp_downloadfiles
Aug 3, 2026
Merged

fix: timelapse download robustness + device-switch + open-folder#656
SukiSunYuhang merged 1 commit into
Snapmaker:feature_wcp_downloadfilesfrom
SukiSunYuhang:feature_wcp_downloadfiles

Conversation

@SukiSunYuhang

@SukiSunYuhang SukiSunYuhang commented Aug 3, 2026

Copy link
Copy Markdown

Description

fix:

  • Invalid download path (e.g. USB removed): bail out before downloading instead of crashing on file write
  • Cancel still completes: WAN cancel now erases g_wan_pending and the deferred sw_NotifyUploadTimelaspe kickoff checks skipped_indices, so a cancelled file can't be restarted; cancel callback runs cancel_download immediately (no CallAfter window)
  • Delete a downloading file: sw_DeleteCameraTimelapse aborts the matching PC download by date_index
  • Progress regression on weak network: on_progress percent is monotonic (no backward jump from dlnow fluctuation)
  • Device switch (sw_mqtt_set_engine): cancel_all_active_timelapse stops every in-flight download and marks each unfinished file as "Download Failed"; on_error skipped branch skips mark when ctx->cancelled so the failed state isn't overridden by "cancelled"
  • New sw_OpenTimelapseFolder interface + desktop_open_folder helper: open the containing folder even when the file was deleted externally (sw_FileView kept unchanged for other callers)

- Invalid download path (e.g. USB removed): bail out before downloading
  instead of crashing on file write
- Cancel still completes: WAN cancel now erases g_wan_pending and the
  deferred sw_NotifyUploadTimelaspe kickoff checks skipped_indices, so a
  cancelled file can't be restarted; cancel callback runs cancel_download
  immediately (no CallAfter window)
- Delete a downloading file: sw_DeleteCameraTimelapse aborts the matching
  PC download by date_index
- Progress regression on weak network: on_progress percent is monotonic
  (no backward jump from dlnow fluctuation)
- Device switch (sw_mqtt_set_engine): cancel_all_active_timelapse stops
  every in-flight download and marks each unfinished file as "Download
  Failed"; on_error skipped branch skips mark when ctx->cancelled so the
  failed state isn't overridden by "cancelled"
- New sw_OpenTimelapseFolder interface + desktop_open_folder helper: open
  the containing folder even when the file was deleted externally
  (sw_FileView kept unchanged for other callers)
@SukiSunYuhang
SukiSunYuhang merged commit 4243b6e into Snapmaker:feature_wcp_downloadfiles Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant