1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Check youtube-dl and ffmpeg dependencies before loading configuration

This commit is contained in:
Maksym Pavlenko
2019-11-15 11:45:23 -08:00
parent 9cca09d8bb
commit 354795e1e3

View File

@ -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)