diff --git a/src/interface.c b/src/interface.c index 3309868d6..9c99a7a2f 100644 --- a/src/interface.c +++ b/src/interface.c @@ -3405,6 +3405,7 @@ int search_ui(pixel *vid_buf) thumb = calloc(1,4); thlen = 4; } + printf("Added %s to cache\n", img_id[i]); thumb_cache_add(img_id[i], thumb, thlen); for (pos=0; pos=GRID_X*GRID_Y) break; if (votes) @@ -4401,7 +4421,15 @@ int search_results(char *str, int votes) if (s) search_votes[i] = atoi(s); - thumb_cache_find(str+8, search_thumbs+i, search_thsizes+i); + + //Build thumb cache ID and find + id_d_temp = malloc(strlen(search_ids[i])+strlen(search_dates[i])+2); + strcpy(id_d_temp, search_ids[i]); + strappend(id_d_temp, "_"); + strappend(id_d_temp, search_dates[i]); + thumb_cache_find(id_d_temp, search_thumbs+i, search_thsizes+i); + free(id_d_temp); + i++; } else if (!strncmp(str, "MOTD ", 5))