~ubuntu-branches/ubuntu/trusty/sound-juicer/trusty

« back to all changes in this revision

Viewing changes to libjuicer/sj-extractor.c

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2009-02-13 16:57:30 UTC
  • mfrom: (1.1.37 upstream)
  • Revision ID: james.westby@ubuntu.com-20090213165730-zehs2hnzj2pso94k
Tags: 2.25.3-0ubuntu1
* New upstream release (LP: #329134)
  - Put the disc number in the file name
  - Support multiple genres
  - Use libcanberra for event sounds
  - Handle custom patterns in the prefs dialog
  - Remove Musicbrainz data if the track data is changed
  - Fix disc number editing logic
* debian/control.in:
  - Bump libgstreamer0.10-dev to 0.10.15
  - Build-dep on libcanberra-gtk-dev 
  - Also depend on libcanberra-gtk0
* debian/debian/patches/01_lpi.patch, 
  debian/patches/02_autoconf.patch:
  - Refreshed for the new upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#endif /* HAVE_CONFIG_H */
26
26
 
27
27
#include <string.h>
28
 
#include <glib/gerror.h>
29
 
#include <glib/gtypes.h>
 
28
#include <glib.h>
30
29
#include <glib/gi18n.h>
31
30
#include <glib-object.h>
32
31
#include <gst/gst.h>
525
524
                               GST_TAG_DURATION, track->duration * GST_SECOND,
526
525
                               NULL);
527
526
 
528
 
#ifdef GST_TAG_MUSICBRAINZ_ALBUMID
529
527
      if (track->album->album_id != NULL && strcmp (track->album->album_id, "") != 0) {
530
528
        gst_tag_setter_add_tags (tagger,
531
529
                            GST_TAG_MERGE_APPEND,
553
551
      if (track->artist_sortname != NULL && strcmp (track->artist_sortname, "") != 0) {
554
552
        gst_tag_setter_add_tags (tagger,
555
553
                            GST_TAG_MERGE_APPEND,
556
 
                            GST_TAG_MUSICBRAINZ_SORTNAME, track->artist_sortname,
 
554
                            GST_TAG_ARTIST_SORTNAME, track->artist_sortname,
557
555
                            NULL);
558
556
      }
559
 
#endif
560
557
 
561
558
      if (track->album->genre != NULL && strcmp (track->album->genre, "") != 0) {
562
 
        gst_tag_setter_add_tags (tagger,
563
 
                                 GST_TAG_MERGE_APPEND,
564
 
                                 GST_TAG_GENRE, track->album->genre,
565
 
                                 NULL);
 
559
        char **values, **l;
 
560
        values = g_strsplit (track->album->genre, ",", 0);
 
561
        for (l = values; *l; l++) {
 
562
          g_strstrip (*l);
 
563
          gst_tag_setter_add_tags (tagger,
 
564
                                   GST_TAG_MERGE_APPEND,
 
565
                                   GST_TAG_GENRE, *l,
 
566
                                   NULL);
 
567
        }
 
568
        g_strfreev (values);
566
569
      }
567
570
      if (track->album->release_date) {
568
571
        gst_tag_setter_add_tags (tagger,
579
582
      gst_object_unref (tagger);
580
583
      break;
581
584
    case GST_ITERATOR_RESYNC:
582
 
      // TODO?
 
585
      /* TODO? */
583
586
      g_warning ("Got GST_ITERATOR_RESYNC, not sure what to do");
584
587
      gst_iterator_resync (iter);
585
588
      break;