Add ability to concat title and artist on compilation tracks

This commit is contained in:
Ron Pedde 2006-03-05 02:03:11 +00:00
parent 9e5f21db7f
commit 1e48e88215

View File

@ -654,6 +654,7 @@ int scan_get_info(char *file, MP3FILE *pmp3) {
*/ */
void make_composite_tags(MP3FILE *song) { void make_composite_tags(MP3FILE *song) {
int len; int len;
char *ptmp;
len=0; len=0;
@ -678,6 +679,18 @@ void make_composite_tags(MP3FILE *song) {
} }
} }
if((conf_get_int("scanning","concat compilations",0)) &&
song->artist &&
song->title) {
len = strlen(song->artist) + strlen(song->title);
ptmp = (char*)malloc(len + 4);
if(ptmp) {
sprintf(ptmp,"%s - %s",song->artist, song->title);
free(song->title);
song->title = ptmp;
}
}
if(song->url) { if(song->url) {
song->data_kind=1; song->data_kind=1;
} else { } else {