diff --git a/server/task.go b/server/task.go index 65c670f..5964cd1 100644 --- a/server/task.go +++ b/server/task.go @@ -197,6 +197,10 @@ func createTask(ctx context.Context, r *http.Request) error { if err != nil { return fmt.Errorf("Parsing Task Type: %w", err) } + ffmpeg_command, err := strconv.Atoi(r.FormValue("ffmpeg_command")) + if err != nil { + return fmt.Errorf("Parsing FFmpeg Command: %w", err) + } slog.Info("Got Task Create", "library", library, "health", health, "type", typ) @@ -237,7 +241,7 @@ func createTask(ctx context.Context, r *http.Request) error { */ for _, file := range files { - _, err = db.Exec(r.Context(), "INSERT INTO tasks (file_id, type, status, data) VALUES ($1,$2,$3,$4)", file.ID, typ, constants.TASK_STATUS_QUEUED, data) + _, err = db.Exec(r.Context(), "INSERT INTO tasks (file_id, type, status, data, ffmpeg_command_id) VALUES ($1,$2,$3,$4,$5)", file.ID, typ, constants.TASK_STATUS_QUEUED, data, ffmpeg_command) if err != nil { return fmt.Errorf("Inserting Task: %w", err) }