From 029e495c8f2a14b64535622e97776e6407ead6dd Mon Sep 17 00:00:00 2001 From: glubsy Date: Sun, 16 May 2021 21:53:32 +0200 Subject: [PATCH] Remove initial update if no directory was found --- limited_autoload.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/limited_autoload.c b/limited_autoload.c index 303f6fd..1820dc2 100644 --- a/limited_autoload.c +++ b/limited_autoload.c @@ -465,7 +465,9 @@ int on_init() { mpv_free(pl_entries[i]); } free(pl_entries); - update(g_maxReadFiles, g_lastMethod); + if (iNumState) { + update(g_maxReadFiles, g_lastMethod); + } return iNumState; } @@ -716,9 +718,6 @@ void display_added_files(uint64_t num_files) { check_mpv_err(mpv_command(g_Handle, cmd)); } -/* Fetch some more items from the file system. - * @param amount The number of files to fetch. - */ void update(uint64_t amount, enum MethodType method) { debug_print("===============================================\n\ update with method %s, amount %lu.\n", METHOD_NAMES[method], amount);