[tracker] tracker-extract: Use ISO volume ID as title for unknown OS
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Use ISO volume ID as title for unknown OS
- Date: Wed, 22 Feb 2012 17:08:00 +0000 (UTC)
commit 0631ee9f12065f96753f9bf7510d954bfbabf8f5
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Feb 17 17:41:53 2012 +0200
tracker-extract: Use ISO volume ID as title for unknown OS
Fixes GB#670294
src/tracker-extract/tracker-extract-iso.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-iso.c b/src/tracker-extract/tracker-extract-iso.c
index c1ffff5..35694c3 100644
--- a/src/tracker-extract/tracker-extract-iso.c
+++ b/src/tracker-extract/tracker-extract-iso.c
@@ -90,7 +90,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info_)
os = osinfo_db_guess_os_from_media (db, media, &matched_media);
if (os == NULL)
- goto no_os;
+ goto unknown_os;
tracker_sparql_builder_predicate (metadata, "a");
tracker_sparql_builder_object (metadata, "nfo:FilesystemImage");
@@ -131,6 +131,16 @@ tracker_extract_get_metadata (TrackerExtractInfo *info_)
return TRUE;
+unknown_os:
+ name = osinfo_media_get_volume_id (media);
+ if (name != NULL) {
+ gchar *stripped = g_strdup (name);
+
+ g_strstrip (stripped);
+ tracker_sparql_builder_predicate (metadata, "nie:title");
+ tracker_sparql_builder_object_string (metadata, stripped);
+ g_free (stripped);
+ }
no_os:
if (media != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]