Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
e425b08ef8 | |||
f413f97824 |
@ -23,6 +23,12 @@ func LoadFile(socket string, file string, flags LoadFileFlag) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func ShufflePlaylist(socket string) error {
|
||||
cmd := &Command{Command: []interface{}{"playlist-shuffle"}}
|
||||
_, err := SendCommand[any](socket, cmd)
|
||||
return err
|
||||
}
|
||||
|
||||
func Quit(socket string) error {
|
||||
cmd := &Command{Command: []interface{}{"quit"}}
|
||||
_, err := SendCommand[any](socket, cmd)
|
||||
|
@ -57,6 +57,10 @@ func GetPause(socket string) (bool, error) {
|
||||
return GetProperty[bool](socket, "pause")
|
||||
}
|
||||
|
||||
func GetPlaylistPosition(socket string) (int, error) {
|
||||
return GetProperty[int](socket, "playlist-pos")
|
||||
}
|
||||
|
||||
func GetDuration(socket string) (time.Duration, error) {
|
||||
durationInSeconds, err := GetProperty[float64](socket, "duration")
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user