[tracker-miners/wip/carlosg/timeouts-and-stuff: 1/4] tracker-writeback: Support acoustid tag writeback in gstreamer
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/timeouts-and-stuff: 1/4] tracker-writeback: Support acoustid tag writeback in gstreamer
- Date: Thu, 2 Jul 2020 16:42:20 +0000 (UTC)
commit a97de6b8fbb0c883bd7b9216cc97daa6c3bad721
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jun 29 14:17:28 2020 +0200
tracker-writeback: Support acoustid tag writeback in gstreamer
Handle like the other tags.
.../tracker-writeback-gstreamer.c | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
---
diff --git a/src/tracker-writeback/tracker-writeback-gstreamer.c
b/src/tracker-writeback/tracker-writeback-gstreamer.c
index 2f40cc810..92186a234 100644
--- a/src/tracker-writeback/tracker-writeback-gstreamer.c
+++ b/src/tracker-writeback/tracker-writeback-gstreamer.c
@@ -948,6 +948,29 @@ writeback_gstreamer_write_file_metadata (TrackerWritebackFile *writeback,
handle_musicbrainz_tags (resource, prop, element, mb_tags);
}
+
+ if (g_strcmp0 (prop, "nfo:hasHash") == 0) {
+ TrackerResource *hash;
+ const gchar *value = NULL, *algorithm;
+
+ hash = tracker_resource_get_first_relation (resource, prop);
+
+ if (hash) {
+ algorithm = tracker_resource_get_first_string (hash,
+ "nfo:hashAlgorithm");
+ value = tracker_resource_get_first_string (hash,
+ "nfo:hashValue");
+ }
+
+#ifdef GST_TAG_ACOUSTID_FINGERPRINT
+ if (value && algorithm && g_strcmp0 (algorithm, "chromaprint") == 0) {
+ g_value_init (&val, G_TYPE_STRING);
+ g_value_set_string (&val, value);
+ writeback_gstreamer_set (element, GST_TAG_ACOUSTID_FINGERPRINT, &val);
+ g_value_unset (&val);
+ }
+#endif
+ }
}
writeback_gstreamer_save (element, file, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]