More foundations for clips

This commit is contained in:
Carl Pearson
2024-11-06 09:32:37 -07:00
parent 63d10c3e7a
commit caccba15d6
3 changed files with 63 additions and 4 deletions

View File

@@ -32,8 +32,8 @@ var ytdlpVideoOptions = []string{"-f", "bestaudio"}
type DisplayVideoClip struct {
TempURL
ID uint // VideoClip.ID
Start float64
Stop float64
Start string
Stop string
}
func registerHandler(c echo.Context) error {
@@ -882,8 +882,8 @@ func videoHandler(c echo.Context) error {
clipDisplays = append(clipDisplays, DisplayVideoClip{
TempURL: tempURL,
ID: clip.ID,
Start: float64(1000 * clip.StartMS),
Stop: float64(1000 * clip.StopMS),
Start: fmt.Sprintf("%.2f", float64(1000*clip.StartMS)),
Stop: fmt.Sprintf("%.2f", float64(1000*clip.StopMS)),
})
}