HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: timmytucker718 on 2012-06-25 07:09:47

Title: Some questions regarding query syntax
Post by: timmytucker718 on 2012-06-25 07:09:47
So, I've read through this page: http://wiki.hydrogenaudio.org/index.php?ti...00:Query_syntax (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Query_syntax) and have a few questions.

What's the difference between typing "artist" or " %artist " ? 

and

The document says "The user cannot access technical information (such as codec specifications) or component-provided information (playback statistics and such) through title-formatting."  why does it say I can't use playback statistics?  I know damn well I can type %play_count% IS 10 and it will work. 

thanks
Title: Some questions regarding query syntax
Post by: r0k on 2012-06-25 07:57:16
What's the difference between typing "artist" or " %artist " ?

artist will give you the content of the artist tag. If this tag is empty, you'll get "?"
%artist% will look at artist tag, and if it's emtpy, it will than look at "album artist", "composer" and "performer" tags (Title formatting reference) (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference#.25artist.25)
Quote
The document says "The user cannot access technical information (such as codec specifications) or component-provided information (playback statistics and such) through title-formatting."  why does it say I can't use playback statistics?  I know damn well I can type %play_count% IS 10 and it will work.

Dunno. Maybe it's outdated
Title: Some questions regarding query syntax
Post by: db1989 on 2012-06-25 08:59:14
I edited that to note an exception for foo_playcount, and I made some other edits and re-arrangements that I hope improve the Notes (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Query_syntax#Notes). I do think that perhaps the sub-section on title-formatting, or maybe even the entirety of the Notes, may benefit from being moved and/or integrated into the rest of the article. However, that’s a job for another day!
Title: Some questions regarding query syntax
Post by: timmytucker718 on 2012-06-25 09:08:55
But aren't all playback statistics able to use queries?  I use them all the time.

I do agree the article needs to be edited so that an amateur is more able to understand.
Title: Some questions regarding query syntax
Post by: r0k on 2012-06-25 09:21:44
foo_playcout = playback statistics, foo_playcount is just the "internal" component name.
There are unofficial "playback statistics" components too but those can't be querried.
Title: Some questions regarding query syntax
Post by: timmytucker718 on 2012-06-25 13:20:33
foo_playcout = playback statistics, foo_playcount is just the "internal" component name.
There are unofficial "playback statistics" components too but those can't be querried.


Ah, gotcha. 

Title: Some questions regarding query syntax
Post by: timmytucker718 on 2012-06-25 22:53:46
One more question....

How come you have to do %play_count% IS 10.  Why can't you do just play_count IS 10.  What is the logic beyond requiring the %? 

And more importantly, why does the wiki show an example "last_modified DURING LAST 2 WEEKS’’"  That query only works for me with percent signs.
Title: Some questions regarding query syntax
Post by: Frank Bicking on 2012-06-30 04:42:15
Quote
Why can't you do just play_count IS 10.

Because play_count is not a metadata field. For other information, title formatting (e.g., %play_count%) has to be used.

Quote
And more importantly, why does the wiki show an example "last_modified DURING LAST 2 WEEKS’’"

That example is wrong. Use the help file that ships with foobar2000 instead, available from "?" buttons next to search fields. Maybe the wiki page should be removed, there is no point in maintaining this at two locations.
Title: Some questions regarding query syntax
Post by: db1989 on 2012-06-30 10:24:42
In any case, we should definitely keep me away from the page. :S Turns out I removed the percentage symbols in the past, presumably thinking – for whatever unknown reason – that was correct.

I’ve just updated the page with this correction and some other things from Frank’s other recent post about query syntax, but I would really appreciate Frank or someone else with more knowledge checking it over for any other glaring errors/failures. Or just scrapping it outright, as you’ve already suggested. These things might well be best left to the professionals, rather than being open to dunces like me.