better toggle
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
abs3nt 2023-04-07 09:25:10 -07:00
parent 2fbeb6d21a
commit ee9c2299dc
Signed by: abs3nt
GPG Key ID: FDC6662313FA9386

View File

@ -760,7 +760,7 @@ func (c *Commands) Pause(ctx *gctx.Context) error {
func (c *Commands) TogglePlay(ctx *gctx.Context) error { func (c *Commands) TogglePlay(ctx *gctx.Context) error {
current, err := c.Client().PlayerCurrentlyPlaying(ctx) current, err := c.Client().PlayerCurrentlyPlaying(ctx)
if err != nil { if err != nil {
return err return c.Play(ctx)
} }
if !current.Playing { if !current.Playing {
return c.Play(ctx) return c.Play(ctx)