Skip to content

Fix payload variable name in add_song_to_playlist method#57

Merged
Aran404 merged 1 commit intoAran404:mainfrom
nogaemer:main
Dec 26, 2025
Merged

Fix payload variable name in add_song_to_playlist method#57
Aran404 merged 1 commit intoAran404:mainfrom
nogaemer:main

Conversation

@nogaemer
Copy link
Copy Markdown
Contributor

Updated payload variable to fix spotapi.exceptions.errors.SongError: Could not like song.

Copilot AI review requested due to automatic review settings December 25, 2025 18:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the like_song method by correcting the payload variable key name in the API request. The change updates the variables key from "uris" to "libraryItemUris" to match the expected format of Spotify's addToLibrary API endpoint, resolving a SongError: Could not like song exception.

Key Changes:

  • Updated the payload variables key in the like_song method's API request from "uris" to "libraryItemUris"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Aran404
Copy link
Copy Markdown
Owner

Aran404 commented Dec 25, 2025

Hey, thank you very much for the contribution. Has this been tested? If so, I'll merge it into the main branch. Happy holidays!

@nogaemer
Copy link
Copy Markdown
Contributor Author

Yes, I tested that.
Apparently Spotify has updated its API. I'm pretty sure the same problem applies to the add_songs_to_playlist function in song.py, but I haven't really tested that yet.

By the way, thank you for this project!

@Aran404 Aran404 merged commit 8835598 into Aran404:main Dec 26, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants