Help - Search - Members - Calendar
Full Version: Playlist Tree Query Thread
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Fractal_Mortality
The Playlist Tree plugin has become a very powerful one (thanks to Cbowron for that). It's databasing abilities are nearly limitless with the use of various query strings.

So... Who thinks they have interesting or unique queries that could be used by others? Please share the scripts you use, or host a .col file, and describe how it works.
cwbowron
Here's the one I came up with for testing the new split sorting order. My Beatles albums are all under a path B\Beatles\Commercial Releases\xxxx, so this picks out an commercially released album and gets all the tracks

CODE

Name: Random Beatles Album
Query: artist HAS beatles AND %_path% HAS commercial
[x] foo_playlist_gen format
Format: %album%|$num(%tracknumber%,2) - %title%
Limit: 1 Subfolder
Pop Sort Order: $rand()
Display Sort Order: %_name%
fabiospark
Picks up randomly 5 tracks per decade and sort them randomly too in the playlist.

CODE
Jazz multi date - refresh this
   + Jazz multi date - ignore this
        + Jazz 20s - five tracks
        + Jazz 30s - five tracks
        .............
   + Jazz multi date - send this

Name: ... - refresh this
No query: Static folder

Name: ... - ignore this
No query: static folder

Name: Jazz 20s - five tracks
Query: genre HAS jazz AND NOT date GREATER 1929 AND NOT date LESS 1920
Format: %artist% - %title%
Pop sort: $rand()
Disp sort: default
Max: 5 tracks

Name: ... - send this
Query: @node<Multi date - ignore this>
Format: %date% %artist% - %title%
Pop sort: $rand()


This is necessary otherwise I would get the tracks lined for decades: first the 20s five then the 30s five and so on.

At least till some release ago. Havent tried too much with the last one.

Probably, the best would be the use of @multiple<> but then I don't know how to limit the 5 tracks per decade.

Edit: probably with the new @limit<>...
Let's go testing.
fabiospark
Picks up the tracks with ALL the same performers as the now playing one. Performers is a multiple value field.

CODE
Name: same performer as now playing - AND
Query: performer IS @playing<$meta_sep(performer, AND performer IS )> AND $meta_num(performer) IS @playing<$meta_num(performer)>
Format: %performer%|%title%
Pop sort: default



Picks up the tracks with AT LEAST ONE of the performers of the now playing one.

CODE
Name: same performer as now playing - OR
Query: performer IS @playing<$meta_sep(performer, OR performer IS )>
Format: %performer%|%title%
Pop sort: default



In fact, I would be glad if somebody would give me some enlightement on how the AND one works. I borrowed it from somebody (probably jkwarras) some time ago and still can't really understand it.
SoulMan
fabiospark, I use too "playing" queries. This one displays all versions of playing track :

CODE
Label: @playing<%title%>
[x] Refresh automatically
Query: title IS @playing<%title%>
[x] foo_playlist_gen format
Format: '['%date%']' %artist% • %album%


The problem I have with this query, is when the playing song is not tagged.
I don't understand the "$meta_sep(performer, AND performer IS )" too.

edit: OK i've understood, it's a way to transform multifiels performer into "artist1 OR performer IS artist2 OR performer IS artist3"...

edit: I have to try with :
Query: (@playing<%title%> IS *) AND (title IS @playing<%title%>)
dano
If you have a performer tag with 3 values:
PERFORMER=P1
PERFORMER=P2
PERFORMER=P3
$meta_sep(performer, AND performer IS ) will return:
P1 AND performer IS P2 AND performer IS P3
it's just a clever way to build a query with $meta_sep()
fabiospark
Yes, I know.

But how does that
QUOTE
AND $meta_num(performer) IS @playing<$meta_num(performer)>

work?

It seems to me that if I cut that off I won't get the right results.
cwbowron
QUOTE(fabiospark @ Oct 5 2005, 08:17 AM)
Yes, I know.

But how does that
QUOTE
AND $meta_num(performer) IS @playing<$meta_num(performer)>

work?

It seems to me that if I cut that off I won't get the right results.
*



It ensures that both files have the same number of performer tags. Otherwise a file that contains A,B, and C would match a playing file containing A and B.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.