Piwigo / Flickr2Piwigo

Import pictures from your Flickr account with Flickr2Piwigo.
http://piwigo.org/ext/extension_view.php?eid=612
GNU General Public License v2.0
9 stars 12 forks source link

Some of the transferred images are not complete, with portions blank/empty/gray. #55

Open ElliotMcGucken opened 4 years ago

ElliotMcGucken commented 4 years ago

Greetings!

Some of the transferred images are not complete, with portions blank/empty as seen in this screen capture:

image image

The grey parts of the image represent the missing parts of the image.

The images are indeed complete on flickr.

Is this a known issue? Any remedies? I've seen it in a few dozen instances so far.

When I re-run the flickr2piwigo transfer, will it update the incomplete images with the complete versions?

I read somewhere that flickr2piwigo checks to see if the flickr image matches up with the piwigo image, and if they don't match, then flickr2piwigo will replace the incomplete piwigo version with the full flickr version. Is that what we should expect?

Thank you!

samwilson commented 4 years ago

I think the only thing you can do is delete the incomplete images and run the import again. If they're there, it won't reimport (because it compares the Flickr ID with the image name; it's only if that doesn't match that it checks the files themselves for checksum equality).

I don't have any time at the moment to work on a better fix for this either, sorry.

ElliotMcGucken commented 4 years ago

Thank you Sam!

Should I delete the image file from the directory, or must I delete the image ID in the database too?

I did find that the command-line tool "jpeginfo" recognized the incomplete files as being corrupt:

[root@PDS2232 12]# jpeginfo -c 3678175c 20200112180312-3678175c.jpg 11648 x 8736 24bit Exif N 38360104 Premature end of JPEG file [WARNING]

So I could write a script that deletes the bad/incomplete images.

The question then becomes, "should my script delete the image from the hard drive, or should the script delete the record of the image in the piwigo database, or should it delete both the image and the database record?"

Thank you!

ElliotMcGucken commented 4 years ago

Thank you Sam!

Should I delete the image file from the directory, or must I delete the image ID in the database too?

I did find that the command-line tool "jpeginfo" recognized the incomplete files as being corrupt:

[root@PDS2232 12]# jpeginfo -c 3678175c 20200112180312-3678175c.jpg 11648 x 8736 24bit Exif N 38360104 Premature end of JPEG file [WARNING]

So I could write a script that deletes the bad/incomplete images.

The question then becomes, "should my script delete the image from the hard drive, or should the script delete the record of the image in the piwigo database, or should it delete both the image and the database record?"

Thank you!

samwilson commented 4 years ago

You should just be able to delete the DB record (if I recall correctly). The file shouldn't matter, it will be overwritten with the full version.

felixkrohn commented 4 years ago

@ElliotMcGucken I think you could delete the photos with the script you mentioned, then use the admin -> tools -> synchronise -> synchronise file structure with database -> directories + files function in the piwigo UI to reflect those changes in the DB before trying a re-import.

felixkrohn commented 4 years ago

regarding the issue of broken photo imports in itself, last time this was mentioned here (#45 ) it seemed to be randomly resolving itself...