[grilo] core: Don't try to store metadata if already saved



commit 8fb93031f521258073a6037f131bc89f1b7370d1
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Mar 25 10:19:50 2014 +0100

    core: Don't try to store metadata if already saved
    
    When storing an item, don't try to call store_metadata() if
    there are no keys left to write.
    
    This fixes warnings in grilo-test-ui when trying to create a new
    bookmark as all the possible metadata we'd add will already
    be handled.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=673912

 src/grl-source.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/grl-source.c b/src/grl-source.c
index 1097f2e..d2389ad 100644
--- a/src/grl-source.c
+++ b/src/grl-source.c
@@ -2708,7 +2708,7 @@ store_relay_cb (GrlSource *source,
   if (error || !(src->flags & GRL_WRITE_FULL)) {
     if (src->user_callback)
       src->user_callback (source, media, failed_keys, src->user_data, error);
-  } else {
+  } else if (failed_keys != NULL) {
     run_store_metadata (source, media, failed_keys, GRL_WRITE_FULL,
                         src->user_callback, src->user_data);
   }


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