fix organize path mapping and task flow

This commit is contained in:
ShukeBta
2026-06-13 16:32:06 +08:00
parent 9070b4827c
commit 4e0929bbca
23 changed files with 1468 additions and 134 deletions
+7 -2
View File
@@ -18,9 +18,14 @@ func tasksHandler(svc *service.Container) gin.HandlerFunc {
return func(c *gin.Context) {
transcodes := svc.Transcoder.Active()
_, torrents, _ := svc.Downloads.List(c.Request.Context())
background := service.TaskSnapshot{}
if svc.Tasks != nil {
background = svc.Tasks.Snapshot()
}
c.JSON(http.StatusOK, gin.H{
"transcodes": transcodes,
"torrents": torrents,
"transcodes": transcodes,
"torrents": torrents,
"background_tasks": background,
})
}
}