[Junodownload] Updated script, need help with album + artist search


#1

I updated the junodownload script and searching by a single field (i.e. album) is fine. However, I came across a problem when I'm trying to search by album and artist.

Junodownload query example/model: http://www.junodownload.com/search/?q[artist][]=artist+name&q[title][]=album+title

artist+name = %ARTIST% with "+" as its word separator
album+title = %ALBUM% with "+" as its word separator

Problem:
[Searchby] strips out "[foo][]="

Current configuration:
[IndexUrl]=http://www.junodownload.com/search/?q[artist][]=%s
[WordSeperator]=+
[IndexFormat]=%Artist%|%_url%|%Album%|%Publisher%|%Date%
[SearchBy]=$replace(%ARTIST%, ,+)&q[title][]=$replace(%ALBUM%, ,+)
[Encoding]=utf-8

Resulting query string: http://www.junodownload.com/search/?q[artist][]=John+Smith&q=First+Album => "Error connecting to server... provided uri is invalid"

Expected query string: http://www.junodownload.com/search/?q[artist][]=John+Smith&q[title][]=First+Album

As you can see, q=First+Album should've been q[title][]=First+Album

Compare the following:
http://www.junodownload.com/search/?q[artist][]=sasha&q=scene+delete+the+remixes
to
http://www.junodownload.com/search/?q[artist][]=sasha&q[title][]=scene+delete+the+remixes

Or, is it possible to escape certain characters like "%" in [SearchBy] to yield something like the following for "%s":
?q%5Bartist%5D%5B%5D=John+Smith&q%5Btitle%5D%5B%5D=First+Album

From the example above, the following works: http://www.junodownload.com/search/?q[artist][]=sasha&q[title][]=scene+delete+the+remixes


#2

Answering myself here, just surround the string that I want to escape with apostrophe's, for example from above:

[SearchBy]='?q%5Bartist%5D%5B%5D='$replace(%ARTIST%, ,+)'&q%5Btitle%5D%5B%5D='$replace(%ALBUM%, ,+)


#3

Where could one optain that script ?!! :slight_smile: :slight_smile: