gbbirkisson / spis

Simple private image server 🖼️
GNU General Public License v3.0
128 stars 8 forks source link

Support files with no EXIF data #101

Closed gbbirkisson closed 1 month ago

gbbirkisson commented 1 year ago

Currently SPIS will fail processing media that has no EXIF data.

Aug 01 14:19:57 lxc501 spis_active[1197]: 2023-08-01T13:19:57.907249Z ERROR spis_server::pipeline: Failed processing media: "/mnt/dietpi_userdata/plex_data/photos/IMG-20190526-WA00                           88.jpg"
Aug 01 14:19:57 lxc501 spis_active[1197]:    0: Failed to read exif data
Aug 01 14:19:57 lxc501 spis_active[1197]:    1: No Exif data found in JPEG
Aug 01 14:19:57 lxc501 spis_active[1197]: Location:
Aug 01 14:19:57 lxc501 spis_active[1197]:    spis-server/src/media/images/mod.rs:24

Create a fallback mechanism, using file creation date perhaps.

id4vip commented 1 year ago

just want to tell that all photos taken from Camara or cell phone having EXIF data so these are shown. all photo comes from social website/apps, scanner those not having EXIF data. so spis software is not showing those one. also spis software as each day on schedule time try to process photos again & again. which unnecessary putting load to system & generate big log files. so there must be mechanism to skip unprocessed photo files & instead of EXIF data photo uploaded time is also fine to process those photos.

marcosrosse commented 5 months ago

Hello 👋🏿 , thank you for the contribution!

I'm currently with this issue. Will this is be fixed in the next release?

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.

Run with RUST_BACKTRACE=full to include source snippets.

2024-04-09T17:30:49.817849Z ERROR spis_server::pipeline: Failed processing media: "/var/lib/spis/media/Sent/IMG-20220227-WA0015.jpg" 

   0: Failed to read exif data

   1: No Exif data found in JPEG
Alaith commented 4 months ago

First, thanks for spis.

I was really hoping I could point spis at my folder of meme pngs and jpegs to have them easily browsable and sorted chronologically by creation date, but them not having exif data has put a stop to that. If I was familiar with Rust I'd try implementing this.

isabelgk commented 1 month ago

Hello! I was going to contribute to this since I'd like this feature but I haven't gotten to building/testing locally yet. Do you think it would be as simple as adding another .or_else() here that uses the std::fs::metadata::created() function as fallback?

gbbirkisson commented 1 month ago

Hello! I was going to contribute to this since I'd like this feature but I haven't gotten to building/testing locally yet. Do you think it would be as simple as adding another .or_else() here that uses the std::fs::metadata::created() function as fallback?

Not quite just that simple, but almost #270

gbbirkisson commented 1 month ago

This feature will be a part of this release #268

isabelgk commented 1 month ago

Sweet, thanks for the reply and glad to hear it's in that release! (Once I looked a little more, I saw indeed it was a little bit more complicated due to error reporting etc.) Thanks :)