mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-11 22:40:17 -05:00
[spotify] Reintroduce libspotify support, change spotifyc to librespot-c
Select use of either libspotify or librespot-c as streaming backend via config option. librespot-c (renamed/improved spotifyc) impl has the following: - sync interface - seek support - honor bitrate config, set client and thread name - use web access token with "streaming" scope for login - fix issue with podcast playback Also say goodbye to file-based Spotify login.
This commit is contained in:
1661
src/inputs/libspotify/libspotify.c
Normal file
1661
src/inputs/libspotify/libspotify.c
Normal file
File diff suppressed because it is too large
Load Diff
65
src/inputs/libspotify/libspotify.h
Normal file
65
src/inputs/libspotify/libspotify.h
Normal file
@@ -0,0 +1,65 @@
|
||||
|
||||
#ifndef __LIBSPOTIFY_H__
|
||||
#define __LIBSPOTIFY_H__
|
||||
|
||||
#include <event2/event.h>
|
||||
#include <event2/buffer.h>
|
||||
#include <event2/http.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
struct spotify_status_info
|
||||
{
|
||||
bool libspotify_installed;
|
||||
bool libspotify_logged_in;
|
||||
char libspotify_user[100];
|
||||
};
|
||||
|
||||
#define LIBSPOTIFY_SETUP_ERROR_IS_LOADING -2
|
||||
|
||||
int
|
||||
libspotify_playback_setup(const char *path);
|
||||
|
||||
int
|
||||
libspotify_playback_play(void);
|
||||
|
||||
int
|
||||
libspotify_playback_pause(void);
|
||||
|
||||
//void
|
||||
//spotify_playback_pause_nonblock(void);
|
||||
|
||||
int
|
||||
libspotify_playback_stop(void);
|
||||
|
||||
//void
|
||||
//spotify_playback_stop_nonblock(void);
|
||||
|
||||
int
|
||||
libspotify_playback_seek(int ms);
|
||||
|
||||
//int
|
||||
//spotify_artwork_get(struct evbuffer *evbuf, char *path, int max_w, int max_h);
|
||||
|
||||
int
|
||||
libspotify_relogin(void);
|
||||
|
||||
int
|
||||
libspotify_login(const char *user, const char *password, const char **errmsg);
|
||||
|
||||
void
|
||||
libspotify_logout(void);
|
||||
|
||||
void
|
||||
libspotify_status_info_get(struct spotify_status_info *info);
|
||||
|
||||
void
|
||||
libspotify_uri_register(const char *uri);
|
||||
|
||||
int
|
||||
libspotify_init(void);
|
||||
|
||||
void
|
||||
libspotify_deinit(void);
|
||||
|
||||
#endif /* !__LIBSPOTIFY_H__ */
|
||||
Reference in New Issue
Block a user