[tracker] Fix FLAC artist and album tag parsing, and add 'audio/flac' mime type to the extract rules.



commit 3be0725846d22aa23061da46abc37ae02ecdbc8f
Author: Andrew Branson <andrew branson jollamobile com>
Date:   Fri Aug 12 12:40:34 2016 +0200

    Fix FLAC artist and album tag parsing, and add 'audio/flac' mime type to the extract rules.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=772596

 src/tracker-extract/10-flac.rule           |    2 +-
 src/tracker-extract/tracker-extract-flac.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-extract/10-flac.rule b/src/tracker-extract/10-flac.rule
index 150301c..6b46588 100644
--- a/src/tracker-extract/10-flac.rule
+++ b/src/tracker-extract/10-flac.rule
@@ -1,4 +1,4 @@
 [ExtractorRule]
 ModulePath=libextract-flac.so
-MimeTypes=audio/x-flac
+MimeTypes=audio/flac;audio/x-flac
 FallbackRdfTypes=nmm:MusicPiece;nfo:Audio;
diff --git a/src/tracker-extract/tracker-extract-flac.c b/src/tracker-extract/tracker-extract-flac.c
index 5185b4b..9cc29d2 100644
--- a/src/tracker-extract/tracker-extract-flac.c
+++ b/src/tracker-extract/tracker-extract-flac.c
@@ -81,12 +81,12 @@ parse_vorbis_comments (FLAC__StreamMetadata_VorbisComment *comment,
                /* entry.entry is the format NAME=metadata */
                if (g_ascii_strncasecmp (entry.entry, "title", 5) == 0) {
                        fd->title = g_strdup (entry.entry + 6);
-               } else if (g_ascii_strncasecmp (entry.entry, "artist", 6) == 0) {
+               } else if (g_ascii_strncasecmp (entry.entry, "artist=", 7) == 0) {
                        /* FIXME: Handle multiple instances of artist */
                        if (fd->artist == NULL) {
                                fd->artist = g_strdup (entry.entry + 7);
                        }
-               } else if (g_ascii_strncasecmp (entry.entry, "album", 5) == 0) {
+               } else if (g_ascii_strncasecmp (entry.entry, "album=", 6) == 0) {
                        fd->album = g_strdup (entry.entry + 6);
                } else if (g_ascii_strncasecmp (entry.entry, "albumartist", 11) == 0) {
                        fd->albumartist = g_strdup (entry.entry + 12);


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