Skip to content
Snippets Groups Projects
Commit 776a5ca1 authored by Agate's avatar Agate :speech_balloon:
Browse files

Fixed broken auth and playlists track add

parent 2747ae68
No related branches found
No related tags found
No related merge requests found
Pipeline #12910 failed
...@@ -53,6 +53,8 @@ class lazy_credential: ...@@ -53,6 +53,8 @@ class lazy_credential:
def __bool__(self): def __bool__(self):
return bool(self.value) return bool(self.value)
def __len__(self):
return len(str(self))
def init_keyring(): def init_keyring():
# small hack to fix some weird issues with pyinstaller and keyring # small hack to fix some weird issues with pyinstaller and keyring
......
...@@ -92,7 +92,7 @@ async def playlists_tracks_add(ctx, id, track, no_duplicates): ...@@ -92,7 +92,7 @@ async def playlists_tracks_add(ctx, id, track, no_duplicates):
async with ctx.obj["remote"]: async with ctx.obj["remote"]:
async with ctx.obj["remote"].request( async with ctx.obj["remote"].request(
"post", "post",
"api/v1/playlists/{}/".format(id), "api/v1/playlists/{}/add".format(id),
data={"tracks": track, "allow_duplicates": not no_duplicates}, data={"tracks": track, "allow_duplicates": not no_duplicates},
) as response: ) as response:
response.raise_for_status() response.raise_for_status()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment