Commit df15918b authored by sigmunau's avatar sigmunau
Browse files

playlist: support for sorting a node based on numerical iterpretation of the

title
parent 3fc7cdd5
......@@ -226,6 +226,7 @@ struct playlist_add_t
#define SORT_AUTHOR 3
#define SORT_RANDOM 4
#define SORT_DURATION 5
#define SORT_TITLE_NUMERIC 6
#define ORDER_NORMAL 0
#define ORDER_REVERSE 1
......
......@@ -173,6 +173,11 @@ int playlist_ItemArraySort( playlist_t *p_playlist, int i_items,
i_test = strcasecmp( pp_items[i]->input.psz_name,
pp_items[i_small]->input.psz_name );
}
else if( i_mode == SORT_TITLE_NUMERIC )
{
i_test = atoi( pp_items[i]->input.psz_name ) -
atoi( pp_items[i_small]->input.psz_name );
}
else if( i_mode == SORT_DURATION )
{
i_test = pp_items[i]->input.i_duration -
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment