Otherwise, traks like "Morning Bell/Amnesiac" get trimmed to "Amnesiac"
char *str, *ptr;
str = (char *)mpd_song_get_tag(song, MPD_TAG_TITLE, 0);
- if(str == NULL)
- str = (char *)mpd_song_get_uri(song);
+ if(str == NULL){
+ str = basename((char *)mpd_song_get_uri(song));
+ }
if(str == NULL)
return NULL;
if(*ptr=='"')
*ptr='\'';
- return basename(str);
+ return str;
}
int mpd_put_state(char *buffer, int *current_song_id, unsigned *queue_version)