Create —update and —path options for rip config

This commit is contained in:
nathom 2021-05-14 23:54:37 -07:00
parent 15e0063a19
commit 1f2a04e4a5

View file

@ -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)