mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-29 05:19:05 -05:00
[lastfm/jsonapi/ws/main] New JSON-API-endpoints for Last.fm integration
In preparation for the new endpoints the following refactorings where done in lastfm.c: - Initialize lastfm.c in main.c instead of on first scrobble attempt (necessary to retrieve the correct lastfm status) - Return error messages if login attempt failed - Add api function for status and logout - Notify about Last.fm status changes Unrelated changes in lastfm.c are: - Refactoring of request_post - Add request parameters sorted alphabetically and remove calling the sort method in request_post
This commit is contained in:
@@ -70,6 +70,9 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL;
|
||||
#include "player.h"
|
||||
#include "worker.h"
|
||||
#include "library.h"
|
||||
#ifdef LASTFM
|
||||
# include "lastfm.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBCURL
|
||||
# include <curl/curl.h>
|
||||
@@ -784,6 +787,10 @@ main(int argc, char **argv)
|
||||
mdns_no_mpd = 1;
|
||||
#endif
|
||||
|
||||
#ifdef LASTFM
|
||||
lastfm_init();
|
||||
#endif
|
||||
|
||||
/* Start Remote pairing service */
|
||||
ret = remote_pairing_init();
|
||||
if (ret != 0)
|
||||
|
||||
Reference in New Issue
Block a user