From 776a5ca1b7126a17881ff24caa8823dd9e15e097 Mon Sep 17 00:00:00 2001 From: Agate <me@agate.blue> Date: Tue, 8 Dec 2020 17:08:02 +0100 Subject: [PATCH] Fixed broken auth and playlists track add --- funkwhale_cli/cli/auth.py | 2 ++ funkwhale_cli/cli/playlists.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/funkwhale_cli/cli/auth.py b/funkwhale_cli/cli/auth.py index 46a493c..befc482 100644 --- a/funkwhale_cli/cli/auth.py +++ b/funkwhale_cli/cli/auth.py @@ -53,6 +53,8 @@ class lazy_credential: def __bool__(self): return bool(self.value) + def __len__(self): + return len(str(self)) def init_keyring(): # small hack to fix some weird issues with pyinstaller and keyring diff --git a/funkwhale_cli/cli/playlists.py b/funkwhale_cli/cli/playlists.py index 893d39d..0f910fe 100644 --- a/funkwhale_cli/cli/playlists.py +++ b/funkwhale_cli/cli/playlists.py @@ -92,7 +92,7 @@ async def playlists_tracks_add(ctx, id, track, no_duplicates): async with ctx.obj["remote"]: async with ctx.obj["remote"].request( "post", - "api/v1/playlists/{}/".format(id), + "api/v1/playlists/{}/add".format(id), data={"tracks": track, "allow_duplicates": not no_duplicates}, ) as response: response.raise_for_status() -- GitLab