jackweatherford / spotify-friend-activity

View your friends' activity in Spotify's web player.
https://jackweatherford.github.io/spotify-friend-activity
MIT License
24 stars 4 forks source link

[ENHANCEMENT] Missing activity #14

Open arlinSylvester opened 1 year ago

arlinSylvester commented 1 year ago

I love this extension. But Couldn't find that the extension doesn't update my activity to my friends .It's a 5 on 5 but I'd love this as a update

jackweatherford commented 1 year ago

Please make sure:

An important note: Spotify only provides activity data about Spotify desktop app users - so when a user is active on the web app - their listening data does not get picked up by this extension.

m-bdf commented 1 year ago

Thanks for the explanation! Would it be possible for this extension to pick up our listening data on the web app and share it to friends so that it appears on their activity panel, or is it too out of scope?

jackweatherford commented 1 year ago

An interesting proposal - I could see a future where the extension watches for what the user is playing and stores it into a database for the extension to fetch and display to other users. But that would take quite a bit of time to implement, not to mention database hosting costs and privacy concerns. Possibly a version 2 of the extension in the far future.

m-bdf commented 1 year ago

Actually, I was rather thinking about watching for what the user is playing and notifying Spotify directly in some way, juste like the desktop client does, so that they can handle everything on their side and display our activity to all our friends including those using the desktop client… But if that's not feasible then having our own database could be an interesting feature indeed :)

jackweatherford commented 1 year ago

Ohh, gotcha - I understand now. I think the main problem is that "notifying Spotify directly in some way" isn't very straightforward. Even with just fetching Spotify friend activity, Spotify doesn't provide a direct API route to do this. For this extension, I had to leverage spotify-buddylist which is not an official Spotify API and uses Spotify Desktop's internal request to https://guc-spclient.spotify.com/presence-view/v1/buddylist in order to fetch friend activity. Setting your own activity seems to be a similar situation, but I haven't yet found some un-official library with a workaround for doing this like spotify-buddylist. A possible solution could be to interface with Spotify's Web Playback SDK - but I'm unsure if that would update friend activity, I'd have to look more into it.