Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip based on mtime, not folder #5455

Open
feld opened this issue Oct 11, 2024 · 4 comments
Open

Skip based on mtime, not folder #5455

feld opened this issue Oct 11, 2024 · 4 comments
Labels
feature features we would like to implement

Comments

@feld
Copy link

feld commented Oct 11, 2024

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.

@jackwilsdon
Copy link
Member

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:

beets/beets/ui/commands.py

Lines 1660 to 1667 in 03f1205

# Did the item change since last checked?
if item.current_mtime() <= item.mtime:
log.debug(
"skipping {0} because mtime is up to date ({1})",
displayable_path(item.path),
item.mtime,
)
continue

@jackwilsdon jackwilsdon added the needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." label Oct 11, 2024
@feld
Copy link
Author

feld commented Oct 11, 2024

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

@jackwilsdon
Copy link
Member

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?

@feld
Copy link
Author

feld commented Oct 11, 2024

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.

@jackwilsdon jackwilsdon added feature features we would like to implement and removed needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature features we would like to implement
Projects
None yet
Development

No branches or pull requests

2 participants