upnpsoap: Add forced alphasort capability

Add the ability to force title modification for clients that do their own
alphanumeric sorting.  Adding a '!' to the beginning of the
force_sort_criteria value will enable this behavior.

It is implemented by prepending all titles with a zero-padded number, and
possibly season and episode (or disc and track) numbers if they aren't
already in the title.
This commit is contained in:
Justin Maggard
2018-01-11 11:06:26 -08:00
parent c0e66e9997
commit 3e9ca13fa3
5 changed files with 48 additions and 4 deletions

View File

@ -740,6 +740,11 @@ init(int argc, char **argv)
break;
case FORCE_SORT_CRITERIA:
force_sort_criteria = ary_options[i].value;
if (force_sort_criteria[0] == '!')
{
SETFLAG(FORCE_ALPHASORT_MASK);
force_sort_criteria++;
}
break;
case MAX_CONNECTIONS:
runtime_vars.max_connections = atoi(ary_options[i].value);