mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-16 08:05:03 -04:00
Create —update and —path options for rip config
This commit is contained in:
parent
15e0063a19
commit
1f2a04e4a5
1 changed files with 12 additions and 0 deletions
|
@ -269,12 +269,24 @@ def lastfm(ctx, source, url):
|
|||
@click.option("-q", "--qobuz", is_flag=True, help="Set Qobuz credentials")
|
||||
@click.option("-t", "--tidal", is_flag=True, help="Re-login into Tidal")
|
||||
@click.option("--reset", is_flag=True, help="RESET the config file")
|
||||
@click.option(
|
||||
"--update",
|
||||
is_flag=True,
|
||||
help="Reset the config file, keeping the credentials",
|
||||
)
|
||||
@click.option("-p", "--path", is_flag=True, help="Show the config file's path")
|
||||
@click.pass_context
|
||||
def config(ctx, **kwargs):
|
||||
"""Manage the streamrip configuration file."""
|
||||
if kwargs["reset"]:
|
||||
config.reset()
|
||||
|
||||
if kwargs["update"]:
|
||||
config.update()
|
||||
|
||||
if kwargs["path"]:
|
||||
print(CONFIG_PATH)
|
||||
|
||||
if kwargs["open"]:
|
||||
click.secho(f"Opening {CONFIG_PATH}", fg="green")
|
||||
click.launch(CONFIG_PATH)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue