toggle
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/tag/woodpecker Pipeline failed

This commit is contained in:
abs3nt 2024-02-20 09:00:57 -08:00
parent bafaa8a941
commit 338bef9f75
Signed by: abs3nt
GPG Key ID: A7BD96A8BAB04C09

View File

@ -3,10 +3,10 @@ package commands
func (c *Commander) TogglePlay() error { func (c *Commander) TogglePlay() error {
state, err := c.Client().PlayerState(c.Context) state, err := c.Client().PlayerState(c.Context)
if err != nil { if err != nil {
return err return c.Play()
} }
if state.Playing { if state.Playing {
return c.Client().Pause(c.Context) return c.Pause()
} }
return c.Client().Play(c.Context) return c.Play()
} }