queue/Print: support sorting by priority

This commit is contained in:
Max Kellermann
2022-02-14 14:08:26 +01:00
parent 2172aaf1ce
commit ab5b6f83fd
4 changed files with 19 additions and 1 deletions

View File

@@ -293,6 +293,9 @@ ParseSortTag(const char *s)
if (StringIsEqualIgnoreCase(s, "Last-Modified"))
return TagType(SORT_TAG_LAST_MODIFIED);
if (StringIsEqualIgnoreCase(s, "prio"))
return TagType(SORT_TAG_PRIO);
TagType tag = tag_name_parse_i(s);
if (tag == TAG_NUM_OF_ITEM_TYPES)
throw ProtocolError(ACK_ERROR_ARG, "Unknown sort tag");