Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
e5f6becf97 | |||
86c9dc0cc5 | |||
e425b08ef8 |
@ -23,6 +23,12 @@ func LoadFile(socket string, file string, flags LoadFileFlag) error {
|
|||||||
return err
|
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 {
|
func Quit(socket string) error {
|
||||||
cmd := &Command{Command: []interface{}{"quit"}}
|
cmd := &Command{Command: []interface{}{"quit"}}
|
||||||
_, err := SendCommand[any](socket, cmd)
|
_, err := SendCommand[any](socket, cmd)
|
||||||
|
24
props_get.go
24
props_get.go
@ -9,11 +9,11 @@ func GetDisplayNames(socket string) ([]string, error) {
|
|||||||
return GetProperty[[]string](socket, "display-names")
|
return GetProperty[[]string](socket, "display-names")
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsFullscreen(socket string) (bool, error) {
|
func GetFullscreen(socket string) (bool, error) {
|
||||||
return GetProperty[bool](socket, "fullscreen")
|
return GetProperty[bool](socket, "fullscreen")
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsPaused(socket string) (bool, error) {
|
func GetPaused(socket string) (bool, error) {
|
||||||
return GetProperty[bool](socket, "pause")
|
return GetProperty[bool](socket, "pause")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,10 +53,6 @@ func GetPlaylist(socket string) ([]PlaylistEntry, error) {
|
|||||||
return GetProperty[[]PlaylistEntry](socket, "playlist")
|
return GetProperty[[]PlaylistEntry](socket, "playlist")
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetPause(socket string) (bool, error) {
|
|
||||||
return GetProperty[bool](socket, "pause")
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetPlaylistPosition(socket string) (int, error) {
|
func GetPlaylistPosition(socket string) (int, error) {
|
||||||
return GetProperty[int](socket, "playlist-pos")
|
return GetProperty[int](socket, "playlist-pos")
|
||||||
}
|
}
|
||||||
@ -101,7 +97,7 @@ func GetTimeRemaining(socket string) (time.Duration, error) {
|
|||||||
return time.Duration(durationInSeconds * float64(time.Second)), nil
|
return time.Duration(durationInSeconds * float64(time.Second)), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsSeeking(socket string) (bool, error) {
|
func GetSeeking(socket string) (bool, error) {
|
||||||
return GetProperty[bool](socket, "seeking")
|
return GetProperty[bool](socket, "seeking")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,18 +141,26 @@ func GetChapterList(socket string) ([]Chapter, error) {
|
|||||||
return GetProperty[[]Chapter](socket, "chapter-list")
|
return GetProperty[[]Chapter](socket, "chapter-list")
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsSeekable(socket string) (bool, error) {
|
func GetSeekable(socket string) (bool, error) {
|
||||||
return GetProperty[bool](socket, "seekable")
|
return GetProperty[bool](socket, "seekable")
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsPartiallySeekable(socket string) (bool, error) {
|
func GetPartiallySeekable(socket string) (bool, error) {
|
||||||
return GetProperty[bool](socket, "partially-seekable")
|
return GetProperty[bool](socket, "partially-seekable")
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsPlaybackAborted(socket string) (bool, error) {
|
func GetPlaybackAborted(socket string) (bool, error) {
|
||||||
return GetProperty[bool](socket, "playback-abort")
|
return GetProperty[bool](socket, "playback-abort")
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetPropertyList(socket string) ([]string, error) {
|
func GetPropertyList(socket string) ([]string, error) {
|
||||||
return GetProperty[[]string](socket, "property-list")
|
return GetProperty[[]string](socket, "property-list")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetLoopFile(socket string) (bool, error) {
|
||||||
|
return GetProperty[bool](socket, "loop-file")
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetLoopPlaylist(socket string) (bool, error) {
|
||||||
|
return GetProperty[bool](socket, "loop-playlist")
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user