From 6579818b4346a9b455734fb5a067e8d3ab2f09b4 Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Mon, 28 May 2007 23:18:31 +0000 Subject: 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 --- apps/gui/gwps-common.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'apps/gui/gwps-common.c') diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 5524c1490e..b25168f252 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -389,11 +389,9 @@ bool update(struct gui_wps *gwps) /* We need to parse the new cuesheet */ char cuepath[MAX_PATH]; - strncpy(cuepath, gwps->state->id3->path, MAX_PATH); - char *dot = strrchr(cuepath, '.'); - strcpy(dot, ".cue"); - if (parse_cuesheet(cuepath, curr_cue)) + if (look_for_cuesheet_file(gwps->state->id3->path, cuepath) && + parse_cuesheet(cuepath, curr_cue)) { gwps->state->id3->cuesheet_type = 1; strcpy(curr_cue->audio_filename, gwps->state->id3->path); -- cgit v1.2.3