[tracker/tracker-0.12: 165/202] tracker-extract: Fix cuesheet track numbers
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.12: 165/202] tracker-extract: Fix cuesheet track numbers
- Date: Thu, 6 Oct 2011 18:02:19 +0000 (UTC)
commit 76bf694abb5df9f23dba51f372cefd24624d89ee
Author: Sam Thursfield <ssssam gmail com>
Date: Fri Sep 30 15:39:27 2011 +0100
tracker-extract: Fix cuesheet track numbers
The TrackerToc object only stores entries relevant to the file currently
being extracted. We need to calculate the track number earlier when we
have knowledge of every track in the cue sheet.
src/tracker-extract/tracker-cue-sheet.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/src/tracker-extract/tracker-cue-sheet.c b/src/tracker-extract/tracker-cue-sheet.c
index 44827a7..c6be5de 100644
--- a/src/tracker-extract/tracker-cue-sheet.c
+++ b/src/tracker-extract/tracker-cue-sheet.c
@@ -188,17 +188,9 @@ process_toc_tags (TrackerToc *toc)
gst_tag_list_get_string (toc->tag_list, GST_TAG_ALBUM_ARTIST, &album_artist);
- i = 1;
- for (node=toc->entry_list; node; node=node->next, i++) {
+ for (node=toc->entry_list; node; node=node->next) {
TrackerTocEntry *entry = node->data;
- if (gst_tag_list_get_tag_size (toc->tag_list, GST_TAG_TRACK_NUMBER) == 0)
- gst_tag_list_add (entry->tag_list,
- GST_TAG_MERGE_REPLACE,
- GST_TAG_TRACK_NUMBER,
- i,
- NULL);
-
if (album_artist != NULL) {
if (gst_tag_list_get_tag_size (toc->tag_list, GST_TAG_ARTIST) == 0 &&
gst_tag_list_get_tag_size (toc->tag_list, GST_TAG_PERFORMER) == 0)
@@ -272,6 +264,13 @@ parse_cue_sheet_for_file (const gchar *cue_sheet,
track_get_cdtext (track),
track_get_rem (track));
+ gst_tag_list_add (entry->tag_list,
+ GST_TAG_MERGE_REPLACE,
+ GST_TAG_TRACK_NUMBER,
+ i,
+ NULL);
+
+
toc->entry_list = g_list_prepend (toc->entry_list, toc_entry);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]