[libmediaart] extract: Remove checks for storage when it's required on init



commit 9f5f1022c30847e690d22d3afee63fde82f3528e
Author: Martyn Russell <martyn lanedo com>
Date:   Thu Oct 24 10:33:51 2013 +0100

    extract: Remove checks for storage when it's required on init

 libmediaart/extract.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/libmediaart/extract.c b/libmediaart/extract.c
index faecba6..01280ff 100644
--- a/libmediaart/extract.c
+++ b/libmediaart/extract.c
@@ -952,15 +952,6 @@ media_art_copy_to_local (const gchar *filename,
        gboolean on_removable_device = FALSE;
        guint flen;
 
-       /* Determining if we are on a removable device */
-       if (!storage) {
-               /* This is usually because we are running on the
-                * command line, so we don't error here with
-                * g_return_if_fail().
-                */
-               return;
-       }
-
        roots = storage_get_device_roots (storage, STORAGE_REMOVABLE, FALSE);
        flen = strlen (filename);
 
@@ -1087,6 +1078,10 @@ media_art_init (void)
        }
 
        storage = storage_new ();
+       if (!storage) {
+               g_critical ("Could not start storage module for removable media detection");
+               return FALSE;
+       }
 
        initialized = TRUE;
 


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