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

Option to preserve file timestamps #30

Open
adamhotep opened this issue Sep 11, 2020 · 3 comments
Open

Option to preserve file timestamps #30

adamhotep opened this issue Sep 11, 2020 · 3 comments
Labels
enhancement New feature or request upstream

Comments

@adamhotep
Copy link

It would be nice if there were an option to preserve the original timestamp of modified files.

@chaudum chaudum added the enhancement New feature or request label Sep 17, 2020
@chaudum
Copy link
Owner

chaudum commented Sep 21, 2020

Hi @adamhotep

Thanks for your request. Could you elaborate a bit more on your use-case? Since rgain is actually modifying the files (setting the ID3 tags with replay gain information), the behaviour is expected.

Under the hood, rgain is using the mutagen library to read/write the ID3 tags, and I could not find an option to preserve the original modification date.

There are some workarounds to "preserve" the original modification date when editing files on Linux, which I would look at (storing the original modification date and applying it thereafter with touch).

@adamhotep
Copy link
Author

Yeah, touch or some pythonic approximation.

Here's a proof of concept shell script wrapper that implements my request. It'd be preferable to implement all of that in python, which would remove the need for a temp file and the need to differentiate between GNU and BSD (and posix shell string manipulation is particularly illegible to most coders).

@rsplaul
Copy link

rsplaul commented Oct 15, 2020

A use-case would be an mp3 collection management software (like the old squeezeboxserver/logitechmediaserver) that relies on modification dates to show newly added titles/albums in a separate section. Since mp3s don’t have any sort of unique identifier this is the only reasonable way to differentiate between metadata maintanance (like adding replay gain data) and new additions. Also, even without any library software, a user might want to keep track of when an mp3 was initially added to the collection, rather than seeing the last change.

I’d suggest introducing a -P option, similar to the option in e.g. exiftool, which does the same for JPEG files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream
Projects
None yet
Development

No branches or pull requests

3 participants