[tracker-miners/wip/jfelder/fix-musicbrainz-writeback: 45/46] 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: 45/46] tracker-writeback: Fix support for musicbrainz release tags
- Date: Wed, 20 Oct 2021 11:01:22 +0000 (UTC)
commit 4e6633dc978c5eba6ac8058a633a1ae63ef3395c
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]