[tracker-miners/wip/jfelder/fix-musicbrainz-writeback: 3/4] 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: 3/4] tracker-writeback: Fix support for musicbrainz release tags
- Date: Sun, 15 Aug 2021 10:55:59 +0000 (UTC)
commit 4271fec01a577123e2e3a53f0d89d085f2c60267
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 fcb8ba7d3..1ef9f19d0 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]