Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_facets filtering (Read 1058 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_facets filtering

I've been a long time user of foobar but only for adding replaygain tags to my files, for everything else I've been using Mp3tag and dbPoweramp (for converting to MP3 and modifying the output tags). A couple of days ago I had another need for foobar to add a column that contained a hash of various fields for use in MinimServer to function as a unique album ID, so I figured I should probably sit down and work out how to use this thing, and oh my god I'm so glad I did!

Amongst other things, I'm using facets to QA my tagging. One of my filters checks for missing tags (I believe it's not possible to check for missing album art), but the other I'm looking to add is to make sure the files are stored in the correct location.
Using massTagger I've verified the following functions work, but I'm unable to get them working as a filter, and I've tried a lot of permutations! I'm still a little confused by the syntax so I'm hoping it's a simple one.

The current location of the file I believe is:
Code: [Select]
$directory_path(%path%)
and the correct location of the file is:
Code: [Select]
I:\MUSIC\Test_foobar\UNQALBUMID\$meta(album artist)\$replace($if($meta_test(boxtitle),$meta(boxtitle),$meta(album)[ '('%release%')'][ '('%albumsupp%')']),:,-)

So I'm just trying to display those that aren't in the correct location, but I've been going round in circles for the last couple of hours now.

Thanks

Re: foo_facets filtering

Reply #1
Hi there,

I could not test with your specific path, but this seemed to worked for me -

Code: [Select]
"$strcmp($directory_path(%path%),M:\Music\$meta(album artist)\$meta(album))" MISSING

Seeing as I keep all my multi-disc albums in a "Disc 1, Disc 2" folder structure following the above path, the search returned about half my library. ;)

Cheers

 

Re: foo_facets filtering

Reply #2
Even when I copied your example I removed the double quotes out of habit, thinking they'd turn the whole statement into a string!

It looks like the relevant point is
Quote
Double quotation marks should also be included around title-formatting expressions that use parentheses.
I missed this in my brief scanning of the Query syntax. More Haste, less speed :-)

Thanks again