From ef19fa4408ed48e29fa3307af0b288efa61c4901 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sun, 6 Oct 2024 01:11:16 +0200 Subject: [PATCH] plugin load / tagtree retrieval: eliminate storage_disk_is_active check Since commit e0df995 storage_disk_is_active may be 0 even if there is no disk that needs to be spun up or device to power on, so it doesn't really make sense to check for it, anymore, in order to decide whether to display the loading indicator. For remaining devices with spinning disks, the noise or vibration of the disk spinning up may serve as a sufficient signal when loading a plugin, that the device isn't frozen. Plus, for the tagtree, search progress is displayed after 0.5s anyway. Change-Id: I5791725e2388d7113818a358204968d8a4e6f843 --- apps/plugin.c | 4 ---- apps/tagtree.c | 14 ++------------ 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/apps/plugin.c b/apps/plugin.c index adf207da79..f864a1d90b 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -882,10 +882,6 @@ int plugin_load(const char* plugin, const void* parameter) } } -#ifdef HAVE_DISK_STORAGE - if (!storage_disk_is_active()) - splash(0, ID2P(LANG_WAIT)); -#endif strcpy(current_plugin, plugin); current_plugin_handle = lc_open(plugin, pluginbuf, PLUGIN_BUFFER_SIZE); if (current_plugin_handle == NULL) { diff --git a/apps/tagtree.c b/apps/tagtree.c index 83bfb4e36d..6b93b36561 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -1465,18 +1465,8 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init) int sort_limit; int strip; - /* Show search progress straight away if the disk needs to spin up, - otherwise show it after the normal 1/2 second delay */ - show_search_progress( -#ifdef HAVE_DISK_STORAGE -#ifdef HAVE_TC_RAMCACHE - tagcache_is_in_ram() ? true : -#endif - storage_disk_is_active() -#else - true -#endif - , 0, 0, 0); + /* Show search progress after 0.5s delay */ + show_search_progress(true, 0, 0, 0); if (c->currtable == TABLE_ALLSUBENTRIES) {