"Touch" Parent Folder

I use beets to organize and catalog my FLAC files. I use the convert plugin to convert them all to AAC files and then I dump them into iTunes. Unfortunately, iTunes does not have a “watched folder” feature that can detect new files and update it’s catalog.

Oftentimes, I will forget to update iTunes, and iTunes ends up behind on my music collection. I try to fix this by going into my converted music folder and sort by date.

This works well for new artists, but if I add an album from an existing artist, it doesn’t touch the actual artist directory, so even though, for example, I add a new album to Chicago today, when I sort by date in my file browser of choice, Chicago ends up low on the list, because that directory was created two years ago.

It would be nice if, on import or convert, the parent directory (usually the artist) could have it’s date and time updated. In the *NIX world this is as simple as issuing a touch command on the folder to update it’s date and time stamp.

Is there any way to do this in beets?

It seems the hook plugin might be the way to do this:
https://beets.readthedocs.io/en/v1.3.18/plugins/hook.html

Is there a variable I can use for the artist name in the config?

I added this to my config.yaml and it looks like it did the trick:

hook:
hooks:
- event: item_converted
command: touch /mnt/storage/lossy/$artist

1 Like