Skip to content

Commit

Permalink
Remove initial update if no directory was found
Browse files Browse the repository at this point in the history
  • Loading branch information
glubsy committed May 16, 2021
1 parent 6c65764 commit 029e495
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions limited_autoload.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 029e495

Please sign in to comment.