diff --git a/cmd/podsync/main.go b/cmd/podsync/main.go index 9f80e9d..8cb30c7 100644 --- a/cmd/podsync/main.go +++ b/cmd/podsync/main.go @@ -73,6 +73,11 @@ func main() { "date": date, }).Info("running podsync") + downloader, err := ytdl.New(ctx) + if err != nil { + log.WithError(err).Fatal("youtube-dl error") + } + // Load TOML file log.Debugf("loading configuration %q", opts.ConfigPath) cfg, err := config.LoadConfig(opts.ConfigPath) @@ -80,11 +85,6 @@ func main() { log.WithError(err).Fatal("failed to load configuration file") } - downloader, err := ytdl.New(ctx) - if err != nil { - log.WithError(err).Fatal("youtube-dl error") - } - // Queue of feeds to update updates := make(chan *config.Feed, 16) defer close(updates)