diff options
| author | Robert Honz <exislow+github@gmail.com> | 2024-05-03 20:38:29 +0200 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2024-05-03 20:39:30 +0200 |
| commit | 214018c4a2b63a3d53b543488f13beca3cc0b552 (patch) | |
| tree | ce550cd882082b853c3775b2fca5c057c803433f | |
| parent | 26596ddd3252cbd4a791f8459de0fb15fb34d11e (diff) | |
| download | tidal-dl-ng-214018c4a2b63a3d53b543488f13beca3cc0b552.tar.gz | |
✨ Logout via CLI implemented. Fixes #101
| -rw-r--r-- | tidal_dl_ng/cli.py | 12 |
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, |
