summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-10-16 11:11:45 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-10-16 11:11:45 +0000
commit00a228fefbfc9058b89ba914755aa9d5f31da085 (patch)
treee48effa29fb610b9382d1af460484a644ac66785
parent71898e5c547e1f92bb128aede558938873f56d3c (diff)
downloadrockbox-00a228fefbfc9058b89ba914755aa9d5f31da085.tar.gz
rockbox-00a228fefbfc9058b89ba914755aa9d5f31da085.zip
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
-rw-r--r--apps/playback.c13
-rw-r--r--docs/CREDITS1
2 files changed, 6 insertions, 8 deletions
diff --git a/apps/playback.c b/apps/playback.c
index c7c0b5e9c4..f41cca64a2 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -559,7 +559,6 @@ int audio_current_aa_hid(void)
559struct mp3entry* audio_current_track(void) 559struct mp3entry* audio_current_track(void)
560{ 560{
561 const char *filename; 561 const char *filename;
562 const char *p;
563 static struct mp3entry temp_id3; 562 static struct mp3entry temp_id3;
564 struct playlist_track_info trackinfo; 563 struct playlist_track_info trackinfo;
565 int cur_idx; 564 int cur_idx;
@@ -602,14 +601,12 @@ struct mp3entry* audio_current_track(void)
602 return &temp_id3; 601 return &temp_id3;
603#endif 602#endif
604 603
605 p = strrchr(filename, '/'); 604 strncpy(temp_id3.path, filename, sizeof(temp_id3.path)-1);
606 if (!p) 605 temp_id3.title = strrchr(temp_id3.path, '/');
607 p = filename; 606 if (!temp_id3.title)
607 temp_id3.title = &temp_id3.path[0];
608 else 608 else
609 p++; 609 temp_id3.title++;
610
611 strncpy(temp_id3.path, p, sizeof(temp_id3.path)-1);
612 temp_id3.title = &temp_id3.path[0];
613 610
614 return &temp_id3; 611 return &temp_id3;
615} 612}
diff --git a/docs/CREDITS b/docs/CREDITS
index c1a0974a9f..f2244e9185 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -426,6 +426,7 @@ Eric Lassauge
426François Dinel 426François Dinel
427Francesco Rigoni 427Francesco Rigoni
428Joël Puik 428Joël Puik
429Klaas Bosteels
429 430
430The libmad team 431The libmad team
431The wavpack team 432The wavpack team