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/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)
} }
} }
}() }()