Skip to content

Commit

Permalink
Trying to fix errors with build
Browse files Browse the repository at this point in the history
  • Loading branch information
witnessmenow committed Oct 1, 2023
1 parent f673127 commit 15aa90d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions SpotifyDiyThing/configFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ bool fetchConfigFile(char *refreshToken, char *clientId, char *clientSecret) {
if (!error) {
Serial.println("\nparsed json");

if(json.containsKey(REFRESH_TOKEN_LABEL)){
if (json.containsKey(REFRESH_TOKEN_LABEL)) {
strcpy(refreshToken, json[REFRESH_TOKEN_LABEL]);
}

if(json.containsKey(CLIENT_ID_LABEL) && json.containsKey(CLIENT_SECRET_LABEL)){
if (json.containsKey(CLIENT_ID_LABEL) && json.containsKey(CLIENT_SECRET_LABEL)) {
strcpy(clientId, json[CLIENT_ID_LABEL]);
strcpy(clientSecret, json[CLIENT_SECRET_LABEL]);
strcpy(clientSecret, json[CLIENT_SECRET_LABEL]);
} else {
Serial.println("Config missing client ID or Secret");
return false;
Expand All @@ -35,6 +35,9 @@ bool fetchConfigFile(char *refreshToken, char *clientId, char *clientSecret) {
Serial.println("failed to load json config");
return false;
}
} else {
Serial.println("Failed to open config file");
return false;
}
} else {
Serial.println("Config file does not exist");
Expand Down
2 changes: 1 addition & 1 deletion SpotifyDiyThing/displayCode.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*******************************************************************/

// file name for where to save the image.
#define ALBUM_ART "/album.jpg"
const char* ALBUM_ART = "/album.jpg"

int imageHeight = 150;
int imageWidth = 150;
Expand Down
2 changes: 1 addition & 1 deletion SpotifyDiyThing/refreshToken.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ WebServer server(80);

void handleRoot()
{
char webpage[1100];
char webpage[1150];
char scope[] = "user-read-playback-state%20user-modify-playback-state";

const char *webpageTemplate =
Expand Down

0 comments on commit 15aa90d

Please sign in to comment.