[GH-ISSUE #344] Add support for liking songs #227

Closed
opened 2026-02-27 19:29:31 +03:00 by kerem · 13 comments
Owner

Originally created by @mainrs on GitHub (Jul 2, 2019).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/344

Is it currently possible to like the song that is being played?

I couldn't find any relevant API for it.

Originally created by @mainrs on GitHub (Jul 2, 2019). Original GitHub issue: https://github.com/librespot-org/librespot/issues/344 Is it currently possible to like the song that is being played? I couldn't find any relevant API for it.
Author
Owner

@ashthespy commented on GitHub (Jul 2, 2019):

Don't think anyone has actively looked into it.
librespot-org/spotify-analyze is your best friend when it comes to these things..

<!-- gh-comment-id:507670223 --> @ashthespy commented on GitHub (Jul 2, 2019): Don't think anyone has actively looked into it. [`librespot-org/spotify-analyze`](https://github.com/librespot-org/spotify-analyze) is your best friend when it comes to these things..
Author
Owner

@devgianlu commented on GitHub (Jul 2, 2019):

@ashthespy Pretty much all that's there doesn't work anymore. All the communication except for metrics, audio key (and some other) are done through HTTPS.

BTW, the new API provides a feedback on whether the song is liked/disliked:

metadata {
    key: "radio.thumb"
    value: "up"
}

I once also saw the endpoint to make the choice, but I'm not seeing it now.

<!-- gh-comment-id:507690240 --> @devgianlu commented on GitHub (Jul 2, 2019): @ashthespy Pretty much all that's there doesn't work anymore. All the communication except for metrics, audio key (and some other) are done through HTTPS. BTW, the new API provides a feedback on whether the song is liked/disliked: ``` metadata { key: "radio.thumb" value: "up" } ``` I once also saw the endpoint to make the choice, but I'm not seeing it now.
Author
Owner

@willstott101 commented on GitHub (Jul 2, 2019):

Hm, there are two UI elements at work here aren't there? A favourite/saved song and a liked/disliked radio song. AFAIK they're two different things. One adds to your collection, the other feeds the recommendation engine and adds to a playlist?

Though I have no idea if that playlist is likely to be a separate client action or not.

<!-- gh-comment-id:507694150 --> @willstott101 commented on GitHub (Jul 2, 2019): Hm, there are two UI elements at work here aren't there? A favourite/saved song and a liked/disliked radio song. AFAIK they're two different things. One adds to your collection, the other feeds the recommendation engine and adds to a playlist? Though I have no idea if that playlist is likely to be a separate client action or not.
Author
Owner

@mainrs commented on GitHub (Jul 2, 2019):

I am looking for ages to find a program/library that allows it. I wanted to build a simple button that would then just like the current playing song that I could attach to my desk.

@willstott101 I was referring to the heart one, the one that saves it to your collection and influences your recommendations too.

<!-- gh-comment-id:507694513 --> @mainrs commented on GitHub (Jul 2, 2019): I am looking for ages to find a program/library that allows it. I wanted to build a simple button that would then just like the current playing song that I could attach to my desk. @willstott101 I was referring to the `heart` one, the one that saves it to your collection and influences your recommendations too.
Author
Owner

@devgianlu commented on GitHub (Jul 2, 2019):

A favourite/saved song and a liked/disliked radio song. AFAIK they're two different things.

There should indeed be two options, but when you click the heart button, it'll return radio.thumb as true. I also wasn't able to play something that would bring up the two thumb icons.

<!-- gh-comment-id:507695898 --> @devgianlu commented on GitHub (Jul 2, 2019): > A favourite/saved song and a liked/disliked radio song. AFAIK they're two different things. There should indeed be two options, but when you click the heart button, it'll return `radio.thumb` as true. I also wasn't able to play something that would bring up the two thumb icons.
Author
Owner

@ashthespy commented on GitHub (Jul 2, 2019):

From what I recall, v1/me/tracks/ is the end point for all the heart/like stuff.
Every track is checked against v1/me/tracks/contains?ids= which responds with a boolean.

<!-- gh-comment-id:507696766 --> @ashthespy commented on GitHub (Jul 2, 2019): From what I recall, `v1/me/tracks/` is the end point for all the heart/like stuff. Every track is checked against `v1/me/tracks/contains?ids=` which responds with a boolean.
Author
Owner

@mainrs commented on GitHub (Jul 2, 2019):

A favourite/saved song and a liked/disliked radio song. AFAIK they're two different things.

There should indeed be two options, but when you click the heart button, it'll return radio.thumb as true. I also wasn't able to play something that would bring up the two thumb icons.

You didn't find an endpoint to actually set radio.thumb to true, did you?

<!-- gh-comment-id:507697576 --> @mainrs commented on GitHub (Jul 2, 2019): > > > > A favourite/saved song and a liked/disliked radio song. AFAIK they're two different things. > > There should indeed be two options, but when you click the heart button, it'll return `radio.thumb` as true. I also wasn't able to play something that would bring up the two thumb icons. You didn't find an endpoint to actually set `radio.thumb` to true, did you?
Author
Owner

@devgianlu commented on GitHub (Jul 2, 2019):

You didn't find an endpoint to actually set radio.thumb to true, did you?

It used to be in the context info, but I can look it up again. Hopefully it is via Hermes.

<!-- gh-comment-id:507698039 --> @devgianlu commented on GitHub (Jul 2, 2019): > You didn't find an endpoint to actually set radio.thumb to true, did you? It used to be in the context info, but I can look it up again. Hopefully it is via Hermes.
Author
Owner

@devgianlu commented on GitHub (Jul 2, 2019):

I found a working endpoint for dailymixes:

hm://dailymix/v3/mixes/like/song/0z89qn3koTrXqvu4ds0xi7/7krbSH3rd8lhIZvuzTV3Bl

Where 0z89qn3koTrXqvu4ds0xi7 should be the dailymix and 7krbSH3rd8lhIZvuzTV3Bl the track.

<!-- gh-comment-id:507703258 --> @devgianlu commented on GitHub (Jul 2, 2019): I found a working endpoint for dailymixes: hm://dailymix/v3/mixes/like/song/0z89qn3koTrXqvu4ds0xi7/7krbSH3rd8lhIZvuzTV3Bl Where `0z89qn3koTrXqvu4ds0xi7` should be the dailymix and `7krbSH3rd8lhIZvuzTV3Bl` the track.
Author
Owner

@ashthespy commented on GitHub (Jul 2, 2019):

For the like/unlike (aka thumbs up/down)

hm://feedback/v1/feedback/dislike?uri=
hm://feedback/v1/feedback/?uri=

For the liked songs, I only found some references via the webgate:

# To heart a song:
PUT https://spclient.wg.spotify.com/v1/me/tracks?ids=07HwlohZWn3ssYatDQLyPg
# To un-heart a song
`DELETE https://spclient.wg.spotify.com/v1/me/tracks?ids=07HwlohZWn3ssYatDQLyPg
# To check if a song is hearted/unhearted 
GET https://spclient.wg.spotify.com/v1/me/tracks/contains?ids=07HwlohZWn3ssYatDQLyPg&market=from_token

The webSDK makes the same calls, but to https://api.spotify.com/ instead.

<!-- gh-comment-id:507703570 --> @ashthespy commented on GitHub (Jul 2, 2019): For the like/unlike (aka thumbs up/down) ``` hm://feedback/v1/feedback/dislike?uri= hm://feedback/v1/feedback/?uri= ``` For the liked songs, I only found some references via the webgate: ``` # To heart a song: PUT https://spclient.wg.spotify.com/v1/me/tracks?ids=07HwlohZWn3ssYatDQLyPg # To un-heart a song `DELETE https://spclient.wg.spotify.com/v1/me/tracks?ids=07HwlohZWn3ssYatDQLyPg # To check if a song is hearted/unhearted GET https://spclient.wg.spotify.com/v1/me/tracks/contains?ids=07HwlohZWn3ssYatDQLyPg&market=from_token ``` The webSDK makes the same calls, but to `https://api.spotify.com/` instead.
Author
Owner

@mainrs commented on GitHub (Jul 2, 2019):

Haha, thanks guys, really appreciate your help!

<!-- gh-comment-id:507772485 --> @mainrs commented on GitHub (Jul 2, 2019): Haha, thanks guys, really appreciate your help!
Author
Owner

@devgianlu commented on GitHub (Jul 4, 2019):

These are the official endpoints the new API sends for the Release Radar playlist:

context_metadata {
      key: "dislike-endpoint"
      value: "new-jams/feedback/v1/RELEASE_RADAR/DISLIKE?uri=<track-uri>&reason=<reason>&version=26027882&context=spotify:user:spotify:playlist:37i9dQZEVXbdSfbIwIVcBT"
}

context_metadata {
      key: "like-endpoint"
      value: "new-jams/feedback/v1/RELEASE_RADAR/LIKE?uri=<track-uri>&reason=<reason>&version=26027882&context=spotify:user:spotify:playlist:37i9dQZEVXbdSfbIwIVcBT"
}
<!-- gh-comment-id:508471580 --> @devgianlu commented on GitHub (Jul 4, 2019): These are the official endpoints the new API sends for the Release Radar playlist: ``` context_metadata { key: "dislike-endpoint" value: "new-jams/feedback/v1/RELEASE_RADAR/DISLIKE?uri=<track-uri>&reason=<reason>&version=26027882&context=spotify:user:spotify:playlist:37i9dQZEVXbdSfbIwIVcBT" } context_metadata { key: "like-endpoint" value: "new-jams/feedback/v1/RELEASE_RADAR/LIKE?uri=<track-uri>&reason=<reason>&version=26027882&context=spotify:user:spotify:playlist:37i9dQZEVXbdSfbIwIVcBT" } ```
Author
Owner

@p4vook commented on GitHub (Jul 15, 2020):

Any updates on this?

<!-- gh-comment-id:658724211 --> @p4vook commented on GitHub (Jul 15, 2020): Any updates on this?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#227
No description provided.