I’ve run into an odd behavior, and I’m wondering if it’s behaving as expected and maybe I’m missing something, or if it’s an actual bug.
I’ve enabled the ‘missing’ plugin, and am doing searches based on albums which are missing tracks (albumtotal - len(items)). Here are the queries i’ve tested, and the behaviors:
beet ls -a missing:1..- returns albums missing at least one track, as expected
beet ls -a missing:1- returns albums missing exactly one track, as expected
beet ls missing:1- returns tracks in albums missing exactly one track, as expected
beet ls missing:1..- returns nothing. This is where I’m confused. Only the range fails, despite the album field type being set to integer. It seems like something gets confused when the query falls back to the album field from item context. I’ve tried using the unmerged pull request to allow for album fields in the queries in
paths, which works, but ran into this same behavior. I was going to report it to them, but then discovered
lsexhibits the same behavior. I can’t set a separate path format for when
My actual goal is to be able to separate tracks where I only have a single track in the album, even when not flagged as a singleton, to ease navigation when on my digital audio player (ideally using beets-alternatives to set that up), but at the moment I’m failing to be able to do so, since albumtotal, missing, and an attempt at creating an ‘existing’ field (just len(items)) run into first the inability to use album fields as path format queries, and then this issue.
On a related note, I have a minimal ‘existing’ plugin which just returns
len(album.items()) in an album field, and has the type set to
types.INTEGER. If I do
beet ls -a existing:1 it gives the albums where I have one track, but if I do
beet ls existing:1, it returns tracks in albums with 1 track, but also tracks in albums with 10 tracks, and tracks in albums with 21 tracks. It ignored the type and did a text search, but only when in item/track context.
Fair warning that I’ve only been using this project for a day, so please forgive any incorrect terms, and please let me know if I’ve made any flawed assumptions here.
I’d appreciate any thoughts or input on this. Thanks!