picasawebsync icon indicating copy to clipboard operation
picasawebsync copied to clipboard

DELETE REMOTE delete max 1000 photos.

Open emmtte opened this issue 8 years ago • 4 comments

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}

emmtte avatar Jan 02 '17 13:01 emmtte

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

leocrawford avatar Jan 03 '17 14:01 leocrawford

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)

emmtte avatar Jan 03 '17 17:01 emmtte

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 avatar Jan 03 '17 19:01 leocrawford

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

leocrawford avatar Jan 06 '17 19:01 leocrawford