-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Age filtering when scanning files should use creation date #860
Comments
The modified date will only change if change the file contents. And as soon you get the file, it will have the current time as modified date (unless you fake it) So, I still see no reason to not use modification time. It's simpler, cross platform and fits the use case in subliminal |
And as soon you get the file, it will have the current time as modified date (unless you fake it) -> this is not the default behaviour I see. |
Exactly, so if you copy a file that you encoded a long time ago subliminal will not pick it up because only the creation time will change.
That does not seem to be the case when for example extracting using 7z or winrar. The files have their original modified date and a current creation date. |
Does anybody have a nice workaround for this? |
A workaround would be to extract and touch the files |
Currently they are filtered by modified date here, but doesn't creation date make more sense?
If you put/copy new files into the scanned folder they should be treated as new. The modified date will never change unless you re-encode, and that would probably also change the hash and break subtitle detection.
The creation date is platform dependent but I found this stackoverflow answer with cross-platform code.
edit: Probably better to use creation and modified dates and pick the latest?
So just
max(os.path.getmtime(path), os.path.getctime(path))
The text was updated successfully, but these errors were encountered: