[sound-juicer] Use GST_TAG_DATE_TIME to set 'year' tag



commit 27d7b800239a73931df1804b86341eb198a7de38
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Tue Apr 8 11:24:27 2014 +0200

    Use GST_TAG_DATE_TIME to set 'year' tag
    
    GStreamer tagging elements only consider the GST_TAG_DATE_TIME and don't
    do anything with the GST_TAG_DATE tag sound-juicer was trying to set.
    
    This fixes https://bugzilla.gnome.org/show_bug.cgi?id=693048

 libjuicer/sj-extractor.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/libjuicer/sj-extractor.c b/libjuicer/sj-extractor.c
index 4b70439..4d318b7 100644
--- a/libjuicer/sj-extractor.c
+++ b/libjuicer/sj-extractor.c
@@ -599,12 +599,24 @@ sj_extractor_extract_track (SjExtractor *extractor, const TrackDetails *track, G
         }
         g_strfreev (values);
       }
+
       if (track->album->release_date) {
+        GstDateTime *date;
+        date = gst_date_time_new_ymd (g_date_get_year (track->album->release_date),
+                                      g_date_get_month (track->album->release_date),
+                                      g_date_get_day (track->album->release_date));
+        /* We set both GST_TAG_DATE_TIME and GST_TAG_DATE as most taggers
+         * use GST_TAG__DATE_TIME, but a few (id3v2mux/apemux) are still using
+         * GST_TAG_DATE
+         */
         gst_tag_setter_add_tags (tagger,
                                  GST_TAG_MERGE_APPEND,
+                                 GST_TAG_DATE_TIME, date,
                                  GST_TAG_DATE, track->album->release_date,
                                  NULL);
+        gst_date_time_unref (date);
       }
+
       if (track->album->disc_number > 0) {
         gst_tag_setter_add_tags (tagger,
                                  GST_TAG_MERGE_APPEND,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]