From 214018c4a2b63a3d53b543488f13beca3cc0b552 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Fri, 3 May 2024 20:38:29 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Logout=20via=20CLI=20implemented.?= =?UTF-8?q?=20Fixes=20#101?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/cli.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tidal_dl_ng/cli.py b/tidal_dl_ng/cli.py index 4902f74..c4f8b31 100644 --- a/tidal_dl_ng/cli.py +++ b/tidal_dl_ng/cli.py @@ -101,6 +101,18 @@ def login(ctx: typer.Context) -> bool: return result +@app.command(name="logout") +def logout() -> bool: + settings = Settings() + tidal = Tidal(settings) + result = tidal.logout() + + if result: + print("You have been successfully logged out.") + + return result + + @app.command(name="dl") def download( ctx: typer.Context,