Restore ability to use a blank query to show all disks.

This was broken by the change to parenthesize the query. Now that is done only when the query is not blank.
This commit is contained in:
Stephen Heumann 2019-04-19 21:32:20 -05:00
parent c7968ecb69
commit 716df24211

View File

@ -79,13 +79,15 @@ void DoSearch(boolean getMore) {
asprintf(&searchURL, asprintf(&searchURL,
"http://archive.org/advancedsearch.php?" "http://archive.org/advancedsearch.php?"
"q=emulator%%3A%s%%20(%s)" "q=emulator%%3A%s%s%s%s"
"&fl%%5B%%5D=identifier&fl%%5B%%5D=title" "&fl%%5B%%5D=identifier&fl%%5B%%5D=title"
"&fl%%5B%%5D=emulator_ext" "&fl%%5B%%5D=emulator_ext"
"&sort%%5B%%5D=titleSorter+asc" "&sort%%5B%%5D=titleSorter+asc"
"&rows=%i&page=%i&output=json", "&rows=%i&page=%i&output=json",
gsDisksOnly ? "apple2gs" : "apple2%2A", gsDisksOnly ? "apple2gs" : "apple2%2A",
queryString[0] != '\0' ? "%20(" : "",
queryString, queryString,
queryString[0] != '\0' ? ")" : "",
PAGE_SIZE, PAGE_SIZE,
pageNum + 1); pageNum + 1);
if (searchURL == NULL) { if (searchURL == NULL) {