beets icon indicating copy to clipboard operation
beets copied to clipboard

Skip based on mtime, not folder

Open feld opened this issue 1 year ago • 4 comments

I have one piece of software that manages ingestion of my library and I rely on Beets for proper tagging and naming. I'm having Beets hardlink the files to its own view of the library which works great, but when I change an album it won't pick up the changes because it's skipping the directory. It would be great if instead it could scan and skip importing based on a file's mtime.

Right now I have to work around it by manually re-importing the album directory with --flat which works but is very tedious and makes it hard to automate.

feld avatar Oct 11 '24 16:10 feld

What do you mean by "won't pick up the changes"? What beet command is it you're running that is ignoring the changes? Can you please provide the output when running it with -vvv?

We already use mtime for beet update:

https://github.com/beetbox/beets/blob/03f1205629ad17f123a190040361babc41c18afc/beets/ui/commands.py#L1660-L1667

jackwilsdon avatar Oct 11 '24 16:10 jackwilsdon

My imports are always done with something like beet import -Ri /path/to/library

After all these years you're telling me I could use beet update for this? 😭

I thought that was only for re-tagging existing media, not for detecting changes and re-importing them. I was under the impression that only beet import can import files like e.g., if a 16bit FLAC gets replaced with a 24bit FLAC.

The docs here don't make this very clear: https://beets.readthedocs.io/en/stable/reference/cli.html#update

feld avatar Oct 11 '24 16:10 feld

Yeah it sounds like update may not be what you want - sorry! 😬

Am I right in understanding that you have a "source" library (at /path/to/library) outside of beets, and you're looking to re-import changed files from there?

jackwilsdon avatar Oct 11 '24 16:10 jackwilsdon

Yes that's correct.

/path/to/library is my initial ingestion, and the normalized library I point my music software to is /path/to/Beets.

Beets' files are hardlinks.

feld avatar Oct 11 '24 16:10 feld