I’ve created a av_bitrate album field in the inline plugin settings.
Is it possible to use such a variable in searches?
I’m asking this because I would like to find a way how I can search for all albums that have e.g. a lower average MP3 bitrate than 193 so that I can replace them with better quality rips.
So I’m looking for a query with which I can define file type and av_bitrate.
I’ve tried beet ls -a format:MP3 '$av_bitrate':<193
But that didn’t work
Just reporting back if others seek solutions:
I have av_bitrate calculated per album with the inline plugin.
I do this to be able to parse the av_bitrate in my path like this:
/Albums/Common/The People (2007) (MP3 177)
With the following command I can filter all MP3’s with (in this case) a average bitrate lower than 193 Kbps.
beet ls -a format:MP3 av_bitrate:..193 -f "\$av_bitrate \$path"
I add the -f "\$av_bitrate \$path" to print the av_bitrate and the path in the terminal output. Like this:
128 /Volumes/Tunez/Albums/Aphex Twin/…I Care Because You Do (1995) (MP3 128)
192 /Volumes/Tunez/Albums/Fiona Apple/Extraordinary Machine (2005) (Jon Brion-produced leak 2005) (MP3 192)
One thing that I didn’t succeed in is to print the output like this which would have been nicer:
128 - Aphex Twin - …I Care Because You Do (1995)
192 - Fiona Apple - Extraordinary Machine (2005)
But that might require black belt formatting. Any ideas are welcome.