Fixes missing queue updates in MPDroid after moving an item in the
queue. MPDroid moves items with the 'moveid' command and retrieves the
playlist changes with the 'plchanges' command, due to the missing
queue_version update the last command did not return any changes and the
queue in MPDroid did not get updated.
The web api might be accessed from different threads (library, worker,
dacp), therefor protect from concurrently running refresh-token requests
(accessing the globals in spotify_webapi.c)
The logged_in callback is called during relogin in the initscan.
Additionally initscan explicitly starts the scan leading to a duplicate
scan run.
To prevent this from happening removed the scan call in the logged_in
callback and split the spotify_login_user function into a private
function (without scan) and a public function (with scan).
Scanning saved albums/playlists over the webapi requires a logged in
libspotify session. To ensure, that the login process finished before
starting the webapi scan, the login needs to be synchronous.
and libspotify login succeeded
Each saved track needs to be registered with libspotify otherwise
playback of this track will fail. This makes sure we only add saved
tracks to the library that are playable.
Also attempt a rescan if libspotify login succeeded. With this change it
does not matter if a user first logs into libspotify and then authorizes
the webapi access or the other way around.
The noidle command did not prevent idle events to be sent to the client
directly when they occured. This resulted e. g. in M.A.L.P. in errors
trying to play an album from the library)
- queue table: define id column as AUTOINCREMENT (requires drop+create)
- queue table: add column queue_version
- files table: update http-stream virtual paths (constructing the
virtual path for http-streams changed in pr #449, this migrates existing
databases to be consistent to the newly created paths)