Merge branch 'searchplaylist_syntax' of https://github.com/jcorporation/MPD

This commit is contained in:
Max Kellermann
2024-09-27 08:47:02 +02:00
3 changed files with 5 additions and 3 deletions

View File

@@ -176,7 +176,7 @@ static constexpr struct command commands[] = {
{ "searchaddpl", PERMISSION_CONTROL, 2, -1, handle_searchaddpl },
{ "searchcount", PERMISSION_READ, 1, -1, handle_searchcount },
#endif
{ "searchplaylist", PERMISSION_READ, 2, 3, handle_searchplaylist },
{ "searchplaylist", PERMISSION_READ, 2, 4, handle_searchplaylist },
{ "seek", PERMISSION_PLAYER, 2, 2, handle_seek },
{ "seekcur", PERMISSION_PLAYER, 1, 1, handle_seekcur },
{ "seekid", PERMISSION_PLAYER, 2, 2, handle_seekid },

View File

@@ -164,8 +164,10 @@ handle_searchplaylist(Client &client, Request args, Response &r)
args.shift();
RangeArg window = RangeArg::All();
if (args.size() == 2) {
if (args.size() == 3 && StringIsEqual(args[args.size() - 2], "window")) {
window = args.ParseRange(args.size() - 1);
args.pop_back();
args.pop_back();
}