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

Feature request: Update last-modified time of existing files #332

Closed
Flandyn opened this issue Jul 13, 2019 · 1 comment
Closed

Feature request: Update last-modified time of existing files #332

Flandyn opened this issue Jul 13, 2019 · 1 comment

Comments

@Flandyn
Copy link

Flandyn commented Jul 13, 2019

I have downloaded a lot of images from Flickr (over 1TB) before there was an update which added the last-modified time to downloaded files.
If I was to redownload everything it would take too much time.
Is it possible to simply update the last modified time of existing files?

@Flandyn Flandyn changed the title Feature request: Option to update/overwrite existing files Feature request: Option to update existing files Jul 13, 2019
@Flandyn Flandyn changed the title Feature request: Option to update existing files Feature request: Update last-modified time of existing files Jul 13, 2019
mikf added a commit that referenced this issue Jul 15, 2019
This can set a file's modification time according to a UNIX timestamp
or a datetime object from its metadata.
@mikf
Copy link
Owner

mikf commented Jul 15, 2019

I'm not entirely sure using the Last-Modified times for "older" Flickr images is such a good idea. Take for example this image:

https://live.staticflickr.com/7463/16089302239_de18cd8017_b.jpg

It's Last-Modified header says Fri, 01 Mar 2019 14:33:50 GMT, even though it was uploaded in 2015.

Anyway, 16c582a adds an mtime post-processor and a --mtime-from-date command-line switch that can set modification times according to a file's metadata. In combination with --no-download from 6209728, you can update your files' mtime with:

$ gallery-dl --no-download --mtime-from-date -o skip=false <Flickr URL>

If you really want Last-Modified times, I can implement this as well, but, as I said, it might not be as useful as the actual upload date.

@Flandyn Flandyn closed this as completed Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants