X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fsfdb_freesound_mootcher.cc;h=ed1e2abfebbe7b0496bf106188b73486c1501c0a;hb=4c42a77441e74356cd909d994e270d1e1314aad4;hp=a1cb4a969e222bc67f079892264227c3cb41b19e;hpb=98834c05324b6e5be70e642ef5b5d62f6d34334a;p=ardour.git diff --git a/gtk2_ardour/sfdb_freesound_mootcher.cc b/gtk2_ardour/sfdb_freesound_mootcher.cc index a1cb4a969e..ed1e2abfeb 100644 --- a/gtk2_ardour/sfdb_freesound_mootcher.cc +++ b/gtk2_ardour/sfdb_freesound_mootcher.cc @@ -211,16 +211,21 @@ std::string Mootcher::searchText(std::string query, int page, std::string filter snprintf(buf, 23, "p=%d&", page); params += buf; } - - params += "q=" + query; - if (filter != "") - params += "&f=" + filter; + char *eq = curl_easy_escape(curl, query.c_str(), query.length()); + params += "q=\"" + std::string(eq) + "\""; + free(eq); + + if (filter != "") { + char *ef = curl_easy_escape(curl, filter.c_str(), filter.length()); + params += "&f=" + std::string(ef); + free(ef); + } if (sort) params += "&s=" + sortMethodString(sort); - params += "&fields=id,original_filename,duration,serve"; + params += "&fields=id,original_filename,duration,filesize,samplerate,license,serve"; return doRequest("/sounds/search", params); } @@ -339,7 +344,7 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID, caller->freesound_progress_bar.show(); std::string prog; - prog = string_compose (_("%1: [Stop]->"), originalFileName); + prog = string_compose (_("%1"), originalFileName); caller->freesound_progress_bar.set_text(prog); curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 0); // turn on the progress bar