bug(core/playback/mpv): jukebox mode under windows - navidrome#2767
Update function name Signed-off-by: apkatsikas <apkatsikas@gmail.com>
This commit is contained in:
parent
f3b54f0a34
commit
243b5296f8
|
@ -33,7 +33,7 @@ func NewTrack(playbackDoneChannel chan bool, deviceName string, mf model.MediaFi
|
|||
return nil, err
|
||||
}
|
||||
|
||||
tmpSocketName := utils.RandomSocketName("mpv-ctrl-", ".socket")
|
||||
tmpSocketName := utils.RandomSocketOrFileName("mpv-ctrl-", ".socket")
|
||||
|
||||
args := createMPVCommand(mpvComdTemplate, deviceName, mf.Path, tmpSocketName)
|
||||
exe, err := start(args)
|
||||
|
|
|
@ -181,7 +181,7 @@ var _ = Describe("Extractor", func() {
|
|||
// Only run permission tests if we are not root
|
||||
RegularUserContext("when run without root privileges", func() {
|
||||
BeforeEach(func() {
|
||||
accessForbiddenFile = utils.RandomSocketName("access_forbidden-", ".mp3")
|
||||
accessForbiddenFile = utils.RandomSocketOrFileName("access_forbidden-", ".mp3")
|
||||
|
||||
f, err := os.OpenFile(accessForbiddenFile, os.O_WRONLY|os.O_CREATE, 0222)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func RandomSocketName(prefix, suffix string) string {
|
||||
func RandomSocketOrFileName(prefix, suffix string) string {
|
||||
socketPath := os.TempDir()
|
||||
// Windows needs to use a named pipe instead of a file for the socket
|
||||
// see https://mpv.io/manual/master#using-mpv-from-other-programs-or-scripts
|
||||
|
|
Loading…
Reference in New Issue