HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: questberg on 2013-02-03 15:55:14

Title: Media Library Queries
Post by: questberg on 2013-02-03 15:55:14
Is it possible to make a search query which has a regular expression on both sides of a comparison, like:

%artist% HAS %album artist%
%album% IS %title%

when I tried something like this, the right side was interpreted as string according to the query syntax help
I want it to take the information from the tags obviously
Is there a plugin I need for this or am I doing something wrong?
Title: Media Library Queries
Post by: Andreasvb on 2013-02-03 15:57:37
AND?
Title: Media Library Queries
Post by: Porcus on 2013-02-03 15:58:39
You need to build a bit more sophisticated queries. For matching artist and album artist: http://www.hydrogenaudio.org/forums/index....showtopic=98286 (http://www.hydrogenaudio.org/forums/index.php?showtopic=98286) . The substring function is $substr(s,m,n)
(I am obviously too clumsy.)
Title: Media Library Queries
Post by: questberg on 2013-02-03 15:59:26
AND?

Do you mean I should use AND or specify my problem?
Title: Media Library Queries
Post by: Andreasvb on 2013-02-03 16:00:54
Use it.

http://wiki.hydrogenaudio.org/index.php?ti...00:Query_syntax (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Query_syntax) [ Foobar2000:Query syntax - Hydrogenaudio Knowledgebase ]
Title: Media Library Queries
Post by: questberg on 2013-02-03 16:01:03
You need to build a bit more sophisticated queries. For matching artist and album artist: http://www.hydrogenaudio.org/forums/index....showtopic=98286 (http://www.hydrogenaudio.org/forums/index.php?showtopic=98286) . The substring function is $substr(s,m,n)
(I am obviously too clumsy.)

ok thanks I can go on from there
Title: Media Library Queries
Post by: questberg on 2013-02-03 16:11:05
In case anyone needs it, I used this to filter for tracks with differing artist/album artist:

"$if($stricmp(%artist%,%album artist%),true,false)" IS false
Title: Media Library Queries
Post by: BenB on 2013-02-03 16:31:50
To find where the artist and album artist tags differ, you can use this:
Code: [Select]
%track artist% PRESENT

To find where they don't:
Code: [Select]
NOT %track artist% PRESENT

Note that both tags must be present for them to work.

And an equivalent to this:
Quote
%artist% HAS %album artist%

is this:
Code: [Select]
"$if($strstr(%artist%,%album artist%),true,false)" IS true


edited for clarification