[grilo-plugins] grl-tracker-utils: Add mapping from tracker for MusicBrainz IDs



commit ba775e3d94e368babc88d52e71a3a8a02f77b77d
Author: Sumaid Syed <sumaidsyed gmail com>
Date:   Thu Jun 13 21:14:10 2019 +0530

    grl-tracker-utils: Add mapping from tracker for MusicBrainz IDs
    
    Add mapping as follows:
    nmm:mbTrackID   -  GRL_METADATA_KEY_MB_TRACK_ID
    nmm:mbArtistID   -  GRL_METADATA_KEY_MB_ARTIST_ID
    nmm:mbRecordingID   -  GRL_METADATA_KEY_MB_RECORDING_ID
    nmm:mbReleaseID   -  GRL_METADATA_KEY_MB_RELEASE_ID
    nmm:mbReleaseGroupID   -  GRL_METADATA_KEY_MB_RELEASE_GROUP_ID
    
    MusicBrainz Release ID and Release Group ID are supported in
    grilo since 0.3.8
    
    https://gitlab.gnome.org/GNOME/grilo-plugins/issues/48

 meson.build                     |  2 +-
 src/tracker/grl-tracker-utils.c | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index e45c5ab..157c8c2 100644
--- a/meson.build
+++ b/meson.build
@@ -27,7 +27,7 @@ datadir = get_option('datadir')
 pluginsdir =join_paths(libdir, 'grilo-@0@.@1@'.format(grl_major, grl_minor))
 
 glib2_required = '2.44'
-grilo_required = '0.3.6'
+grilo_required = '0.3.8'
 glib2_required_info = '>= @0@'.format(glib2_required)
 grilo_required_info = '>= @0@'.format(grilo_required)
 
diff --git a/src/tracker/grl-tracker-utils.c b/src/tracker/grl-tracker-utils.c
index 254db97..3d64ddd 100644
--- a/src/tracker/grl-tracker-utils.c
+++ b/src/tracker/grl-tracker-utils.c
@@ -276,6 +276,31 @@ grl_tracker_setup_key_mappings (void)
                       "nfo:duration(?urn)",
                       "audio");
 
+  insert_key_mapping (GRL_METADATA_KEY_MB_TRACK_ID,
+                      "nmm:mbTrackID",
+                      "nmm:mbTrackID(?urn)",
+                      "audio");
+
+  insert_key_mapping (GRL_METADATA_KEY_MB_ARTIST_ID,
+                      "nmm:mbArtistID",
+                      "nmm:mbArtistID(?urn)",
+                      "audio");
+
+  insert_key_mapping (GRL_METADATA_KEY_MB_RECORDING_ID,
+                      "nmm:mbRecordingID",
+                      "nmm:mbRecordingID(?urn)",
+                      "audio");
+
+  insert_key_mapping (GRL_METADATA_KEY_MB_RELEASE_ID,
+                      "nmm:mbReleaseID",
+                      "nmm:mbReleaseID(?urn)",
+                      "audio");
+
+  insert_key_mapping (GRL_METADATA_KEY_MB_RELEASE_GROUP_ID,
+                      "nmm:mbReleaseGroupID",
+                      "nmm:mbReleaseGroupID(?urn)",
+                      "audio");
+
   insert_key_mapping (GRL_METADATA_KEY_FRAMERATE,
                       "nfo:frameRate",
                       "nfo:frameRate(?urn)",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]