More stuff please #11

Merged
dali99 merged 4 commits from more_cli_features into master 2024-05-19 12:48:15 +02:00
1 changed files with 6 additions and 0 deletions
Showing only changes of commit 2b8ecf124d - Show all commits

View File

@ -107,6 +107,12 @@ def pause( api_base: str = DEFAULT_API_BASE ):
api.set_endpoint(api_base) api.set_endpoint(api_base)
rich.print(api.set_playing(False), file=sys.stderr) rich.print(api.set_playing(False), file=sys.stderr)
@cli.command(help="Toggle playback")
def toggle(api_base: str = DEFAULT_API_BASE):
api.set_endpoint(api_base)
playing = api.is_playing()
rich.print(api.set_playing(not playing), file=sys.stderr)
@cli.command(help="Goto next item in playlist") @cli.command(help="Goto next item in playlist")
def skip( api_base: str = DEFAULT_API_BASE ): def skip( api_base: str = DEFAULT_API_BASE ):
api.set_endpoint(api_base) api.set_endpoint(api_base)