[tracker/wip/sam/resource: 2/8] squash! Use TrackerResource instead of TrackerSparqlBuilder in all extractors



commit f082d087509ec6a8830531405f8835d5e031d688
Author: Sam Thursfield <sam afuera me uk>
Date:   Sat Jun 11 00:02:19 2016 +0100

    squash! Use TrackerResource instead of TrackerSparqlBuilder in all extractors
    
    Actually use the TrackerResource that was returned, instead of
    uninitialized memory :-)
    
    This also removes a FIXME which I think isn't important now -- even if
    this is a problem, right now it'll only affect whole-CD .flac files
    which the user edits or overwrites with other whole-CD .flac files. I
    spent ages trying to produce such a file as a test-case and failed.

 src/tracker-extract/tracker-extract-decorator.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-decorator.c b/src/tracker-extract/tracker-extract-decorator.c
index 276f57f..43ac546 100644
--- a/src/tracker-extract/tracker-extract-decorator.c
+++ b/src/tracker-extract/tracker-extract-decorator.c
@@ -150,16 +150,7 @@ decorator_save_info (TrackerSparqlBuilder    *sparql,
        TrackerResource *resource;
        TrackerNamespaceManager *namespaces = tracker_namespace_manager_get_default ();
 
-       /* FIXME: need to delete anything that nie:isStoredAs the resource we
-        * are updating .... right ?? no, that sounds wrong, but you do need to
-        * delete anything this extractor might create .... 
-        *  hmm, a sticky problem.
-        * i.e. if the cuesheet of a flac file is changed completely, then all the
-        * existing tracks need to be removed. that's specific to the gstreamer
-        * extractor though. ugh I guess u need a tracker-extract-info hack to 
-        * say 'remove resource of this type that are stored as this file.' .. :(
-        */
-
+       resource = tracker_extract_info_get_resource (info);
        urn = tracker_decorator_info_get_urn (decorator_info);
 
        tracker_resource_set_identifier (resource, urn);


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