Only compile Subsonic scrobbler when compiled with Subsonic support

This commit is contained in:
Jonas Kvinge 2020-09-23 18:55:22 +02:00
parent 5cdc24bfb0
commit 0c743452b0
2 changed files with 7 additions and 3 deletions

View File

@ -242,7 +242,6 @@ set(SOURCES
scrobbler/librefmscrobbler.cpp
scrobbler/listenbrainzscrobbler.cpp
scrobbler/lastfmimport.cpp
scrobbler/subsonicscrobbler.cpp
organize/organize.cpp
organize/organizeformat.cpp
@ -457,7 +456,6 @@ set(HEADERS
scrobbler/librefmscrobbler.h
scrobbler/listenbrainzscrobbler.h
scrobbler/lastfmimport.h
scrobbler/subsonicscrobbler.h
organize/organize.h
organize/organizedialog.h
@ -907,6 +905,7 @@ optional_source(HAVE_SUBSONIC
subsonic/subsonicrequest.cpp
subsonic/subsonicscrobblerequest.cpp
settings/subsonicsettingspage.cpp
scrobbler/subsonicscrobbler.cpp
HEADERS
subsonic/subsonicservice.h
subsonic/subsonicurlhandler.h
@ -914,6 +913,7 @@ optional_source(HAVE_SUBSONIC
subsonic/subsonicrequest.h
subsonic/subsonicscrobblerequest.h
settings/subsonicsettingspage.h
scrobbler/subsonicscrobbler.h
UI
settings/subsonicsettingspage.ui
)

View File

@ -37,7 +37,9 @@
#include "lastfmscrobbler.h"
#include "librefmscrobbler.h"
#include "listenbrainzscrobbler.h"
#include "subsonicscrobbler.h"
#ifdef HAVE_SUBSONIC
# include "subsonicscrobbler.h"
#endif
AudioScrobbler::AudioScrobbler(Application *app, QObject *parent) :
QObject(parent),
@ -55,7 +57,9 @@ AudioScrobbler::AudioScrobbler(Application *app, QObject *parent) :
scrobbler_services_->AddService(new LastFMScrobbler(app_, scrobbler_services_));
scrobbler_services_->AddService(new LibreFMScrobbler(app_, scrobbler_services_));
scrobbler_services_->AddService(new ListenBrainzScrobbler(app_, scrobbler_services_));
#ifdef HAVE_SUBSONIC
scrobbler_services_->AddService(new SubsonicScrobbler(app_, scrobbler_services_));
#endif
ReloadSettings();