We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da8d551 commit fb89defCopy full SHA for fb89def
internal/tui/player/manager.go
@@ -9,6 +9,7 @@ import (
9
"path/filepath"
10
"runtime"
11
"sync"
12
+ "syscall"
13
"time"
14
15
"github.com/LukeHagar/plexgo/models/operations"
@@ -260,6 +261,17 @@ func (pm *PlayerManager) ensureMpv() error {
260
261
262
func (pm *PlayerManager) socketExists() bool {
263
if runtime.GOOS == "windows" {
264
+ _, err := os.OpenFile(pm.socketPath, os.O_RDWR, 0)
265
+ if err != nil {
266
+ if pe, ok := err.(*os.PathError); ok {
267
+ if errno, ok := pe.Err.(syscall.Errno); ok {
268
+ if errno == 2 {
269
+ return false
270
+ }
271
272
273
+ return true
274
275
return true // Named pipes are harder to stat, let dialing handle it
276
}
277
_, err := os.Stat(pm.socketPath)
0 commit comments