mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-04 04:26:38 +08:00
feat: add STRM output directory presets
This commit is contained in:
@@ -134,6 +134,17 @@ type repairSTRMReq struct {
|
||||
RefreshLibrary bool `json:"refresh_library"`
|
||||
}
|
||||
|
||||
func listSTRMOutputPresetsHandler(svc *service.Container) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
items, err := service.STRMOutputPresets(c.Request.Context(), svc.Repo)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{"items": items})
|
||||
}
|
||||
}
|
||||
|
||||
func generateSTRMHandler(svc *service.Container) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
var req generateSTRMReq
|
||||
|
||||
Reference in New Issue
Block a user