beets icon indicating copy to clipboard operation
beets copied to clipboard

Track-level query returning list of albums containing those tracks

Open Galicarnax opened this issue 5 years ago • 3 comments

There are use cases where it is nice to be able to query beets DB on track level, but show results on album level. Currently, If I use beet ls -a ..., then I do see albums only, but the queries involving track fields are ignored. It would be great to see the list of albums in which at least one track matched a track-level query.

Galicarnax avatar Mar 15 '20 07:03 Galicarnax

Sounds good! One boring part of designing this feature would be the CLI… how should commands indicate that they want this query-by-track, print-by-album behavior? (Maybe it should be a form of query, actually, instead of a command-line flag, so it could work with any command instead of just ls?)

sampsyo avatar Mar 15 '20 16:03 sampsyo

Sometimes I use something like beet ls -f '$album_id' trackLevelQuery | sort -u | xargs <some flags> sh -c "beet ls -af 'some format' id:<xargs replacer>", but would like something more "user-friendly"

GuilhermeHideki avatar Mar 15 '20 17:03 GuilhermeHideki

Reopening, since #5240 is getting reverted #5326

snejus avatar Jun 19 '24 21:06 snejus