1
0
Fork 0
forked from len0rd/rockbox

Accept FS#7482 by Klaas Bosteels - return the full path of a file which doesnt have valid tags yet (and use the end of the filename for the title) instead of before which was only using the filename

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18820 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2008-10-16 11:11:45 +00:00
parent 71898e5c54
commit 00a228fefb
2 changed files with 6 additions and 8 deletions

View file

@ -559,7 +559,6 @@ int audio_current_aa_hid(void)
struct mp3entry* audio_current_track(void)
{
const char *filename;
const char *p;
static struct mp3entry temp_id3;
struct playlist_track_info trackinfo;
int cur_idx;
@ -602,14 +601,12 @@ struct mp3entry* audio_current_track(void)
return &temp_id3;
#endif
p = strrchr(filename, '/');
if (!p)
p = filename;
else
p++;
strncpy(temp_id3.path, p, sizeof(temp_id3.path)-1);
strncpy(temp_id3.path, filename, sizeof(temp_id3.path)-1);
temp_id3.title = strrchr(temp_id3.path, '/');
if (!temp_id3.title)
temp_id3.title = &temp_id3.path[0];
else
temp_id3.title++;
return &temp_id3;
}

View file

@ -426,6 +426,7 @@ Eric Lassauge
François Dinel
Francesco Rigoni
Joël Puik
Klaas Bosteels
The libmad team
The wavpack team