better toggle
This commit is contained in:
parent
2fbeb6d21a
commit
ee9c2299dc
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user