From 05d0d65936a3acfa0ead6f6ddea11b9a3bae68b5 Mon Sep 17 00:00:00 2001 From: Aubin Date: Sun, 14 Feb 2021 17:59:06 +0100 Subject: [PATCH] amulecmd: 'type' argument added to search --- src/TextClient.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/TextClient.cpp b/src/TextClient.cpp index 978daae8db..d75d75a4ba 100644 --- a/src/TextClient.cpp +++ b/src/TextClient.cpp @@ -525,6 +525,17 @@ int CamulecmdApp::ProcessCommand(int CmdId) uint32 min_size = 0; uint32 max_size = 0; + if (args.Find('[') == 0) { + const int end = args.find(']'); + const int comma = args.find(':'); + if ((end != wxNOT_FOUND)&&(comma > 0)&&(comma < end)) { + const wxString argtype = args.substr(1, comma-1); + if (argtype == "type") { + type = args.substr (comma+1, end-comma-1 ); + search = args.substr (end+1 ).Trim(true).Trim(false); + } + } + } request = new CECPacket(EC_OP_SEARCH_START); request->AddTag(CEC_Search_Tag (search, search_type, type, extention, avail, min_size, max_size)); request_list.push_back(request);