Request: Multiple search criteria in Web Sources Framework


#1

Hello, and thank you Florian for this wonderfull program.

I am by no means a professinal programmer or coder, so please correct me if I'm mistaken/ wrong.

I've been playing with WS scripts (mostly Itunes WS scripts) and adapting them to my own tagging needs.
Lately I've been trying to find a way to edit the [IndexUrl] field in order to add more search queries but I'm coming up short.

On the Web Sources Framework help page all I find is an entry of "%s", which will be replaced by the "search criteria entered by user" (quote).

Is %s the only variable available? Is it possible to add more? Is it possible to create custom variables?

Here's an eample of what I'm trying to do:

(From my customized WS itunes script, originally from pone):

[Name]=iTunes
[BasedOn]=http://itunes.apple.com
[IndexUrl]=http://itunes.apple.com/search?country=US&entity=album&term=%s
[AlbumUrl]=http://itunes.apple.com/lookup?country=US&entity=song&limit=200&id=
[WordSeperator]=+
[IndexFormat]=%_preview%|%_url%|%Artist%|%Album%|%Explicit%|%Tracks%|%Year%|%Genre%|
[SearchBy]=$if2(%albumartist%,%artist%)[ %album%]
[Encoding]=url-utf-8

From my understanding, the %s variable will be filled with info from the [SearchBy] field, using [WordSeperator] to fill in blanks.

But I would also like to have another variable(s) (custom ou otherwise) for the 'country' info in [IndexUrl] and [AlbumUrl]. So I would get something like:


[Name]=iTunes
[BasedOn]=http://itunes.apple.com
[IndexUrl]=http://itunes.apple.com/search?country=%X&entity=album&term=%S
[AlbumUrl]=http://itunes.apple.com/lookup?country=%X&entity=song&limit=200&id=
[WordSeperator]=+
[IndexFormat]=%_preview%|%_url%|%Artist%|%Album%|%Explicit%|%Tracks%|%Year%|%Genre%|
[Variable_1,%X]= "country ID" (ou whatever)
[Variable_2,%S]=$if2(%albumartist%,%artist%)[ %album%] (already present)
[Encoding]=url-utf-8


Is this already acheivable? If so, how?

If not, could you consider this suggestion as a feature request?.

Thank you,
rboss


"May the Force live long and prosper with you" - Harry Potter


#2

as far as I understand the %s variable it is filled with anything that you put in the [SearchBy] section.
But what you have to put there depends a lot on the target. You would have to find out how your target deals with several search criteria.


#3

Thats exactly what I want to do, but the issue is that I need 2 (or more) targets, as I tried to explain using the example in my previous post.

Any ideas?