[sound-juicer] Don't retrieve metadata twice at start up



commit 8654a16438f2aa44a0c580764776b35190918402
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Thu Aug 7 11:54:58 2014 +0100

    Don't retrieve metadata twice at start up
    
    When sound-juicer starts up it calls reread_cb() twice, once from
    set_device() and once from media_added_cb(). Add a check to
    media_added_cb() to see if the metadata is already being retrieved
    before calling reread_cd(). If the user changes the device while
    retrieving metadata we still start a new request for the new drive. It
    would be nice to make metadata retrieval cancellable in the future.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705159

 src/sj-main.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/sj-main.c b/src/sj-main.c
index 604d94a..df5c449 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -1281,7 +1281,9 @@ media_added_cb (BraseroMediumMonitor      *drive,
   }
 
   sj_debug (DEBUG_CD, "Media added to device %s\n", brasero_drive_get_device (brasero_medium_get_drive 
(medium)));
-  reread_cd (TRUE);
+  /* Don't call re-read if metadata is already being retreived */
+  if (!get_action_state_bool ("re-read"))
+    reread_cd (TRUE);
 }
 
 static void


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