From 338bef9f75eccd0aa0ad9eb89473b86dd2fedfbf Mon Sep 17 00:00:00 2001 From: abs3nt Date: Tue, 20 Feb 2024 09:00:57 -0800 Subject: [PATCH] toggle --- src/components/commands/toggle_play.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/commands/toggle_play.go b/src/components/commands/toggle_play.go index 60f3b74..94f4dfa 100644 --- a/src/components/commands/toggle_play.go +++ b/src/components/commands/toggle_play.go @@ -3,10 +3,10 @@ package commands func (c *Commander) TogglePlay() error { state, err := c.Client().PlayerState(c.Context) if err != nil { - return err + return c.Play() } if state.Playing { - return c.Client().Pause(c.Context) + return c.Pause() } - return c.Client().Play(c.Context) + return c.Play() }