Unexport SocketName, use socketName in NewTrack
This commit is contained in:
parent
e8a60428b7
commit
36568dc479
|
@ -4,6 +4,6 @@ package mpv
|
|||
|
||||
import "github.com/navidrome/navidrome/utils"
|
||||
|
||||
func SocketName(prefix, suffix string) string {
|
||||
func socketName(prefix, suffix string) string {
|
||||
return utils.TempFileName(prefix, suffix)
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func SocketName(prefix, suffix string) string {
|
||||
func socketName(prefix, suffix string) string {
|
||||
// Windows needs to use a named pipe for the socket
|
||||
// see https://mpv.io/manual/master#using-mpv-from-other-programs-or-scripts
|
||||
return filepath.Join(`\\.\pipe\mpvsocket`, prefix+uuid.NewString()+suffix)
|
||||
|
|
|
@ -13,7 +13,6 @@ import (
|
|||
"github.com/dexterlb/mpvipc"
|
||||
"github.com/navidrome/navidrome/log"
|
||||
"github.com/navidrome/navidrome/model"
|
||||
"github.com/navidrome/navidrome/utils"
|
||||
)
|
||||
|
||||
type MpvTrack struct {
|
||||
|
@ -32,7 +31,7 @@ func NewTrack(playbackDoneChannel chan bool, deviceName string, mf model.MediaFi
|
|||
return nil, err
|
||||
}
|
||||
|
||||
tmpSocketName := utils.TempFileName("mpv-ctrl-", ".socket")
|
||||
tmpSocketName := socketName("mpv-ctrl-", ".socket")
|
||||
|
||||
args := createMPVCommand(mpvComdTemplate, deviceName, mf.Path, tmpSocketName)
|
||||
exe, err := start(args)
|
||||
|
|
Loading…
Reference in New Issue