summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Honz <exislow+github@gmail.com>2024-05-03 20:38:29 +0200
committerRobert Honz <exislow+github@gmail.com>2024-05-03 20:39:30 +0200
commit214018c4a2b63a3d53b543488f13beca3cc0b552 (patch)
treece550cd882082b853c3775b2fca5c057c803433f
parent26596ddd3252cbd4a791f8459de0fb15fb34d11e (diff)
downloadtidal-dl-ng-214018c4a2b63a3d53b543488f13beca3cc0b552.tar.gz
✨ Logout via CLI implemented. Fixes #101
-rw-r--r--tidal_dl_ng/cli.py12
1 files changed, 12 insertions, 0 deletions
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,