summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@jollamobile.com>2016-08-12 12:40:34 +0200
committerCarlos Garnacho <carlosg@gnome.org>2016-10-09 12:52:36 +0200
commit3be0725846d22aa23061da46abc37ae02ecdbc8f (patch)
tree83e1a9cd862eacf1f964b8997088720a12e2a964
parentfb896dc2107fdcb610ee0a1c91e1a7b5910f4a60 (diff)
downloadtracker-3be0725846d22aa23061da46abc37ae02ecdbc8f.tar.gz
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
-rw-r--r--src/tracker-extract/10-flac.rule2
-rw-r--r--src/tracker-extract/tracker-extract-flac.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tracker-extract/10-flac.rule b/src/tracker-extract/10-flac.rule
index 150301c07..6b4658814 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 5185b4b6f..9cc29d27c 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);