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

View file

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