--- libmp3splt-0.5/include/libmp3splt/cddb.h~ 2008-09-04 10:57:59 +0400 +++ libmp3splt-0.5/include/libmp3splt/cddb.h 2008-09-26 11:39:22 +0400 @@ -95,6 +95,7 @@ char *splt_freedb_get_file(splt_state *s #define SPLT_CUE_TITLE 2 #define SPLT_CUE_PERFORMER 3 #define SPLT_CUE_INDEX 4 +#define SPLT_CUE_YEAR 5 //proxy stuff //#define PROXYCONFIG ".mp3splt" --- libmp3splt-0.5/src/cddb.c~ 2008-09-04 10:56:40 +0400 +++ libmp3splt-0.5/src/cddb.c 2008-09-26 11:52:27 +0400 @@ -293,6 +293,11 @@ static int splt_cue_set_value(splt_state snprintf(client_infos,strlen(out)+30," Album: %s\n", out); splt_t_put_message_to_client(state, client_infos); } + else if (tag_field == SPLT_TAGS_YEAR) + { + snprintf(client_infos,strlen(out)+30," Year: %s\n", out); + splt_t_put_message_to_client(state, client_infos); + } free(client_infos); client_infos = NULL; @@ -399,6 +404,11 @@ int splt_cue_put_splitpoints(const char line_content += 5; type = SPLT_CUE_TITLE; } + else if ((line_content = strstr(line, "DATE")) != NULL) + { + line_content += 4; + type = SPLT_CUE_YEAR; + } else if ((line_content = strstr(line, "PERFORMER")) != NULL) { type = SPLT_CUE_PERFORMER; @@ -463,6 +473,31 @@ int splt_cue_put_splitpoints(const char title = SPLT_TRUE; } break; + //YEAR found + case SPLT_CUE_YEAR: + if (tracks == -1) + { + if ((temp_error = splt_cue_set_value(state, line_content, + 0, SPLT_TAGS_YEAR)) != SPLT_OK) + { + *error = temp_error; + goto function_end; + } + } + else + { + if (tracks > 0) + { + if ((temp_error = splt_cue_set_value(state, line_content, + tracks-1, SPLT_TAGS_YEAR)) != SPLT_OK) + { + *error = temp_error; + goto function_end; + } + } + title = SPLT_TRUE; + } + break; //PERFORMER found case SPLT_CUE_PERFORMER: if (tracks == -1)