[tracker-miners/wip/jfelder/fix-musicbrainz-writeback: 14/15] tracker-writeback: Fix support for musicbrainz release tags
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/jfelder/fix-musicbrainz-writeback: 14/15] tracker-writeback: Fix support for musicbrainz release tags
- Date: Sun, 15 Aug 2021 10:45:26 +0000 (UTC)
commit 08f0e1b19cc7c5bf3efcd488c65e70f19fb6c1b2
Author: Jean Felder <jfelder src gnome org>
Date: Fri Aug 6 18:35:13 2021 +0200
tracker-writeback: Fix support for musicbrainz release tags
The Musicbrainz Release and Release_Group tags are set on a Album
resource, not a Disc.
src/tracker-writeback/tracker-writeback-gstreamer.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/tracker-writeback/tracker-writeback-gstreamer.c
b/src/tracker-writeback/tracker-writeback-gstreamer.c
index 161877544..ccd89288d 100644
--- a/src/tracker-writeback/tracker-writeback-gstreamer.c
+++ b/src/tracker-writeback/tracker-writeback-gstreamer.c
@@ -734,6 +734,16 @@ writeback_gstreamer_write_file_metadata (TrackerWritebackFile *writeback,
album = tracker_resource_get_first_relation (resource, prop);
if (album) {
+ const gchar *mb_tags[] = {
+ "https://musicbrainz.org/doc/Release",
+ "https://musicbrainz.org/doc/Release_Group",
+ NULL,
+ };
+
+ handle_musicbrainz_tags (album,
+ "tracker:hasExternalReference",
+ element, mb_tags);
+
album_name = tracker_resource_get_first_string (album, "nie:title");
artist = tracker_resource_get_first_relation (album, "nmm:albumArtist");
}
@@ -861,22 +871,12 @@ writeback_gstreamer_write_file_metadata (TrackerWritebackFile *writeback,
disc = tracker_resource_get_first_relation (resource, prop);
if (disc) {
- const gchar *mb_tags[] = {
- "https://musicbrainz.org/doc/Release",
- "https://musicbrainz.org/doc/Release_Group",
- NULL,
- };
-
number = tracker_resource_get_first_int (disc,
"nmm:setNumber");
g_value_init (&val, G_TYPE_INT);
g_value_set_int (&val, number);
writeback_gstreamer_set (element, GST_TAG_ALBUM_VOLUME_NUMBER, &val);
g_value_unset (&val);
-
- handle_musicbrainz_tags (disc,
- "tracker:hasExternalReference",
- element, mb_tags);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]