Reflect the changes in main.go.
This commit is contained in:
parent
e8e3570a8f
commit
a7d91dc92e
@ -4,7 +4,6 @@ import (
|
|||||||
"dwelling-radio/internal/configuration"
|
"dwelling-radio/internal/configuration"
|
||||||
"dwelling-radio/internal/handlers"
|
"dwelling-radio/internal/handlers"
|
||||||
"dwelling-radio/internal/radio"
|
"dwelling-radio/internal/radio"
|
||||||
"dwelling-radio/internal/radio/liquidsoap"
|
|
||||||
"dwelling-radio/pkg/logging"
|
"dwelling-radio/pkg/logging"
|
||||||
"dwelling-radio/pkg/server"
|
"dwelling-radio/pkg/server"
|
||||||
"errors"
|
"errors"
|
||||||
@ -67,15 +66,15 @@ func main() {
|
|||||||
srv.GET("/playlist", hand.Playlist)
|
srv.GET("/playlist", hand.Playlist)
|
||||||
|
|
||||||
if !*noLiquidsoap {
|
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 {
|
if err != nil {
|
||||||
logErr.Fatalln("liquidsoap:", err)
|
logErr.Fatalln("liquidsoap:", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
if err := liquid.Stop(); err != nil {
|
if err := liquid.Stop(); err != nil {
|
||||||
if !errors.Is(err, liquidsoap.ErrNotRunning) {
|
if !errors.Is(err, radio.ErrLiquidsoapNotRunning) {
|
||||||
logErr.Println("liquidsoap:", err)
|
logErr.Println(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
Loading…
Reference in New Issue
Block a user