[gnome-documents/wip/flickr: 12/12] wip/flickr: nie:mimeType added
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/wip/flickr: 12/12] wip/flickr: nie:mimeType added
- Date: Fri, 31 May 2013 16:58:33 +0000 (UTC)
commit 8b306377a344d28c276de1ca0ac42e7d3ff70849
Author: Marek Chalupa <mchalupa redhat com>
Date: Thu May 23 16:54:20 2013 +0200
wip/flickr: nie:mimeType added
src/miner/gd-flickr-miner.c | 28 +++++++++++-----------------
1 files changed, 11 insertions(+), 17 deletions(-)
---
diff --git a/src/miner/gd-flickr-miner.c b/src/miner/gd-flickr-miner.c
index 5f5259e..586bd71 100644
--- a/src/miner/gd-flickr-miner.c
+++ b/src/miner/gd-flickr-miner.c
@@ -305,7 +305,6 @@ account_miner_job_process_entry (struct entry *entry, GError **error)
if (entry->parent != NULL)
{
gchar *parent_resource_urn, *parent_identifier;
- const gchar *parent_id, *mime;
parent_identifier = g_strconcat ("gd:collection:flickr:",
grl_media_get_id (entry->parent) , NULL);
@@ -328,21 +327,7 @@ account_miner_job_process_entry (struct entry *entry, GError **error)
if (*error != NULL)
goto out;
-
- /* FIXME in photos is no such procedure */
- mime = gd_filename_to_mime_type (name);
- if (mime != NULL)
- {
- gd_miner_tracker_sparql_connection_insert_or_replace_triple
- (job->connection,
- job->cancellable, error,
- job->datasource_urn, resource,
- "nie:mimeType", mime);
-
- if (*error != NULL)
- goto out;
- }
- }
+ }
// insert description
gd_miner_tracker_sparql_connection_insert_or_replace_triple
@@ -364,6 +349,16 @@ account_miner_job_process_entry (struct entry *entry, GError **error)
if (*error != NULL)
goto out;
+ // insert mime FIXME - images doesn't have a mime type..
+ gd_miner_tracker_sparql_connection_insert_or_replace_triple
+ (job->connection,
+ job->cancellable, error,
+ job->datasource_urn, resource,
+ "nie:mimeType", grl_media_get_mime (media));
+
+ if (*error != NULL)
+ goto out;
+
contact_resource = gd_miner_tracker_utils_ensure_contact_resource
(job->connection,
job->cancellable, error,
@@ -439,7 +434,6 @@ browse_container_cb (GrlSource *source,
ent = create_entry (media, parent_ent->media, source, parent_ent->data);
account_miner_job_process_entry (ent, &err);
-
if (err != NULL)
{
g_warning ("%s", err->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]