line endings switch, and add missed stubs / go.mod update

This commit is contained in:
Drew Weymouth
2025-01-15 17:49:36 -08:00
parent cb01703776
commit 7f3895975e
4 changed files with 223 additions and 208 deletions
+19 -4
View File
@@ -5,11 +5,19 @@ package backend
import "errors"
type SMTCPlaybackState int
type SMTCButton int
const (
SMTCPlaybackStateStopped SMTCPlaybackState = 0
SMTCPlaybackStatePlaying SMTCPlaybackState = 1
SMTCPlaybackStatePaused SMTCPlaybackState = 2
// constants from smtc.h in github.com/supersonic-app/smtc-dll
SMTCPlaybackStateStopped 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{}
@@ -20,6 +28,12 @@ func InitSMTCForWindow(hwnd uintptr) (*SMTC, error) {
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 {
return smtcUnsupportedErr
}
@@ -28,5 +42,6 @@ func (s *SMTC) UpdateMetadata(title, artist string) error {
return smtcUnsupportedErr
}
func (s *SMTC) Shutdown() {
func (s *SMTC) UpdatePosition(positionMillis, durationMillis int) error {
return smtcUnsupportedErr
}
+1 -1
View File
@@ -20,6 +20,7 @@ require (
github.com/supersonic-app/go-subsonic v0.0.0-20241224013245-9b2841f3711d
github.com/zalando/go-keyring v0.2.1
golang.org/x/net v0.25.0
golang.org/x/sys v0.20.0
golang.org/x/text v0.16.0
)
@@ -50,7 +51,6 @@ require (
github.com/yuin/goldmark v1.7.1 // indirect
golang.org/x/image v0.18.0 // 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
)