summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-05-28 23:18:31 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-05-28 23:18:31 +0000
commit6579818b4346a9b455734fb5a067e8d3ab2f09b4 (patch)
treedc234157ee00e026a7110502c5c8379c88721166 /apps/playback.c
parent1bae792e5c2ef6f624c7038ce83cd48aeabf636f (diff)
Add the possibility to store cuesheets in /.rockbox/cue. The code will look for a cuesheet there in case there wasn't one in the same folder as the audio file. This is to reduce the clutter created by one cuesheet per audio file in some places.
Also some duplicate code was replaced by a function call. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13508 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/playback.c b/apps/playback.c
index abc2e9ef30..25dec7a9ff 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -2762,13 +2762,11 @@ static bool audio_load_track(int offset, bool start_play, bool rebuffer)
if (cuesheet_is_enabled() && tracks[track_widx].id3.cuesheet_type == 1)
{
char cuepath[MAX_PATH];
- strncpy(cuepath, trackname, MAX_PATH);
- char *dot = strrchr(cuepath, '.');
- strcpy(dot, ".cue");
struct cuesheet *cue = start_play ? curr_cue : temp_cue;
- if (parse_cuesheet(cuepath, cue))
+ if (look_for_cuesheet_file(trackname, cuepath) &&
+ parse_cuesheet(cuepath, cue))
{
strcpy((cue)->audio_filename, trackname);
if (start_play)