[libmediaart/wip/phako/remove-storage: 2/2] extract: Remove Storage



commit 193575c1bee1e3d57bda2884a0e9a72f9ffcaebb
Author: Jens Georg <mail jensge org>
Date:   Sun May 31 15:56:23 2020 +0200

    extract: Remove Storage
    
    After the removal of mediaartlocal, this is useless now.
    
    It can also cause some lock-ups if gvfs is missing

 libmediaart/Makefile.am |    4 +-
 libmediaart/extract.c   |   19 +-
 libmediaart/meson.build |    1 -
 libmediaart/storage.c   | 1100 -----------------------------------------------
 libmediaart/storage.h   |  118 -----
 5 files changed, 2 insertions(+), 1240 deletions(-)
---
diff --git a/libmediaart/Makefile.am b/libmediaart/Makefile.am
index baea0d3..42a270b 100644
--- a/libmediaart/Makefile.am
+++ b/libmediaart/Makefile.am
@@ -21,9 +21,7 @@ libmediaart_sources = \
        cache.h \
        extract.c \
        extract.h \
-       extractgeneric.h \
-       storage.c \
-       storage.h
+       extractgeneric.h
 
 libmediaartinclude_HEADERS = \
        mediaart.h \
diff --git a/libmediaart/extract.c b/libmediaart/extract.c
index 4ff61bb..d505285 100644
--- a/libmediaart/extract.c
+++ b/libmediaart/extract.c
@@ -28,7 +28,6 @@
 #include <gio/gio.h>
 
 #include "extractgeneric.h"
-#include "storage.h"
 
 #include "extract.h"
 #include "cache.h"
@@ -69,7 +68,6 @@ typedef struct {
        gboolean disable_requests;
 
        GHashTable *media_art_cache;
-       Storage *storage;
 } MediaArtProcessPrivate;
 
 static const gchar *media_art_type_name[MEDIA_ART_TYPE_COUNT] = {
@@ -123,10 +121,6 @@ media_art_process_finalize (GObject *object)
        process = MEDIA_ART_PROCESS (object);
        private = media_art_process_get_instance_private (process);
 
-       if (private->storage) {
-               g_object_unref (private->storage);
-       }
-
        if (private->media_art_cache) {
                g_hash_table_unref (private->media_art_cache);
        }
@@ -159,16 +153,6 @@ media_art_process_initable_init (GInitable     *initable,
                                                          (GDestroyNotify) g_free,
                                                          NULL);
 
-       private->storage = storage_new ();
-       if (!private->storage) {
-               g_critical ("Could not start storage module for removable media detection");
-               g_set_error_literal (error,
-                                    media_art_error_quark (),
-                                    MEDIA_ART_ERROR_NO_STORAGE,
-                                    _("Could not initialize storage module"));
-               return FALSE;
-       }
-
        /* Returns 0 if already exists, so we don't check if directory
         * existed before, it's an additional stat() call we just
         * don't need.
@@ -215,8 +199,7 @@ media_art_process_init (MediaArtProcess *thumbnailer)
  *
  * Initialize a GObject for processing and extracting media art.
  *
- * This function initializes cache hash tables, backend plugins,
- * and storage modules used for removable devices.
+ * This function initializes cache hash tables and backend plugins,
  *
  * Returns: A new #MediaArtProcess object on success or %NULL if
  * @error is set. This object must be freed using g_object_unref().
diff --git a/libmediaart/meson.build b/libmediaart/meson.build
index 265a9ab..4f15513 100644
--- a/libmediaart/meson.build
+++ b/libmediaart/meson.build
@@ -13,7 +13,6 @@ libmediaart_introspection_sources = [
 libmediaart_sources = [
   'cache.c',
   'extract.c',
-  'storage.c'
 ]
 
 if image_library_name == 'gdk-pixbuf-2.0'


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