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

A flag to not overwrite existing downloads (only download new photos) #21

Open
karan opened this issue Jun 20, 2020 · 6 comments
Open
Assignees

Comments

@karan
Copy link

karan commented Jun 20, 2020

I am finding that the method to find the oldest photo is not quite working as expected. It doesn't truly go to the oldest place (~2002) for me for some reason.

So what I'm trying is delete the .lastdone file and run the tool repeatedly, however, that causes all existing images to be downloaded again even if they exist on disk.

I can understand why that would be useful by default (sync changes to existing photos), but it would be nice to have a flag that only downloads new files and ignores the ones that exist on disk.

@mpl
Copy link
Collaborator

mpl commented Jun 21, 2020

Hmm maybe. But in your specific use-case, doesn't the existing -start flag address your problem?

@mpl mpl self-assigned this Jun 21, 2020
@karan
Copy link
Author

karan commented Jun 21, 2020

-start could work but I use https://github.com/JakeWharton/docker-gphotos-sync/ which makes setting the flag at the run time not that easy (I would have to run through the download dir and find the latest one).

@JakeWharton
Copy link
Contributor

I'm happy to add whatever functionality is needed to the container. Presumably the IDs are ordered do we only need to take the newest lexicographically?

@karan
Copy link
Author

karan commented Nov 15, 2020

Actually, I don't think start will work. It seems that in my case some photos are sporadically missing. So if I have photos 5 4 3 2 1, the tool only seems to have downloaded 5 3 1. In that case, I can't use -start. What I need is to tell the tool to walk the entire library again, and only download the ones for which there is no existing directory.

So ideally, I'd like the flow to be:

  1. Run with --no-overwrite (or similar)
  2. Get last done (optional).*
  3. Open last done URL
  4. Navigate left
  5. Check if directory with ID exists
  6. Download item <- ONLY if the directory for it doesn't exit

Thoughts?

*In this concept, since each run is basically idempotent, the meaning of lastdone is different. So the sequence should always start from the first (or pre-set) location (--start=URL)

@gc-ss
Copy link

gc-ss commented Dec 31, 2021

So if I have photos 5 4 3 2 1, the tool only seems to have downloaded 5 3 1

@karan can you redirect

docker container logs -f <docker-gphotos-sync-container> and find out what happened to 4 2?

@nirajsanghvi
Copy link

I'm hoping this request is still being considered, because it's also useful if you add older photos to your library, or save photos from a shared album into your library that predate .lastdone and want to sync everything locally without missing those additions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants