Skip to content
Open
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
2 changes: 1 addition & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ OBJ += \
$(LIBRETRO_COMM_DIR)/playlists/label_sanitization.o \
$(LIBRETRO_COMM_DIR)/time/rtime.o \
manual_content_scan.o \
tasks/task_database.o \
disk_control_interface.o

ifeq ($(HAVE_CONFIGFILE), 1)
Expand Down Expand Up @@ -583,7 +584,6 @@ ifeq ($(HAVE_LIBRETRODB), 1)
libretro-db/rmsgpack.o \
libretro-db/rmsgpack_dom.o \
database_info.o \
tasks/task_database.o \
tasks/task_database_cue.o

ifeq ($(HAVE_MENU), 1)
Expand Down
26 changes: 14 additions & 12 deletions database_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include "core_info.h"
#include "database_info.h"
#include "manual_content_scan.h"

int database_info_build_query_enum(char *s, size_t len,
enum database_query_type type,
Expand Down Expand Up @@ -797,8 +798,9 @@ static int dir_entry_compare(const void *left, const void *right)
}

database_info_handle_t *database_info_dir_init(const char *dir,
enum database_type type, retro_task_t *task,
bool show_hidden_files)
enum database_type type, char *file_exts,
bool show_hidden_files, bool recursive, bool include_archive,
struct string_list **content_list)
{
core_info_list_t *core_info_list = NULL;
struct string_list *list = NULL;
Expand All @@ -808,11 +810,13 @@ database_info_handle_t *database_info_dir_init(const char *dir,
if (!db)
return NULL;

core_info_get_list(&core_info_list);
/* File list will include all supported files, unless extension list is given */
if (string_is_empty(file_exts))
core_info_get_list(&core_info_list);

if (!(list = dir_list_new(dir, core_info_list ? core_info_list->all_ext : NULL,
if (!(list = dir_list_new(dir, core_info_list ? core_info_list->all_ext : file_exts,
false, show_hidden_files,
false, true)))
include_archive, recursive)))
{
free(db);
return NULL;
Expand All @@ -823,14 +827,13 @@ database_info_handle_t *database_info_dir_init(const char *dir,

db->status = DATABASE_STATUS_ITERATE;
db->type = type;
db->list_ptr = 0;
db->list = list;
*content_list = list;

return db;
}

database_info_handle_t *database_info_file_init(const char *path,
enum database_type type, retro_task_t *task)
enum database_type type, retro_task_t *task, struct string_list **content_list)
{
union string_list_elem_attr attr;
struct string_list *list = NULL;
Expand All @@ -851,16 +854,15 @@ database_info_handle_t *database_info_file_init(const char *path,

db->status = DATABASE_STATUS_ITERATE;
db->type = type;
db->list_ptr = 0;
db->list = list;
*content_list = list;

return db;
}

void database_info_free(database_info_handle_t *db)
{
if (db)
string_list_free(db->list);
/* if (db)
string_list_free(db->list);*/
}

database_info_list_t *database_info_list_new(
Expand Down
9 changes: 4 additions & 5 deletions database_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ enum database_query_type

typedef struct
{
struct string_list *list;
size_t list_ptr;
enum database_status status;
enum database_type type;
} database_info_handle_t;
Expand Down Expand Up @@ -145,11 +143,12 @@ database_info_list_t *database_info_list_new(const char *rdb_path,
void database_info_list_free(database_info_list_t *list);

database_info_handle_t *database_info_dir_init(const char *dir,
enum database_type type, retro_task_t *task,
bool show_hidden_files);
enum database_type type, char* file_exts,
bool show_hidden_files, bool recursive, bool include_archive,
struct string_list **content_list);

database_info_handle_t *database_info_file_init(const char *path,
enum database_type type, retro_task_t *task);
enum database_type type, retro_task_t *task, struct string_list **content_list);

void database_info_free(database_info_handle_t *handle);

Expand Down
20 changes: 10 additions & 10 deletions intl/msg_hash_us.h
Original file line number Diff line number Diff line change
Expand Up @@ -7993,7 +7993,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_REFRESH_PLAYLIST,
"Add new content and remove invalid entries by repeating the 'Manual Scan' operation last used to create or edit the playlist."
"Add new content and remove invalid entries by repeating the content scan operation last used to create or edit the playlist."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
Expand Down Expand Up @@ -8590,11 +8590,11 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_LIST,
"Manual Scan"
"Content Scan"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_LIST,
"Configurable scan based on content file names. Does not require content to match the database."
"Configurable scan based on content file names and/or database match."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SCAN_ENTRY,
Expand Down Expand Up @@ -8660,31 +8660,31 @@ MSG_HASH(
"Add to Mixer and Play"
)

/* Import Content > Manual Scan */
/* Import Content > Content Scan */

MSG_HASH(
MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_DIR,
"Content Directory"
"Content Location"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DIR,
"Select a directory to scan for content."
"Select a directory (or file) to scan for content."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME,
"System Name"
"Target Playlist"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SYSTEM_NAME,
"Specify a 'system name' with which to associate scanned content. Used to name to the generated playlist file and to identify playlist thumbnails."
"Name of the generated playlist file, also used to identify playlist thumbnails. Automatic setting will use the same name as the matching database or content directory."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME_CUSTOM,
"Custom System Name"
"Custom Playlist Name"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SYSTEM_NAME_CUSTOM,
"Manually specify a 'system name' for scanned content. Only used when 'System Name' is set to '<Custom>'."
"Custom playlist name for scanned content."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME,
Expand Down
Loading
Loading