line endings switch, and add missed stubs / go.mod update
This commit is contained in:
@@ -5,11 +5,19 @@ package backend
|
|||||||
import "errors"
|
import "errors"
|
||||||
|
|
||||||
type SMTCPlaybackState int
|
type SMTCPlaybackState int
|
||||||
|
type SMTCButton int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SMTCPlaybackStateStopped SMTCPlaybackState = 0
|
// constants from smtc.h in github.com/supersonic-app/smtc-dll
|
||||||
SMTCPlaybackStatePlaying SMTCPlaybackState = 1
|
SMTCPlaybackStateStopped SMTCPlaybackState = 2
|
||||||
SMTCPlaybackStatePaused SMTCPlaybackState = 2
|
SMTCPlaybackStatePlaying SMTCPlaybackState = 3
|
||||||
|
SMTCPlaybackStatePaused SMTCPlaybackState = 4
|
||||||
|
|
||||||
|
SMTCButtonPlay SMTCButton = 0
|
||||||
|
SMTCButtonPause SMTCButton = 1
|
||||||
|
SMTCButtonStop SMTCButton = 2
|
||||||
|
SMTCButtonPrevious SMTCButton = 4
|
||||||
|
SMTCButtonNext SMTCButton = 5
|
||||||
)
|
)
|
||||||
|
|
||||||
type SMTC struct{}
|
type SMTC struct{}
|
||||||
@@ -20,6 +28,12 @@ func InitSMTCForWindow(hwnd uintptr) (*SMTC, error) {
|
|||||||
return nil, smtcUnsupportedErr
|
return nil, smtcUnsupportedErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *SMTC) OnButtonPressed(func(SMTCButton)) {}
|
||||||
|
|
||||||
|
func (s *SMTC) OnSeek(f func(millis int)) {}
|
||||||
|
|
||||||
|
func (s *SMTC) Shutdown() {}
|
||||||
|
|
||||||
func (s *SMTC) UpdatePlaybackState(state SMTCPlaybackState) error {
|
func (s *SMTC) UpdatePlaybackState(state SMTCPlaybackState) error {
|
||||||
return smtcUnsupportedErr
|
return smtcUnsupportedErr
|
||||||
}
|
}
|
||||||
@@ -28,5 +42,6 @@ func (s *SMTC) UpdateMetadata(title, artist string) error {
|
|||||||
return smtcUnsupportedErr
|
return smtcUnsupportedErr
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SMTC) Shutdown() {
|
func (s *SMTC) UpdatePosition(positionMillis, durationMillis int) error {
|
||||||
|
return smtcUnsupportedErr
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ require (
|
|||||||
github.com/supersonic-app/go-subsonic v0.0.0-20241224013245-9b2841f3711d
|
github.com/supersonic-app/go-subsonic v0.0.0-20241224013245-9b2841f3711d
|
||||||
github.com/zalando/go-keyring v0.2.1
|
github.com/zalando/go-keyring v0.2.1
|
||||||
golang.org/x/net v0.25.0
|
golang.org/x/net v0.25.0
|
||||||
|
golang.org/x/sys v0.20.0
|
||||||
golang.org/x/text v0.16.0
|
golang.org/x/text v0.16.0
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -50,7 +51,6 @@ require (
|
|||||||
github.com/yuin/goldmark v1.7.1 // indirect
|
github.com/yuin/goldmark v1.7.1 // indirect
|
||||||
golang.org/x/image v0.18.0 // indirect
|
golang.org/x/image v0.18.0 // indirect
|
||||||
golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a // indirect
|
golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a // indirect
|
||||||
golang.org/x/sys v0.20.0 // indirect
|
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user