bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Early return for Close on Windows

Signed-off-by: apkatsikas <apkatsikas@gmail.com>
This commit is contained in:
apkatsikas 2024-04-12 09:00:37 -04:00
parent bf29e59dad
commit 93bb3ce947
1 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,7 @@ package mpv
import (
"fmt"
"os"
"runtime"
"time"
"github.com/dexterlb/mpvipc"
@ -103,6 +104,11 @@ func (t *MpvTrack) Pause() {
}
func (t *MpvTrack) Close() {
// Windows automatically handles closing
// and cleaning up named pipe
if runtime.GOOS == "windows" {
return
}
log.Debug("Closing resources", "track", t)
t.CloseCalled = true
// trying to shutdown mpv process using socket