How to find all tracks which are part of a multi disc set?
Some of my tracks are part of a multi disc set. They have the
disc field set to something higher than 0.
How I can find the tracks where the disc number > 0?
beet ls disc>0
disc doesn’t seem to react to integer comparison.
Hello! You’ll want to use a numeric range query, which uses a different syntax than you’ve assumed here:
disc:1.. should do it.
Thanks @adrian. This works perfectly. Thanks for taking the time and replying here. – I should have found this myself in the documentation.
However, I am curious, why you decided on the range syntax for numeric queries instead of boolean operators (
>)? The latter looks to me more common in search queries…
Sure; there are a couple of reasons.
The first is that the beets query system is build around a
field:pattern syntax. Keeping that consistent is valuable for us, both from a UX perspective and for maintainability. In this kind of query,
1.. is the pattern part, so it goes after the
Of course, we could have stuck with this syntax and done stuff like
disc:>1 or similar. The reason we didn’t do that is because beets supports range queries. So you can also do
year:1990..2005, for instance. Leaving off one end of that range was a natural way to generalize to max/min queries.
I see: Every query part is a field:pattern item and not a boolean expression. Then it makes total sense.Thanks.