blissd / fotema

Photo gallery for Linux
81 stars 8 forks source link

Images missing and in wrong order #180

Open forteller opened 2 months ago

forteller commented 2 months ago

The latest imported images have some in the wrong order and some seems to be totally missing. All my photos are in the folder to the left in this screenshot, yet the two marked with an X is not showing in Fotema, and the ones in a green circle is Fotema are days older, so they are further up in the same folder and should not be shown at this spot.

image

Thanks again! :)

blissd commented 2 months ago

When ordering images Fotema will first try and use the creation and modification timestamps embedded in the EXIF data, and then will fall back to the creation and modification timestamps from the file system metadata, and finally will fall back to the current wall-click time.

Can you check if the out-of-order images have embedded EXIF timestamps?

If a picture is missing, then it might be that Fotema has ordered it differently to what you expect and you haven't spotted the picture yet, or it could be that Fotema experienced an error when processing the image and marked it as broken it its database to exclude it from further processing.

If you are familiar with SQL, then you could take a look in Fotema's database (at ~/.var/app/app.fotema.Fotema/data/app.fotema.Fotema/pictures.sqlite) in the pictures table and the visual view to check the various timestamp columns to figure out what Fotema knows about the pictures.

The visual view drives the various album views in the UI and the ordering_ts column determines where the picture is placed chronologically. You should be able to see a human-readible relative file path in the picture_path_lossy column. To see if Fotema knows about a missing picture you could try a query like:

select * from visual where picture_path_lossy = 'Directory/Under/Pictures/Root.jpg'

If the visual view returns nothing, try for the pictures table:

select * from pictures where picture_path_lossy = 'Directory/Under/Pictures/Root.jpg'
blissd commented 2 months ago

Please note that if you edit the EXIF data of an image that Fotema has already processed, then you need to force Fotema to reprocess the image to pick up the changes. You can see #167 for help with that.