spotify / web-api

This issue tracker is no longer used. Join us in the Spotify for Developers forum for support with the Spotify Web API ➡️ https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer
981 stars 79 forks source link

Play Button Widget: playlist should refresh it is modified #271

Open sandervspl opened 8 years ago

sandervspl commented 8 years ago

When using the API to add, remove or change tracks it takes approximately 30 seconds before it will be added to the playlist widget. This should be instantly, or at least close to it. At least some way for us to know when the playlist widget has been updated. Would open up for way better web applications.

thelinmichael commented 8 years ago

Thanks for opening the issue @sandervspl. Could you please clarify, by playlist widget are you referring to the Spotify Play Button?

sandervspl commented 8 years ago

Yep, that's the one!

jpiepkow commented 8 years ago

This would be super helpful because as it looks currently when adding a song to a playlist, unless the user is using the desktop app, the playlist will not update accordingly unless the page is reset.

Zelltron commented 8 years ago

I agree, the way that I patched this was with a JS auto refresh function set for every 15 seconds caped at 60 seconds after the change occurs. This is very request heavy though and is problematic when it comes to request limits.

To my understanding of the playlist endpoint... A good solution that wouldn't require a change to the iframe's functionality would be a playlist url response parameter that includes the snapshot id.

codewithfeeling commented 7 years ago

I'm pretty sure this is related - hence posting here rather than creating a new Issue.

I cannot get any updates triggered by the web API to reflect on the desktop browser or a playlist widget.

Everything is responding as expected during the API call, but there are no visible updates. Tracks are not added to playlists. New playlists don't show up in the playlists menu. If I quit Spotify and reload, all the changes are there - but that's the only way to get it to refresh.

Up until recently, it used to work perfectly, and almost instantaneously. When I made a playlist change, or created a new playlist via the API, it showed up in the desktop app.

Has something fundamentally changed or broken on the Spotify end?

jpiepkow commented 7 years ago

I have ran into this issue also..It sucks because I built a whole app based around desktop playlists updating and that has not worked since the last weekend of February

hughrawlinson commented 7 years ago

Thanks for bringing this to my attention, I'll speak to the related teams about it tomorrow.

codewithfeeling commented 7 years ago

Hi @hughrawlinson - thanks. That would be great, as we're at a dead end here. I can definitely arrange for some debug logs & screenshots to be sent over to you if that would help.

jpiepkow commented 7 years ago

Thanks for that! I messaged on a thread on the Spotify community page around a month ago to no avail. If you need anything from me just let me know. Would be awesome to get some feedback because much like Raff my app of a couple months of work is at a stand still until I can figure out what stopped working(if it helps any it seems to not update on Android,iOS or Mac desktop for me)

hughrawlinson commented 7 years ago

The team is looking into the issue of playlists not updating in Desktop and Mobile Spotify clients. I'll update on that here.

I'll also continue to consider this issue a feature request for auto-updating Spotify Play Buttons, but please note that it this is a feature request - SPBs don't currently have an autoupdate feature.

codewithfeeling commented 7 years ago

@hughrawlinson Great news - and thanks a lot for pushing this to your dev team.

My react/redux application re-renders the Spotify Play Button widget after a state change triggered by the addition of a track via the API, but because the Spotify desktop (or mobile) client itself isn't updating, the re-rendered player also doesn't pick up any changes. Interestingly, you can manually skip to the supposed new track and see the title there in the player widget, but pressing play simply jumps back to the first track.

I suspect once the desktop app is picking up the changes, the player will work.

jpiepkow commented 7 years ago

just a note @raffjones / @hughrawlinson . I tested my app again today and it looks to be updating correctly like it was before the update in February,in both mac and android client applications. As for web player and play button widget. Even before February it did not automatically update when something was added(hopefully in the future we can have this). But for me at least I am quite happy everything is back to working as expected and I can pick up development on my application again(hope it stays working this time).

hughrawlinson commented 7 years ago

Hey - we've rolled out a fix for playlists updating in the desktop and mobile clients. Please check it out, and if there are any issues please open a new ticket on this tracker to make sure they get the attention they deserve 😄

I'll leave this ticket open to track the feature request for web player and play button widgets to support live-updating.

codewithfeeling commented 7 years ago

@hughrawlinson I can't thank you enough for getting this in front of your dev team. And thanks to the Spotify developer team for responding so quickly and rolling out the fix. I can confirm along with @jpiepkow that we are seeing the functionality as before - only better. It's instantaneous! We are now able to roll out our public beta. VERY happy!! :)

dbrowndan commented 7 years ago

I'm working on an application that relies on an instant playlist refresh in the player(s) and I'm running into some similar issues. I'm mainly trying this with the desktop player and when I reorder tracks via API, they don't move in my player. And when I add new tracks, they go to the top of my player's list, even though they go to the bottom of the "official" list from the API.

My only solution at the moment is to close down Spotify, purge the cache, and re-open it to get the list to the "official" order.

Any thoughts here, @hughrawlinson? Do you need any specific info?

Thanks!

codewithfeeling commented 7 years ago

@dbrowndan - just FYI, the list ordering has been identified as a bug. There's more about that in this thread

phadaphunk commented 7 years ago

@hughrawlinson This is still an issue for me as the play button does not update with my playlist. Any idea when this will be fixed? In order to get the playlist to refresh the "currently playing" metadata, I need to refresh the page which is not really a viable solution in terms of the numbers of calls I can make and user experience.

viking2917 commented 6 years ago

It would be awesome if the web player (the Spotify Play Button embed) would also update, or provide a method for the page to request an updated - otherwise basically any kind of app that uses the api to build playlists basically can't work with the play button, because it never gets refreshed with a full page load.

Perhaps the web player could simply listen for a custom event, which our client programs could generate, that would force a refresh.