mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-02 14:49:20 +03:00
Spotify secrets
This commit is contained in:
@@ -21,6 +21,12 @@ set(BELL_DISABLE_MQTT ON)
|
|||||||
set(BELL_DISABLE_WEBSERVER ON)
|
set(BELL_DISABLE_WEBSERVER ON)
|
||||||
set(CSPOT_TARGET_ESP32 ON)
|
set(CSPOT_TARGET_ESP32 ON)
|
||||||
|
|
||||||
|
set(_secret $ENV{SPOTIFY_SECRET})
|
||||||
|
if(_secret)
|
||||||
|
separate_arguments(_secret)
|
||||||
|
set_source_files_properties(shim.cpp PROPERTIES COMPILE_OPTIONS "${_secret}")
|
||||||
|
endif()
|
||||||
|
|
||||||
# because CMake is so broken, the cache set below overrides a normal "set" for the first build
|
# because CMake is so broken, the cache set below overrides a normal "set" for the first build
|
||||||
set(BELL_EXTERNAL_VORBIS "idf::codecs" CACHE STRING "provide own codecs")
|
set(BELL_EXTERNAL_VORBIS "idf::codecs" CACHE STRING "provide own codecs")
|
||||||
set(BELL_EXTERNAL_CJSON "idf::json" CACHE STRING "provide own CJSON")
|
set(BELL_EXTERNAL_CJSON "idf::json" CACHE STRING "provide own CJSON")
|
||||||
|
|||||||
@@ -33,15 +33,15 @@
|
|||||||
#include "nvs_utilities.h"
|
#include "nvs_utilities.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
|
|
||||||
|
#if !defined(CLIENT_ID) || !defined(CLIENT_SECRET)
|
||||||
#if __has_include("client_info.h")
|
#if __has_include("client_info.h")
|
||||||
#include "client_info.h"
|
#include "client_info.h"
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
#if !defined(CLIENT_ID) || !defined(CLIENT_SECRET)
|
|
||||||
#warning "missing Spotify's CLIENT_ID and/or CLIENT_SECRET (set env varibles or in client_info.h"
|
#warning "missing Spotify's CLIENT_ID and/or CLIENT_SECRET (set env varibles or in client_info.h"
|
||||||
#define CLIENT_ID "<your client id>"
|
#define CLIENT_ID "<your client id>"
|
||||||
#define CLIENT_SECRET "<your client secret>"
|
#define CLIENT_SECRET "<your client secret>"
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
static class cspotPlayer *player;
|
static class cspotPlayer *player;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user