feat: add task cancellation support

- Add CancelTask function to cancel running/waiting tasks
- Add /api/cancelTask endpoint
- Add cancel button in task list for running/waiting tasks
- Check cancellation status during download and merge operations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-07 16:40:27 +08:00
parent 1b23d813a8
commit 81df437b2c
5 changed files with 106 additions and 10 deletions
+1
View File
@@ -28,6 +28,7 @@ func API() *http.ServeMux {
router.HandleFunc("/quit", quit)
router.HandleFunc("/getPopularVideos", getPopularVideos)
router.HandleFunc("/deleteTask", deleteTask)
router.HandleFunc("/cancelTask", cancelTask)
router.HandleFunc("/getRedirectedLocation", getRedirectedLocation)
router.HandleFunc("/downloadVideo", downloadVideo)
router.HandleFunc("/getSeasonsArchivesListFirstBvid", getSeasonsArchivesListFirstBvid)