How to run command after album import

I don’t know if this is possible, but I would like to run a command on each folder that gets imported. I know you can run it after everything is done, but for my application, that would take forever.

This is the workflow that I would like to achieve:
beet import > beet tags album > when album is fully moved to destination folder, run command with [path of folder] > repeat

I hope this is possible, and would really appreciate if someone could help.

1 Like

Hello! Have you seen the hook plugin?

You can run a command on any beets-internal event, including the album_imported event described here:

1 Like

yes I’ve seen that, but I don’t really understand it. can it be used to run a command with the path to the album folder?

Yes! It will take some experimentation to sort out exactly the configuration you want, but the idea behind the plugin is to run commands with parameters from the event. It should be possible to get the album’s path out of the event parameters.