Open rilla opened 11 years ago
The Playlist#upload method is a bit spotty at best, unfortunately, and it does not really do anything apart from wait.
libspotify is the main workhorse, and while your application is running (and Session#process_events is being called), libspotify does work to synchronize the spotify servers and the local data. This can happen at any time, or never, depending entirely on what libspotify decides to do.
In general, libspotify is not suitable for one-off tasks. It is written with the intention that the application using it will be long-running, so it has time to update the spotify servers when it needs to. There is no way to flush data to the spotify servers in libspotify; sometimes triggering a logout will do that, but the behaviour is not consistent.
I’m afraid I can’t help much with this issue.
For this code:
The behavior is unpredictable: sometimes new playlists appear on the desktop client immediately but sometimes they don't. Sometimes they appear after relogin on the desktop client, but that doesn't work consistently either.
I'm using libspotify 12.1.51.3 and hallon 0.18.2. Maybe it's something with my implementation, but I can't find a complete example on creating and updating playlists so I had to guess - and it might have been a wrong guess.