mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-26 04:26:14 -05:00
Add support for Spotify (squashed commit), and:
- Try to not return items which a client can't play
- Remove inotify subscription to IN_MODIFY and IN_CREATE
- Fix crash on unknown codec type in transcode.c
- Probably added some new bugs...
This commit is contained in:
16
src/main.c
16
src/main.c
@@ -67,6 +67,9 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL;
|
||||
# include "ffmpeg_url_evbuffer.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SPOTIFY_H
|
||||
# include "spotify.h"
|
||||
#endif
|
||||
|
||||
#define PIDFILE STATEDIR "/run/" PACKAGE ".pid"
|
||||
|
||||
@@ -678,6 +681,15 @@ main(int argc, char **argv)
|
||||
goto filescanner_fail;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SPOTIFY_H
|
||||
/* Spawn Spotify thread */
|
||||
ret = spotify_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_INFO, L_MAIN, "Spotify thread not started\n");;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Spawn player thread */
|
||||
ret = player_init();
|
||||
if (ret != 0)
|
||||
@@ -786,6 +798,10 @@ main(int argc, char **argv)
|
||||
player_deinit();
|
||||
|
||||
player_fail:
|
||||
#ifdef HAVE_SPOTIFY_H
|
||||
DPRINTF(E_LOG, L_MAIN, "Spotify deinit\n");
|
||||
spotify_deinit();
|
||||
#endif
|
||||
DPRINTF(E_LOG, L_MAIN, "File scanner deinit\n");
|
||||
filescanner_deinit();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user