andreknieriem / photobooth

A photobooth Web-Application for raspberry pi with gphoto2
https://photobooth.andrerinas.de/
MIT License
295 stars 163 forks source link

Show date below images in gallery not working #151

Closed andi34 closed 4 years ago

andi34 commented 4 years ago

Describe the bug White index after enableing the option to show date below images in gallery

To Reproduce Steps to reproduce the behavior:

  1. Enable dateformat images
  2. enable option to show date below images in gallery
  3. save your changes
  4. open index
  5. only white page

Expected behavior Show index, show date below images in gallery

Error from console

Fatal error: Uncaught Error: Call to a member function format() on bool in /var/www/html/template/gallery.template.php:16 Stack trace: #0 /var/www/html/index.php(175): include() #1 {main} thrown in /var/www/html/template/gallery.template.php on line 16

Environment (please complete the following information):

Photobooth

sualko commented 4 years ago

For me it's not working for freshly taken pictures, but if you reload the page the date is shown (even if it's ugly). Can you confirm this behavior?

2019-10-21 14 07 15 localhost 1908465ded11

sualko commented 4 years ago

I added a fix for the ugly date and a check if the filename is in date format. So it looks now like this:

2019-10-21 14 26 13 localhost 317b7a7599f6

andi34 commented 4 years ago

Great! Thanks a lot!