From da66c2fdf93c2dd7cf0b08c358031902125da459 Mon Sep 17 00:00:00 2001 From: speatzle Date: Thu, 9 May 2024 20:05:56 +0200 Subject: [PATCH] add config tempdir and default values --- config/config.go | 1 + main.go | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/config/config.go b/config/config.go index a09884c..44d8a30 100644 --- a/config/config.go +++ b/config/config.go @@ -13,6 +13,7 @@ type Server struct { type Worker struct { ID string + TempDir string Address string Name string FFmpegPath string diff --git a/main.go b/main.go index 13c67af..5eb7672 100644 --- a/main.go +++ b/main.go @@ -40,6 +40,14 @@ func main() { return } + if conf.Worker.FFmpegPath == "" { + conf.Worker.FFmpegPath = "ffmpeg" + } + + if conf.Worker.TempDir == "" { + conf.Worker.TempDir = "/tmp" + } + if *isserver { slog.Info("Starting Server...") server.Start(conf, templates, static, migrations)