[tracker] extract-iso: Make use of OS variants
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] extract-iso: Make use of OS variants
- Date: Fri, 29 Nov 2013 12:35:10 +0000 (UTC)
commit 76df3810cc526628e6d1501cc3a5e2e7cbee7b42
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Nov 28 19:59:16 2013 +0000
extract-iso: Make use of OS variants
Take the name of first variant as 'nie:title', if any.
https://bugzilla.gnome.org/show_bug.cgi?id=719512
src/tracker-extract/tracker-extract-iso.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-iso.c b/src/tracker-extract/tracker-extract-iso.c
index 261bc7e..2bfae42 100644
--- a/src/tracker-extract/tracker-extract-iso.c
+++ b/src/tracker-extract/tracker-extract-iso.c
@@ -46,6 +46,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info_)
OsinfoMedia *media;
OsinfoDb *db;
OsinfoOs *os;
+ OsinfoOsVariantList *variants;
/* Data input */
gboolean bootable;
@@ -95,7 +96,17 @@ tracker_extract_get_metadata (TrackerExtractInfo *info_)
tracker_sparql_builder_predicate (metadata, "a");
tracker_sparql_builder_object (metadata, "nfo:FilesystemImage");
- name = osinfo_product_get_name (OSINFO_PRODUCT (os));
+ variants = osinfo_media_get_os_variants (media);
+ if (osinfo_list_get_length (OSINFO_LIST (variants)) > 0) {
+ OsinfoEntity *variant;
+
+ /* FIXME: Assuming first variant from multivariant medias. */
+ variant = osinfo_list_get_nth (OSINFO_LIST (variants), 0);
+ name = osinfo_os_variant_get_name (OSINFO_OS_VARIANT (variant));
+ } else {
+ name = osinfo_product_get_name (OSINFO_PRODUCT (os));
+ }
+
if (name != NULL) {
tracker_sparql_builder_predicate (metadata, "nie:title");
tracker_sparql_builder_object_string (metadata, name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]