|
@@ -176,10 +176,11 @@ void parseTwitch(char* content) {
|
|
|
char name[20];
|
|
char name[20];
|
|
|
char title[20];
|
|
char title[20];
|
|
|
char game[20];
|
|
char game[20];
|
|
|
- int date;
|
|
|
|
|
|
|
+ char date[15];
|
|
|
memset(name, 0, 20);
|
|
memset(name, 0, 20);
|
|
|
memset(title, 0, 20);
|
|
memset(title, 0, 20);
|
|
|
memset(game, 0, 20);
|
|
memset(game, 0, 20);
|
|
|
|
|
+ memset(date, 0, 15);
|
|
|
|
|
|
|
|
for (i = 1; i < r; i++) {
|
|
for (i = 1; i < r; i++) {
|
|
|
if (jsoneq(content, &token[i], "Name") == 0) {
|
|
if (jsoneq(content, &token[i], "Name") == 0) {
|
|
@@ -195,18 +196,18 @@ void parseTwitch(char* content) {
|
|
|
i++;
|
|
i++;
|
|
|
}
|
|
}
|
|
|
else if (jsoneq(content, &token[i], "Date") == 0) {
|
|
else if (jsoneq(content, &token[i], "Date") == 0) {
|
|
|
- date = getIntegerToken(content, &token[i + 1]);
|
|
|
|
|
|
|
+ getStringToken(content, &token[i + 1], date, 15);
|
|
|
i++;
|
|
i++;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- printf("%d", date);
|
|
|
|
|
- if(streamid != date)
|
|
|
|
|
|
|
+ printf("%s", date);
|
|
|
|
|
+ if(strncmp(date, streamid, 15) != 0)
|
|
|
{
|
|
{
|
|
|
strcpy(data.title, title);
|
|
strcpy(data.title, title);
|
|
|
strcpy(data.game, game);
|
|
strcpy(data.game, game);
|
|
|
strcpy(data.name, name);
|
|
strcpy(data.name, name);
|
|
|
printf("%s - %s - %s", name, title, game);
|
|
printf("%s - %s - %s", name, title, game);
|
|
|
- streamid = date;
|
|
|
|
|
|
|
+ strcpy(streamid, date);
|
|
|
setCurrentDisplay(DISPLAY_Twitch, 100);
|
|
setCurrentDisplay(DISPLAY_Twitch, 100);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|