🐛 refreshing token should now work with context (#91)

This commit is contained in:
Oskar Dudziński
2025-02-13 12:40:50 +01:00
committed by GitHub
parent 92f3feda2e
commit 56968be9a2
2 changed files with 9 additions and 1 deletions
+7 -1
View File
@@ -62,7 +62,13 @@ def cli(ctx: Context, verbose: bool, quiet: bool, no_cache: bool):
logging.getLogger("urllib3").setLevel(logging.ERROR)
refresh(ctx)
# BUG: tiddl raises AuthError after token refresh,
# probably ctx is not working like this.
# NOTE: got 'fixed',
# but i will know if it works after my token expire
if ctx.invoked_subcommand in ("fav", "file", "search", "url"):
ctx.invoke(refresh)
cli.add_command(ConfigCommand)
+2
View File
@@ -23,6 +23,8 @@ def AuthGroup():
"""Manage Tidal token."""
@AuthGroup.command("refresh")
@passContext
def refresh(ctx: Context):
"""Refresh auth token when is expired"""