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

DELETE REMOTE delete max 1000 photos. #48

Open
emmtte opened this issue Jan 2, 2017 · 4 comments
Open

DELETE REMOTE delete max 1000 photos. #48

emmtte opened this issue Jan 2, 2017 · 4 comments

Comments

@emmtte
Copy link

emmtte commented Jan 2, 2017

Hello,

I need to exec several times the script to delete all remote photos.
Because script delete only mas 1000 photos.

Is that normal?

Finished transferring files. Total files found 2581, composed of {'DELETE_REMOTE': 1000, 'SILENT': 1581, 'UPLOAD_LOCAL': 0, 'UPDATE_REMOTE_METADATA': 0, 'DELETE_LOCAL': 0, 'TAG_REMOTE': 0, 'DOWNLOAD_REMOTE': 0, 'REPORT': 0, 'REPLACE_REMOTE_WITH_LOCAL': 0}

@leocrawford
Copy link
Owner

On the next sync, would you see DELETE_REMOTE: 1000 and Silent: 581?

@emmtte
Copy link
Author

emmtte commented Jan 3, 2017

No after 4 or 5 times it' every time the same
Finished transferring files. Total files found 2581, composed of {'DELETE_REMOTE': 1000, 'SILENT': 1581, 'UPLOAD_LOCAL': 0, 'UPDATE_REMOTE_METADATA': 0, 'DELETE_LOCAL': 0, 'TAG_REMOTE': 0, 'DOWNLOAD_REMOTE': 0, 'REPORT': 0, 'REPLACE_REMOTE_WITH_LOCAL': 0}
but every times 1000 images are deleted
(I have 33000 photos to delete and only 2581 need to stay)

@leocrawford
Copy link
Owner

leocrawford commented Jan 3, 2017

OK. What's happening is that by default the API we use only returns 1000 items, which we compare with what is local and then remove those that aren't there. I think if we scanned more we would delete more so the bit that needs to be changed is

to change scanWebPhotos from:

gd_client.GetFeed(webAlbum.GetPhotosUri() + "&imgmax=d")

to

gd_client.GetFeed(webAlbum.GetPhotosUri() + "&imgmax=d&max-results=100000")

using the max-results param from https://developers.google.com/picasa-web/docs/2.0/reference

Let me know if it works and/or submit a merge request.

@leocrawford
Copy link
Owner

Any feedback on whether it works? I'm keen to get feedback and close the ticket if possible.

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

2 participants