From 9f79a47bb414dd3cefd174c55bab1515e3ec3518 Mon Sep 17 00:00:00 2001 From: nathom Date: Wed, 28 Jul 2021 21:38:33 -0700 Subject: [PATCH] Add config --deezer command --- rip/cli.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/rip/cli.py b/rip/cli.py index 1daabd2..5e2a1e7 100644 --- a/rip/cli.py +++ b/rip/cli.py @@ -286,6 +286,7 @@ def lastfm(ctx, source, url): @click.option("-d", "--directory", is_flag=True, help="Open the config directory") @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("-dz", "--deezer", is_flag=True, help="Set the Deezer ARL") @click.option("--reset", is_flag=True, help="RESET the config file") @click.option( "--update", @@ -352,6 +353,22 @@ def config(ctx, **kwargs): config.save() click.secho("Credentials saved to config.", fg="green") + if kwargs["deezer"]: + click.secho( + "If you're not sure how to find the ARL cookie, see the instructions at ", + italic=True, + nl=False, + dim=True, + ) + click.secho( + "https://github.com/nathom/streamrip/wiki/Finding-your-Deezer-ARL-Cookie", + underline=True, + italic=True, + fg="blue", + ) + config.file["deezer"]["arl"] = input(click.style("ARL: ", fg="green")) + config.save() + @cli.command() @click.option(