Set track field on import

I managed to import all my “good” albums with beets in a decent amount of time.
The last let of my journey is to import the leftovers: albums with missing tracks or un-matchable info.

I’d like to do a first quick pass of them and then revisit those items later to refine the matches or re-source them.

Is it possible to set a flexible tag during import on the tracks in a way that they’ll be moved to a specific path?

I’ve tried with the --set flag but that seems to set the tag on the album and the path rule is not applied when moving the files.

Thanks for any suggestions!

Hello! Sounds like you’re running into the same problem as discussed in this thread:

Unfortunately, there’s not a great solution yet. There is a PR offering a kind of fallback access for item-level attributes, but it has performance trade-offs that make it not a clear winner.

Would you be interested in weighing in there? Maybe somebody else has a better idea, or maybe it will spur action toward a simpler solution.

I checked the issue but I don’t think I know enough to have an opinion on that yet, I’ll have to spend some more time thinking about that.

In the mean time, is there a way, after the import, to add a tags on the fields that match an album query?

Just trying to find a way to finish importing the library in the appropriate paths so I can move on to phase two…


Yeah, that would be a nice way to do it. I think one good option might be @kergoth’s crossquery plugin:

It lets you do stuff like this:

So you could do beet mod album_has:foo:bar foo=bar to “propagate” album fields to item fields, hypothetically.

Thanks for the tip!
I managed to find a good workflow with another of the plugins from that repo:

      '': 'bad=1'

during import, if an album matches the “bad:1” query (which i set with the --set config option when launching the import) it sets bad=1 on all the items of said album. That way the path rules are applied as expected.

The plugin is a bit verbose on the console but I can manage for the few albums I’m left with

1 Like