Standardise and improve playlist display
This commit is contained in:
parent
d2f73e3f33
commit
4a26e4bc97
|
@ -710,9 +710,8 @@ static const bool playlist_sort_alphabetical = true;
|
||||||
/* File format to use when writing playlists to disk */
|
/* File format to use when writing playlists to disk */
|
||||||
static const bool playlist_use_old_format = false;
|
static const bool playlist_use_old_format = false;
|
||||||
|
|
||||||
/* Show currently associated core next to each playlist entry
|
/* Always show currently associated core next to each playlist entry */
|
||||||
* (RGUI only) */
|
static const bool playlist_show_core_name = false;
|
||||||
static const bool playlist_show_core_name = true;
|
|
||||||
|
|
||||||
static const bool playlist_show_sublabels = false;
|
static const bool playlist_show_sublabels = false;
|
||||||
|
|
||||||
|
|
|
@ -1501,7 +1501,6 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||||
SETTING_BOOL("rgui_background_filler_thickness_enable", &settings->bools.menu_rgui_background_filler_thickness_enable, true, true, false);
|
SETTING_BOOL("rgui_background_filler_thickness_enable", &settings->bools.menu_rgui_background_filler_thickness_enable, true, true, false);
|
||||||
SETTING_BOOL("rgui_border_filler_thickness_enable", &settings->bools.menu_rgui_border_filler_thickness_enable, true, true, false);
|
SETTING_BOOL("rgui_border_filler_thickness_enable", &settings->bools.menu_rgui_border_filler_thickness_enable, true, true, false);
|
||||||
SETTING_BOOL("rgui_border_filler_enable", &settings->bools.menu_rgui_border_filler_enable, true, true, false);
|
SETTING_BOOL("rgui_border_filler_enable", &settings->bools.menu_rgui_border_filler_enable, true, true, false);
|
||||||
SETTING_BOOL("playlist_show_core_name", &settings->bools.playlist_show_core_name, true, playlist_show_core_name, false);
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_XMB
|
#ifdef HAVE_XMB
|
||||||
SETTING_BOOL("xmb_shadows_enable", &settings->bools.menu_xmb_shadows_enable, true, xmb_shadows_enable, false);
|
SETTING_BOOL("xmb_shadows_enable", &settings->bools.menu_xmb_shadows_enable, true, xmb_shadows_enable, false);
|
||||||
|
@ -1576,7 +1575,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||||
SETTING_BOOL("playlist_use_old_format", &settings->bools.playlist_use_old_format, true, playlist_use_old_format, false);
|
SETTING_BOOL("playlist_use_old_format", &settings->bools.playlist_use_old_format, true, playlist_use_old_format, false);
|
||||||
SETTING_BOOL("content_runtime_log", &settings->bools.content_runtime_log, true, content_runtime_log, false);
|
SETTING_BOOL("content_runtime_log", &settings->bools.content_runtime_log, true, content_runtime_log, false);
|
||||||
SETTING_BOOL("playlist_show_sublabels", &settings->bools.playlist_show_sublabels, true, playlist_show_sublabels, false);
|
SETTING_BOOL("playlist_show_sublabels", &settings->bools.playlist_show_sublabels, true, playlist_show_sublabels, false);
|
||||||
|
SETTING_BOOL("playlist_show_core_name", &settings->bools.playlist_show_core_name, true, playlist_show_core_name, false);
|
||||||
SETTING_BOOL("playlist_sort_alphabetical", &settings->bools.playlist_sort_alphabetical, true, playlist_sort_alphabetical, false);
|
SETTING_BOOL("playlist_sort_alphabetical", &settings->bools.playlist_sort_alphabetical, true, playlist_sort_alphabetical, false);
|
||||||
|
|
||||||
*size = count;
|
*size = count;
|
||||||
|
|
|
@ -8240,7 +8240,7 @@ MSG_HASH(
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SHOW_CORE_NAME,
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_SHOW_CORE_NAME,
|
||||||
"Show associated cores in playlists"
|
"Always show associated cores in playlists"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_PLAYLIST_SHOW_CORE_NAME,
|
MENU_ENUM_SUBLABEL_PLAYLIST_SHOW_CORE_NAME,
|
||||||
|
|
|
@ -1637,15 +1637,6 @@ static void rgui_render(void *data, bool is_idle)
|
||||||
char title_buf[255];
|
char title_buf[255];
|
||||||
unsigned timedate_x = RGUI_TERM_WIDTH(fb_width) * FONT_WIDTH_STRIDE - RGUI_TERM_START_X(fb_width);
|
unsigned timedate_x = RGUI_TERM_WIDTH(fb_width) * FONT_WIDTH_STRIDE - RGUI_TERM_START_X(fb_width);
|
||||||
unsigned core_name_len = ((timedate_x - RGUI_TERM_START_X(fb_width)) / FONT_WIDTH_STRIDE) - 3;
|
unsigned core_name_len = ((timedate_x - RGUI_TERM_START_X(fb_width)) / FONT_WIDTH_STRIDE) - 3;
|
||||||
bool show_playlist_labels = !settings->bools.playlist_show_core_name && rgui->is_playlist;
|
|
||||||
playlist_t *playlist = NULL;
|
|
||||||
|
|
||||||
/* Get cached playlist, if required */
|
|
||||||
if (show_playlist_labels)
|
|
||||||
{
|
|
||||||
playlist = playlist_get_cached();
|
|
||||||
show_playlist_labels = show_playlist_labels && playlist;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print title */
|
/* Print title */
|
||||||
title_buf[0] = '\0';
|
title_buf[0] = '\0';
|
||||||
|
@ -1685,7 +1676,6 @@ static void rgui_render(void *data, bool is_idle)
|
||||||
size_t entry_title_buf_len = 0;
|
size_t entry_title_buf_len = 0;
|
||||||
bool has_value = false;
|
bool has_value = false;
|
||||||
bool entry_selected = menu_entry_is_currently_selected((unsigned)i);
|
bool entry_selected = menu_entry_is_currently_selected((unsigned)i);
|
||||||
bool show_playlist_label = show_playlist_labels;
|
|
||||||
size_t selection = menu_navigation_get_selection();
|
size_t selection = menu_navigation_get_selection();
|
||||||
|
|
||||||
if (i > (selection + 100))
|
if (i > (selection + 100))
|
||||||
|
@ -1696,40 +1686,7 @@ static void rgui_render(void *data, bool is_idle)
|
||||||
entry_title_buf[0] = '\0';
|
entry_title_buf[0] = '\0';
|
||||||
type_str_buf[0] = '\0';
|
type_str_buf[0] = '\0';
|
||||||
|
|
||||||
/* Get playlist label for current entry, if required */
|
/* Get current entry */
|
||||||
if (show_playlist_label)
|
|
||||||
{
|
|
||||||
/* Ensure that we fallback to the normal entry label if
|
|
||||||
* any of the following playlist access fails... */
|
|
||||||
show_playlist_label = false;
|
|
||||||
|
|
||||||
if (i < playlist_get_size(playlist))
|
|
||||||
{
|
|
||||||
const char *playlist_label = NULL;
|
|
||||||
playlist_get_index(playlist, i, NULL, &playlist_label, NULL, NULL, NULL, NULL);
|
|
||||||
|
|
||||||
if (!string_is_empty(playlist_label))
|
|
||||||
{
|
|
||||||
entry_path = strdup(playlist_label);
|
|
||||||
show_playlist_label = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (show_playlist_label)
|
|
||||||
{
|
|
||||||
/* We are using the current playlist label as the entry title
|
|
||||||
* > We already have entry_path
|
|
||||||
* > entry_spacing is irrelevant (set to zero)
|
|
||||||
* > entry_value is irrelevant
|
|
||||||
* > has_value is false */
|
|
||||||
entry_spacing = 0;
|
|
||||||
has_value = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Either this is not a playlist entry, or we are ignoring
|
|
||||||
* playlists - extract all required info from entry itself */
|
|
||||||
menu_entry_t entry;
|
menu_entry_t entry;
|
||||||
menu_entry_init(&entry);
|
menu_entry_init(&entry);
|
||||||
menu_entry_get(&entry, 0, (unsigned)i, NULL, true);
|
menu_entry_get(&entry, 0, (unsigned)i, NULL, true);
|
||||||
|
@ -1743,7 +1700,6 @@ static void rgui_render(void *data, bool is_idle)
|
||||||
has_value = !string_is_empty(entry_value);
|
has_value = !string_is_empty(entry_value);
|
||||||
|
|
||||||
menu_entry_free(&entry);
|
menu_entry_free(&entry);
|
||||||
}
|
|
||||||
|
|
||||||
/* Format entry title string */
|
/* Format entry title string */
|
||||||
entry_title_max_len = RGUI_TERM_WIDTH(fb_width) - (1 + 2);
|
entry_title_max_len = RGUI_TERM_WIDTH(fb_width) - (1 + 2);
|
||||||
|
|
|
@ -99,6 +99,20 @@ static char new_lbl_entry[4096] = {0};
|
||||||
static char new_entry[4096] = {0};
|
static char new_entry[4096] = {0};
|
||||||
static enum msg_hash_enums new_type = MSG_UNKNOWN;
|
static enum msg_hash_enums new_type = MSG_UNKNOWN;
|
||||||
|
|
||||||
|
/* Spacers used for '<content> - <core name>' labels
|
||||||
|
* in playlists */
|
||||||
|
#define PL_LABEL_SPACER_DEFAULT " | "
|
||||||
|
#define PL_LABEL_SPACER_RGUI " | "
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
/* UTF-8 support is currently broken on Apple devices... */
|
||||||
|
#define PL_LABEL_SPACER_OZONE " | "
|
||||||
|
#else
|
||||||
|
/* <EM SPACE><BULLET><EM SPACE>
|
||||||
|
* UCN equivalent: "\u2003\u2022\u2003" */
|
||||||
|
#define PL_LABEL_SPACER_OZONE "\xE2\x80\x83\xE2\x80\xA2\xE2\x80\x83"
|
||||||
|
#endif
|
||||||
|
#define PL_LABEL_SPACER_MAXLEN 37
|
||||||
|
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
/* HACK - we have to find some way to pass state inbetween
|
/* HACK - we have to find some way to pass state inbetween
|
||||||
* function pointer callback functions that don't necessarily
|
* function pointer callback functions that don't necessarily
|
||||||
|
@ -1304,7 +1318,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
||||||
playlist_t *playlist, const char *path_playlist, bool is_history)
|
playlist_t *playlist, const char *path_playlist, bool is_collection)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
size_t selection = menu_navigation_get_selection();
|
size_t selection = menu_navigation_get_selection();
|
||||||
|
@ -1312,41 +1326,45 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
bool is_rgui = string_is_equal(settings->arrays.menu_driver, "rgui");
|
bool is_rgui = string_is_equal(settings->arrays.menu_driver, "rgui");
|
||||||
bool get_runtime = string_is_equal(path_playlist, "history") && g_defaults.content_runtime && settings->bools.content_runtime_log;
|
bool get_runtime = string_is_equal(path_playlist, "history") && g_defaults.content_runtime && settings->bools.content_runtime_log;
|
||||||
|
char label_spacer[PL_LABEL_SPACER_MAXLEN];
|
||||||
|
|
||||||
|
label_spacer[0] = '\0';
|
||||||
|
|
||||||
if (list_size == 0)
|
if (list_size == 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
/* Get spacer for menu entry labels (<content><spacer><core>) */
|
||||||
|
if (is_rgui)
|
||||||
|
strlcpy(label_spacer, PL_LABEL_SPACER_RGUI, sizeof(label_spacer));
|
||||||
|
else if (string_is_equal(settings->arrays.menu_driver, "ozone"))
|
||||||
|
strlcpy(label_spacer, PL_LABEL_SPACER_OZONE, sizeof(label_spacer));
|
||||||
|
else
|
||||||
|
strlcpy(label_spacer, PL_LABEL_SPACER_DEFAULT, sizeof(label_spacer));
|
||||||
|
|
||||||
|
/* Inform menu driver of current system name */
|
||||||
if (!string_is_empty(info->path))
|
if (!string_is_empty(info->path))
|
||||||
{
|
{
|
||||||
size_t lpl_basename_size = PATH_MAX_LENGTH * sizeof(char);
|
char lpl_basename[PATH_MAX_LENGTH];
|
||||||
char *lpl_basename = (char*)malloc(lpl_basename_size);
|
|
||||||
lpl_basename[0] = '\0';
|
lpl_basename[0] = '\0';
|
||||||
|
|
||||||
fill_pathname_base_noext(lpl_basename, info->path, lpl_basename_size);
|
fill_pathname_base_noext(lpl_basename, info->path, sizeof(lpl_basename));
|
||||||
menu_driver_set_thumbnail_system(lpl_basename, lpl_basename_size);
|
menu_driver_set_thumbnail_system(lpl_basename, sizeof(lpl_basename));
|
||||||
free(lpl_basename);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* preallocate the file list */
|
/* Preallocate the file list */
|
||||||
file_list_reserve(info->list, list_size);
|
file_list_reserve(info->list, list_size);
|
||||||
|
|
||||||
for (i = 0; i < list_size; i++)
|
for (i = 0; i < list_size; i++)
|
||||||
{
|
{
|
||||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
char menu_entry_label[PATH_MAX_LENGTH];
|
||||||
char *path_copy = (char*)malloc(path_size);
|
|
||||||
char *fill_buf = (char*)malloc(path_size);
|
|
||||||
const char *core_path = NULL;
|
|
||||||
const char *core_name = NULL;
|
|
||||||
const char *path = NULL;
|
const char *path = NULL;
|
||||||
const char *label = NULL;
|
const char *label = NULL;
|
||||||
|
const char *core_path = NULL;
|
||||||
|
const char *core_name = NULL;
|
||||||
|
|
||||||
fill_buf[0] = path_copy[0] = '\0';
|
menu_entry_label[0] = '\0';
|
||||||
|
|
||||||
if (!string_is_empty(info->path))
|
|
||||||
strlcpy(path_copy, info->path, path_size);
|
|
||||||
|
|
||||||
path = path_copy;
|
|
||||||
|
|
||||||
|
/* Read playlist entry */
|
||||||
playlist_get_index(playlist, i,
|
playlist_get_index(playlist, i,
|
||||||
&path, &label, &core_path, &core_name, NULL, NULL);
|
&path, &label, &core_path, &core_name, NULL, NULL);
|
||||||
|
|
||||||
|
@ -1379,69 +1397,66 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (core_name)
|
/* If this is a standard collection (not a history list or
|
||||||
strlcpy(fill_buf, core_name, path_size);
|
* favourites), trigger thumbnail update for current selection.
|
||||||
|
* Note: Thumbnail updates must be omitted when using RGUI,
|
||||||
/* Note: this condition is never met when using RGUI,
|
* since this functionality is handled elsewhere... */
|
||||||
* since 'is_history' is always set to 'true'.
|
if (i == selection)
|
||||||
* But if it ever were then we must ensure that thumbnail
|
{
|
||||||
* updates are omitted (since this functionality is
|
if (is_collection && !string_is_empty(label) && !is_rgui)
|
||||||
* handled elsewhere). */
|
|
||||||
if (!is_history && i == selection && !string_is_empty(label) && !is_rgui)
|
|
||||||
{
|
{
|
||||||
char *content_basename = strdup(label);
|
char *content_basename = strdup(label);
|
||||||
|
/* Note: If menu_driver_set_thumbnail_content() accepted a const pointer,
|
||||||
|
* we could save a string duplication here... */
|
||||||
menu_driver_set_thumbnail_content(content_basename, strlen(content_basename) + 1);
|
menu_driver_set_thumbnail_content(content_basename, strlen(content_basename) + 1);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_PATH, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_PATH, NULL);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_IMAGE, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_IMAGE, NULL);
|
||||||
free(content_basename);
|
free(content_basename);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path)
|
|
||||||
{
|
|
||||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
|
||||||
char *path_short = (char*)malloc(path_size);
|
|
||||||
|
|
||||||
path_short[0] = '\0';
|
|
||||||
|
|
||||||
fill_short_pathname_representation(path_short, path,
|
|
||||||
path_size);
|
|
||||||
strlcpy(fill_buf,
|
|
||||||
(!string_is_empty(label)) ? label : path_short,
|
|
||||||
path_size);
|
|
||||||
|
|
||||||
if (!string_is_empty(core_name))
|
|
||||||
{
|
|
||||||
if (!string_is_equal(core_name,
|
|
||||||
file_path_str(FILE_PATH_DETECT)))
|
|
||||||
{
|
|
||||||
char *tmp = (char*)malloc(path_size);
|
|
||||||
|
|
||||||
tmp[0] = '\0';
|
|
||||||
|
|
||||||
snprintf(tmp, path_size, " (%s)", core_name);
|
|
||||||
strlcat(fill_buf, tmp, path_size);
|
|
||||||
|
|
||||||
free(tmp);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(path_short);
|
if (!string_is_empty(path))
|
||||||
}
|
{
|
||||||
|
/* Standard playlist entry
|
||||||
|
* > Base menu entry label is always playlist label
|
||||||
|
* > If playlist label is NULL, fallback to playlist entry file name
|
||||||
|
* > If playlist sublabels are enabled, no further additions
|
||||||
|
* are required
|
||||||
|
* > If playlist sublabels are disabled:
|
||||||
|
* > If this is *not* a standard collection (i.e. a history list or
|
||||||
|
* favourites) *or* 'show core name' is enabled, add currently
|
||||||
|
* associated core (if set) */
|
||||||
|
|
||||||
if (!path)
|
if (string_is_empty(label))
|
||||||
menu_entries_append_enum(info->list, fill_buf, path_playlist,
|
fill_short_pathname_representation(menu_entry_label, path, sizeof(menu_entry_label));
|
||||||
MENU_ENUM_LABEL_PLAYLIST_ENTRY, FILE_TYPE_PLAYLIST_ENTRY, 0, i);
|
|
||||||
else if (is_history)
|
|
||||||
menu_entries_append_enum(info->list, fill_buf,
|
|
||||||
path, MENU_ENUM_LABEL_PLAYLIST_ENTRY, FILE_TYPE_RPL_ENTRY, 0, i);
|
|
||||||
else
|
else
|
||||||
menu_entries_append_enum(info->list, label,
|
strlcpy(menu_entry_label, label, sizeof(menu_entry_label));
|
||||||
path, MENU_ENUM_LABEL_PLAYLIST_ENTRY, FILE_TYPE_RPL_ENTRY, 0, i);
|
|
||||||
info->count++;
|
|
||||||
|
|
||||||
free(path_copy);
|
if (!settings->bools.playlist_show_sublabels)
|
||||||
free(fill_buf);
|
{
|
||||||
|
if (!is_collection || settings->bools.playlist_show_core_name)
|
||||||
|
{
|
||||||
|
if (!string_is_empty(core_name) && !string_is_equal(core_name, file_path_str(FILE_PATH_DETECT)))
|
||||||
|
{
|
||||||
|
strlcat(menu_entry_label, label_spacer, sizeof(menu_entry_label));
|
||||||
|
strlcat(menu_entry_label, core_name, sizeof(menu_entry_label));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
menu_entries_append_enum(info->list, menu_entry_label, path,
|
||||||
|
MENU_ENUM_LABEL_PLAYLIST_ENTRY, FILE_TYPE_RPL_ENTRY, 0, i);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (core_name)
|
||||||
|
strlcpy(menu_entry_label, core_name, sizeof(menu_entry_label));
|
||||||
|
|
||||||
|
menu_entries_append_enum(info->list, menu_entry_label, path_playlist,
|
||||||
|
MENU_ENUM_LABEL_PLAYLIST_ENTRY, FILE_TYPE_PLAYLIST_ENTRY, 0, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
info->count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2585,7 +2600,6 @@ static int menu_displaylist_parse_horizontal_list(
|
||||||
{
|
{
|
||||||
menu_ctx_list_t list_info;
|
menu_ctx_list_t list_info;
|
||||||
menu_ctx_list_t list_horiz_info;
|
menu_ctx_list_t list_horiz_info;
|
||||||
bool is_historylist = false;
|
|
||||||
playlist_t *playlist = NULL;
|
playlist_t *playlist = NULL;
|
||||||
struct item_file *item = NULL;
|
struct item_file *item = NULL;
|
||||||
|
|
||||||
|
@ -2617,10 +2631,6 @@ static int menu_displaylist_parse_horizontal_list(
|
||||||
fill_pathname_base_noext(lpl_basename, item->path, sizeof(lpl_basename));
|
fill_pathname_base_noext(lpl_basename, item->path, sizeof(lpl_basename));
|
||||||
menu_driver_set_thumbnail_system(lpl_basename, sizeof(lpl_basename));
|
menu_driver_set_thumbnail_system(lpl_basename, sizeof(lpl_basename));
|
||||||
|
|
||||||
/* Note: Redundant, since this function is never used for history lists... */
|
|
||||||
if (string_is_equal(lpl_basename, "content_history"))
|
|
||||||
is_historylist = true;
|
|
||||||
|
|
||||||
fill_pathname_join(
|
fill_pathname_join(
|
||||||
path_playlist,
|
path_playlist,
|
||||||
settings->paths.directory_playlist,
|
settings->paths.directory_playlist,
|
||||||
|
@ -2633,15 +2643,12 @@ static int menu_displaylist_parse_horizontal_list(
|
||||||
|
|
||||||
if (playlist)
|
if (playlist)
|
||||||
{
|
{
|
||||||
/* Note: If this function were used for history lists, then history
|
|
||||||
* lists would be sorted alphabetically. This is incorrect behaviour.
|
|
||||||
* Fortunately it never happens... */
|
|
||||||
if (sort)
|
if (sort)
|
||||||
playlist_qsort(playlist);
|
playlist_qsort(playlist);
|
||||||
|
|
||||||
menu_displaylist_parse_playlist(info,
|
menu_displaylist_parse_playlist(info,
|
||||||
playlist,
|
playlist,
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_COLLECTION), is_historylist);
|
msg_hash_to_str(MENU_ENUM_LABEL_COLLECTION), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -4167,6 +4174,7 @@ static void menu_displaylist_parse_playlist_generic(
|
||||||
menu_displaylist_info_t *info,
|
menu_displaylist_info_t *info,
|
||||||
const char *playlist_name,
|
const char *playlist_name,
|
||||||
const char *playlist_path,
|
const char *playlist_path,
|
||||||
|
bool is_collection,
|
||||||
bool sort,
|
bool sort,
|
||||||
int *ret)
|
int *ret)
|
||||||
{
|
{
|
||||||
|
@ -4182,7 +4190,7 @@ static void menu_displaylist_parse_playlist_generic(
|
||||||
playlist_qsort(playlist);
|
playlist_qsort(playlist);
|
||||||
|
|
||||||
*ret = menu_displaylist_parse_playlist(info,
|
*ret = menu_displaylist_parse_playlist(info,
|
||||||
playlist, playlist_name, true);
|
playlist, playlist_name, is_collection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4849,7 +4857,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||||
playlist_qsort(playlist);
|
playlist_qsort(playlist);
|
||||||
|
|
||||||
ret = menu_displaylist_parse_playlist(info,
|
ret = menu_displaylist_parse_playlist(info,
|
||||||
playlist, path_playlist, false);
|
playlist, path_playlist, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
|
@ -4870,7 +4878,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||||
menu, info,
|
menu, info,
|
||||||
"history",
|
"history",
|
||||||
settings->paths.path_content_history,
|
settings->paths.path_content_history,
|
||||||
false,
|
false, /* Not a collection */
|
||||||
|
false, /* Do not sort */
|
||||||
&ret);
|
&ret);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -4895,6 +4904,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||||
menu_displaylist_parse_playlist_generic(menu, info,
|
menu_displaylist_parse_playlist_generic(menu, info,
|
||||||
"favorites",
|
"favorites",
|
||||||
settings->paths.path_content_favorites,
|
settings->paths.path_content_favorites,
|
||||||
|
false, /* Not a conventional collection */
|
||||||
settings->bools.playlist_sort_alphabetical,
|
settings->bools.playlist_sort_alphabetical,
|
||||||
&ret);
|
&ret);
|
||||||
|
|
||||||
|
@ -4924,7 +4934,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||||
menu_displaylist_parse_playlist_generic(menu, info,
|
menu_displaylist_parse_playlist_generic(menu, info,
|
||||||
"music_history",
|
"music_history",
|
||||||
settings->paths.path_content_music_history,
|
settings->paths.path_content_music_history,
|
||||||
false,
|
false, /* Not a collection */
|
||||||
|
false, /* Do not sort */
|
||||||
&ret);
|
&ret);
|
||||||
|
|
||||||
if (info->count == 0)
|
if (info->count == 0)
|
||||||
|
@ -4956,7 +4967,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||||
menu_displaylist_parse_playlist_generic(menu, info,
|
menu_displaylist_parse_playlist_generic(menu, info,
|
||||||
"video_history",
|
"video_history",
|
||||||
settings->paths.path_content_video_history,
|
settings->paths.path_content_video_history,
|
||||||
false,
|
false, /* Not a collection */
|
||||||
|
false, /* Do not sort */
|
||||||
&ret);
|
&ret);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@ -5319,8 +5331,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||||
info->need_push = true;
|
info->need_push = true;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_PLAYLIST_SETTINGS_LIST:
|
case DISPLAYLIST_PLAYLIST_SETTINGS_LIST:
|
||||||
{
|
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
|
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||||
|
@ -5344,16 +5354,13 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||||
MENU_ENUM_LABEL_PLAYLIST_SHOW_SUBLABELS,
|
MENU_ENUM_LABEL_PLAYLIST_SHOW_SUBLABELS,
|
||||||
PARSE_ONLY_BOOL, false);
|
PARSE_ONLY_BOOL, false);
|
||||||
if (string_is_equal(settings->arrays.menu_driver, "rgui"))
|
|
||||||
{
|
|
||||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||||
MENU_ENUM_LABEL_PLAYLIST_SHOW_CORE_NAME,
|
MENU_ENUM_LABEL_PLAYLIST_SHOW_CORE_NAME,
|
||||||
PARSE_ONLY_BOOL, false);
|
PARSE_ONLY_BOOL, false);
|
||||||
}
|
|
||||||
|
|
||||||
menu_displaylist_parse_playlist_associations(info);
|
menu_displaylist_parse_playlist_associations(info);
|
||||||
info->need_push = true;
|
info->need_push = true;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST:
|
case DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
|
@ -8139,6 +8146,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||||
menu_displaylist_parse_playlist_generic(menu, info,
|
menu_displaylist_parse_playlist_generic(menu, info,
|
||||||
path_basename(info->path),
|
path_basename(info->path),
|
||||||
info->path,
|
info->path,
|
||||||
|
true, /* Is a collection */
|
||||||
settings->bools.playlist_sort_alphabetical,
|
settings->bools.playlist_sort_alphabetical,
|
||||||
&ret);
|
&ret);
|
||||||
ret = 0; /* Why do we do this...? */
|
ret = 0; /* Why do we do this...? */
|
||||||
|
@ -8161,7 +8169,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||||
menu_displaylist_parse_playlist_generic(menu, info,
|
menu_displaylist_parse_playlist_generic(menu, info,
|
||||||
"images_history",
|
"images_history",
|
||||||
settings->paths.path_content_image_history,
|
settings->paths.path_content_image_history,
|
||||||
false,
|
false, /* Not a collection */
|
||||||
|
false, /* Do not sort */
|
||||||
&ret);
|
&ret);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9853,8 +9853,6 @@ static bool setting_append_list(
|
||||||
SD_FLAG_NONE
|
SD_FLAG_NONE
|
||||||
);
|
);
|
||||||
|
|
||||||
if (string_is_equal(settings->arrays.menu_driver, "rgui"))
|
|
||||||
{
|
|
||||||
CONFIG_BOOL(
|
CONFIG_BOOL(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
&settings->bools.playlist_show_core_name,
|
&settings->bools.playlist_show_core_name,
|
||||||
|
@ -9870,7 +9868,6 @@ static bool setting_append_list(
|
||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_NONE
|
SD_FLAG_NONE
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
END_SUB_GROUP(list, list_info, parent_group);
|
END_SUB_GROUP(list, list_info, parent_group);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue