IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [Junodownload] Updated script, need help with album + artist search
ms6676749
post May 19 2017, 18:50
Post #1


Member


Group: Full Members
Posts: 52
Joined: 17-March 16
Member No.: 21892
Mp3tag Version: 2.75



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:
CODE
http://www.junodownload.com/search/?q%5Bartist%5D%5B%5D=sasha&q%5Btitle%5D%5B%5D=scene+delete+the+remixes


This post has been edited by ms6676749: May 19 2017, 19:13
Go to the top of the page
 
+Quote Post
ms6676749
post May 20 2017, 07:18
Post #2


Member


Group: Full Members
Posts: 52
Joined: 17-March 16
Member No.: 21892
Mp3tag Version: 2.75



QUOTE (ms6676749 @ May 19 2017, 19:50) *
Or, is it possible to escape certain characters like "%"
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%, ,+)

This post has been edited by ms6676749: May 20 2017, 07:19
Go to the top of the page
 
+Quote Post
Norse God
post Aug 19 2017, 17:43
Post #3


Member


Group: Full Members
Posts: 5
Joined: 29-September 16
Member No.: 22549
Mp3tag Version: 2.75



Where could one optain that script ?!! smile.gif smile.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd October 2017 - 16:09