Flexible attributes

Hello!

First off, thanks so much for beets! It’s a great and geeky piece of software for a music hoarder like myself.

I have scoured the documentation and my google-fu has failed me. I am trying to albums which has a flexible attribute set. For instance, if I use the flexible attribute mood and add mood:sad, mood:happy, mood:boring to different albums, I would like to list all albums which has any of those set. How can I do this?

Also, is it possible to delete a flexible attribute from the database, as in completely remove “moods” from the database and all assigned albums/tracks?

Thanks!

Doesn’t beet ls mood:boring work?

That should be the work for the scrub plugin.

It does, yes! But I would like to list mood:*, and only if it contains data.
Basically, the reverse of beet list mood::^$

Great, thanks! I will look in to the plugin. :slight_smile:

How about term negation then?

How about mood::.?

2 Likes

That worked perfectly! I don’t understand why it works, but it does. :wink:

The scrub plugin does unfortunately not remove the entry from the database, it will only remove the entries/tags from tracks/albums. I think I was a little unclear. I would like it removed from the database entirely so it will not show up when typing beet fields. Does that make sense?

There is beet modify field!, which removes field from matching items:

The reason . works is because that is regex for “any character.”

1 Like

Thank you kindly @adrian - that did the trick! I’m in the experimentation phase of beets at the moment so I’m trying to figure out as much as possible before importing my entire library.

It would seem I’ve been able to somehow add a ! to a field, so there is an item flexible attribute called something!. I was not able to delete this using beet modify something!! or beet modify something!. I believe I managed to create this flexattr by trying something silly like beet modify something!="text" albumname.

This isn’t important as I’ll re-create the database when creating my “real” library, but figured it was worth a mention.