diff --git a/funkwhale_cli/cli/auth.py b/funkwhale_cli/cli/auth.py index 46a493c45aa6c62c3960c7ecc92d305badb3797c..befc482585c20b9ce33e0c37f5a9ba08bcacae76 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 893d39d9fc83516e92bd9b79ff5b239c9062fad4..0f910fe7fdd41f4ad596677b089ade0c40b5f518 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()