Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions menu/cbs/menu_cbs_ok.c
Original file line number Diff line number Diff line change
Expand Up @@ -1991,13 +1991,6 @@ static bool menu_content_find_first_core(
return true;
}

#ifdef HAVE_LIBRETRODB
void handle_dbscan_finished(retro_task_t *task,
void *task_data, void *user_data, const char *err);
#endif



static int file_load_with_detect_core_wrapper(
enum msg_hash_enums enum_label_idx,
size_t idx, size_t entry_idx,
Expand Down Expand Up @@ -8456,7 +8449,7 @@ static int action_ok_manual_content_scan_start(const char *path,
settings->bools.playlist_portable_paths ?
settings->paths.directory_menu_content : NULL);

task_push_manual_content_scan(&playlist_config, directory_playlist);
task_push_manual_content_scan(true);
return 0;
}

Expand Down Expand Up @@ -9031,8 +9024,7 @@ static int action_ok_playlist_refresh(const char *path,
settings->bools.playlist_portable_paths ?
settings->paths.directory_menu_content : NULL);

task_push_manual_content_scan(playlist_config,
settings->paths.directory_playlist);
task_push_manual_content_scan(true);
}
return 0;
}
Expand Down
18 changes: 13 additions & 5 deletions tasks/task_database.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ enum db_flags_enum
DB_HANDLE_FLAG_SCAN_STARTED = (1 << 1),
DB_HANDLE_FLAG_SCAN_WITHOUT_CORE_MATCH = (1 << 2),
DB_HANDLE_FLAG_SHOW_HIDDEN_FILES = (1 << 3),
DB_HANDLE_FLAG_USE_FIRST_MATCH_ONLY = (1 << 4)
DB_HANDLE_FLAG_USE_FIRST_MATCH_ONLY = (1 << 4),
DB_HANDLE_FLAG_DO_MENU_REFRESH = (1 << 5)
};

enum manual_scan_status
Expand Down Expand Up @@ -1651,7 +1652,7 @@ bool task_push_dbscan(
{
manual_content_scan_set_menu_content_dir(fullpath);
/*manual_content_scan_set_menu_scan_method(MANUAL_CONTENT_SCAN_METHOD_AUTOMATIC);*/
return task_push_manual_content_scan(NULL,NULL);
return task_push_manual_content_scan(false);
}

#endif
Expand Down Expand Up @@ -1783,7 +1784,12 @@ static void cb_task_manual_content_scan(
end:
/* When creating playlists, the playlist tabs of
* any active menu driver must be refreshed */
if (menu_st->driver_ctx->environ_cb)
if (
#ifdef HAVE_LIBRETRODB
(!manual_scan ||
(manual_scan->flags & DB_HANDLE_FLAG_DO_MENU_REFRESH)) &&
#endif
menu_st->driver_ctx->environ_cb)
menu_st->driver_ctx->environ_cb(MENU_ENVIRON_RESET_HORIZONTAL_LIST,
NULL, menu_st->userdata);
#endif
Expand Down Expand Up @@ -2441,8 +2447,7 @@ static bool task_manual_content_scan_finder(retro_task_t *task, void *user_data)
}

bool task_push_manual_content_scan(
const playlist_config_t *playlist_config,
const char *playlist_directory)
bool do_menu_refresh)
{
size_t _len;
task_finder_data_t find_data;
Expand Down Expand Up @@ -2490,6 +2495,9 @@ bool task_push_manual_content_scan(
if (settings->bools.show_hidden_files)
manual_scan->flags |= DB_HANDLE_FLAG_SHOW_HIDDEN_FILES;

if (do_menu_refresh)
manual_scan->flags |= DB_HANDLE_FLAG_DO_MENU_REFRESH;

manual_scan->content_database_path = strdup(settings->paths.path_content_database);
#endif
manual_scan->playlist_directory = strdup(playlist_dir);
Expand Down
3 changes: 1 addition & 2 deletions tasks/tasks_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ bool task_push_dbscan(
#endif

bool task_push_manual_content_scan(
const playlist_config_t *playlist_config,
const char *playlist_directory);
bool do_menu_refresh);

#ifdef HAVE_OVERLAY
bool task_push_overlay_load_default(
Expand Down
Loading