diff --git a/handlers.go b/handlers.go index 03011fc..f5a04b2 100644 --- a/handlers.go +++ b/handlers.go @@ -756,18 +756,6 @@ func videoHandler(c echo.Context) error { }) } -func videoCancelHandler(c echo.Context) error { - id, _ := strconv.Atoi(c.Param("id")) - var video Video - if err := db.First(&video, id).Error; err != nil { - return c.Redirect(http.StatusSeeOther, "/videos") - } - - // Cancel the download (this is a simplified version, you might need to implement a more robust cancellation mechanism) - - return c.Redirect(http.StatusSeeOther, "/videos") -} - func videoRestartHandler(c echo.Context) error { id, _ := strconv.Atoi(c.Param("id")) var orig Original diff --git a/main.go b/main.go index 7f6a65c..3c01364 100644 --- a/main.go +++ b/main.go @@ -101,14 +101,13 @@ func main() { e.POST("/download", downloadPostHandler, authMiddleware) e.GET("/videos", videosHandler, authMiddleware) e.GET("/video/:id", videoHandler, authMiddleware) - e.POST("/video/:id/cancel", videoCancelHandler, authMiddleware) e.POST("/video/:id/restart", videoRestartHandler, authMiddleware) e.POST("/video/:id/delete", videoDeleteHandler, authMiddleware) + e.GET("/temp/:token", tempHandler) staticGroup := e.Group("/data") staticGroup.Use(authMiddleware) staticGroup.Static("/", getDataDir()) - e.GET("/temp/:token", tempHandler) secure := getSecure() diff --git a/templates/videos.html b/templates/videos.html index cac8fb1..bb3eea0 100644 --- a/templates/videos.html +++ b/templates/videos.html @@ -66,9 +66,6 @@ {{else if eq .Status "downloading"}} -
- -
{{end}}