1
0

Reflect the changes in main.go.

This commit is contained in:
Alexander Andreev 2022-09-19 01:33:52 +04:00
parent e8e3570a8f
commit a7d91dc92e
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -4,7 +4,6 @@ import (
"dwelling-radio/internal/configuration"
"dwelling-radio/internal/handlers"
"dwelling-radio/internal/radio"
"dwelling-radio/internal/radio/liquidsoap"
"dwelling-radio/pkg/logging"
"dwelling-radio/pkg/server"
"errors"
@ -67,15 +66,15 @@ func main() {
srv.GET("/playlist", hand.Playlist)
if !*noLiquidsoap {
liquid, err := liquidsoap.NewLiquidsoap(config.Liquidsoap.ExecPath, config.Liquidsoap.ScriptPath)
liquid, err := radio.NewLiquidsoap(config.Liquidsoap.ExecPath, config.Liquidsoap.ScriptPath)
if err != nil {
logErr.Fatalln("liquidsoap:", err)
}
defer func() {
if err := liquid.Stop(); err != nil {
if !errors.Is(err, liquidsoap.ErrNotRunning) {
logErr.Println("liquidsoap:", err)
if !errors.Is(err, radio.ErrLiquidsoapNotRunning) {
logErr.Println(err)
}
}
}()