aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQball Cow <qball@sarine.nl>2011-05-09 21:26:36 +0200
committerMax Kellermann <max@duempel.org>2011-05-09 21:26:36 +0200
commit9ac8f89b1d8a0c2b4a9ba391ce174fbb3fa816e9 (patch)
tree4baf0c67253fd4a5540d344c375815975b066fe7 /src
parentc6a72a14ac391b0c835cd195656c67aecc519b64 (diff)
downloadmpd-9ac8f89b1d8a0c2b4a9ba391ce174fbb3fa816e9.tar.gz
mpd-9ac8f89b1d8a0c2b4a9ba391ce174fbb3fa816e9.tar.xz
mpd-9ac8f89b1d8a0c2b4a9ba391ce174fbb3fa816e9.zip
cue_tag: show CUE track numbers
Diffstat (limited to '')
-rw-r--r--src/cue/cue_tag.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cue/cue_tag.c b/src/cue/cue_tag.c
index ba1172559..6ee38bbd0 100644
--- a/src/cue/cue_tag.c
+++ b/src/cue/cue_tag.c
@@ -178,6 +178,15 @@ cue_tag(struct Cd *cd, unsigned tnum)
if (tag == NULL)
return NULL;
+ /* Create a tag number */
+
+ tag_clear_items_by_type(tag, TAG_TRACK);
+
+ char convert_uinttostring[8];
+ snprintf(convert_uinttostring, sizeof(convert_uinttostring),
+ "%02d/%02d", tnum, cd_get_ntrack(cd));
+ tag_add_item(tag, TAG_TRACK, convert_uinttostring);
+
tag->time = track_get_length(track)
- track_get_index(track, 1)
+ track_get_zero_pre(track);