Add scanning for year tag - TDRC

This commit is contained in:
Ron Pedde 2003-12-07 00:24:01 +00:00
parent 99fc74e028
commit 47dd724c35
3 changed files with 6 additions and 1 deletions

View File

@ -297,7 +297,8 @@ DAAP_BLOCK *daap_response_songlist(void) {
// g = g && daap_add_short(mlit,"astc",0); /* track count */ // g = g && daap_add_short(mlit,"astc",0); /* track count */
// g = g && daap_add_short(mlit,"astn",0); /* track number */ // g = g && daap_add_short(mlit,"astn",0); /* track number */
// g = g && daap_add_char(mlit,"asur",3); /* rating */ // g = g && daap_add_char(mlit,"asur",3); /* rating */
// g = g && daap_add_short(mlit,"asyr",0); if(current->year)
g = g && daap_add_short(mlit,"asyr",current->year);
} else g=0; } else g=0;
} }
} else g=0; } else g=0;

View File

@ -433,6 +433,9 @@ int scan_gettags(char *file, MP3FILE *pmp3) {
used=1; used=1;
pmp3->comment = utf8_text; pmp3->comment = utf8_text;
DPRINTF(ERR_DEBUG," Comment: %s\n",utf8_text); DPRINTF(ERR_DEBUG," Comment: %s\n",utf8_text);
} else if(!strcmp(pid3frame->id,"TDRC")) {
pmp3->year = atoi(utf8_text);
DPRINTF(ERR_DEBUG," Year: %d\n",pmp3->year);
} }
if((!used) && (pid3frame->id[0]=='T') && (utf8_text)) if((!used) && (pid3frame->id[0]=='T') && (utf8_text))

View File

@ -35,6 +35,7 @@ typedef struct tag_mp3file {
int samplerate; int samplerate;
int song_length; int song_length;
int file_size; int file_size;
int year;
int got_id3; int got_id3;
unsigned int id; unsigned int id;