Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query to find albums with/without embedded cover art #2572

kupietools opened this issue May 21, 2017 · 5 comments


Copy link

@kupietools kupietools commented May 21, 2017

Would like to be able to run a query for albums with/without embedded cover art. As it is, I have to import my mp3s back into iTunes, create a smart playlist, and then tag them under 'grouping' as having or not having cover art, re-import my whole library in Beets, and then search in Beets on the Grouping field. Would like to be able to do it without needing iTunes as an intermediary and having to re-import to update.

EDIT: I take it back. Tagging 5000 mp3s as 'No cover art' in iTunes, after subsequent re-import Beets only turns up about 20 files for beets list grouping:'No cover art' or beets list 'grouping:No cover art'. Would be nice if there were a straightforward way to do this.


This comment has been minimized.

Copy link

@sampsyo sampsyo commented May 22, 2017

This has come up before, and it wouldn't be hard to add. We should totally do it. Thanks for filing the issue!

@sampsyo sampsyo added the feature label May 22, 2017
@sampsyo sampsyo changed the title Feature request: Query to find albums with/without embedded cover art Query to find albums with/without embedded cover art May 22, 2017

This comment has been minimized.

Copy link

@kuzi-moto kuzi-moto commented Jun 5, 2017

+1 from me. I asked about this on Discourse and meant to open a request myself. I would really like to more easily find my albums missing embedded art!

@arcresu arcresu added bitesize and removed Hacktoberfest labels Apr 27, 2019

This comment has been minimized.

Copy link

@BardsSong BardsSong commented Aug 8, 2019

Hi! I'm looking to implement this feature, but I'm struggling a little with understanding how to create a subclass of Query, is there another similar plugin that I can look at to see an example?


This comment has been minimized.

Copy link

@jackwilsdon jackwilsdon commented Aug 8, 2019

@BardsSong take a look at these:

It seems like we only have one plugin which uses item queries and none that use album queries at the moment, so I hope the links above are enough to get you started 👍


This comment has been minimized.

Copy link

@kergoth kergoth commented Sep 6, 2019

Adding a simple query for this is straightforward, but art.get_art() is really slow, since it has to pull it out of the file with mediafile, so doing such a query takes ages with a large library. Better than nothing, sure. Alternatively, we could probably have such a plugin add a new field and then keep the field in sync with the file via appropriate hooks, to avoid calling get_art() repeatedly during the query.

Side note, beets will check every Query.match against everything up front. That is, if you do a beet ls billy boy on poison has_art:1 it still runs HasArtQuery.match() against every Item, not just the ones that already match the rest of the query. It makes sense, as I'm sure it'd be more complex for the implementation to try to do the query objects that have an sql clause first and then match against that, but worth taking note of, particularly in the case of slow field queries like this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
8 participants
You can’t perform that action at this time.