richq / folders2flickr

Upload files to flickr
Other
102 stars 38 forks source link

Files deleted on flickr aren't replaced #7

Open lbell opened 10 years ago

lbell commented 10 years ago

Noticed during testing that if I delete an uploaded file, folders2flickr just checks to see if it's in the history, not still on flickr and assumes it's there...

Perhaps my use case is unique, but I'm using flickr as a backup, and it would be nice to know there is a safety catch if the pic get's accidentally deleted from flickr.

Anyway, just a thought. Cheers!

richq commented 10 years ago

Originally it did this, but checked every photo in the local db against every photo on flickr. With 10k photos it would take years to finish, as each remote check required an api call. I think this is needed, but there must be a better way... On Jan 11, 2014 7:26 AM, "LBell" notifications@github.com wrote:

Noticed during testing that if I delete an uploaded file, folders2flickr just checks to see if it's in the history, not still on flickr and assumes it's there...

Perhaps my use case is unique, but I'm using flickr as a backup, and it would be nice to know there is a safety catch if the pic get's accidentally deleted from flickr.

Anyway, just a thought. Cheers!

— Reply to this email directly or view it on GitHubhttps://github.com/richq/folders2flickr/issues/7 .

lbell commented 10 years ago

Interesting... perhaps we can leverage flickr.photos.search -- which unfortunately only returns the first 4,000 entries... or flickr.photosets.getPhotos and iterate through the sets...

Just brainstorming...

richq commented 10 years ago

Yeah, look up all photos in a few queries and compare that with the DB. Definitely not 1 by 1. I have a ton of sets, so even that might be too slow. Maybe something like https://secure.flickr.com/services/api/flickr.photos.getCounts.html to see if there's a mismatch by count in on disk vs online, and then do a slower more methodical set check.

richq commented 10 years ago

I see that photosets also returns the count - https://secure.flickr.com/services/api/flickr.photosets.getList.html - so maybe get all the sets, check the counts, then check any that don't look good would be a better back up strategy.

lbell commented 10 years ago

photsets.getList looks promising