From db0d0278ed1ebbf308c610bbdd39f5fdb1421e60 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 10 Nov 2019 12:09:03 +1100 Subject: [PATCH] Improvements to Photo module and reinstall jobs tables --- app/Models/Photo.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Models/Photo.php b/app/Models/Photo.php index 5c9453a..5169f18 100644 --- a/app/Models/Photo.php +++ b/app/Models/Photo.php @@ -3,6 +3,7 @@ namespace App\Models; use DB; +use Illuminate\Support\Facades\Log; class Photo extends Abstracted\Catalog { @@ -184,6 +185,10 @@ class Photo extends Abstracted\Catalog public function setSubSecTime() { $this->subsectime = $this->property('exif:SubSecTimeOriginal'); + + // In case of an error. + if ($this->subsectime > 32767) + $this->subsectime = 32767; } public function setThumbnail() @@ -194,6 +199,9 @@ class Photo extends Abstracted\Catalog // @todo Couldnt get the thumbnail, so we should create one. Log::info(sprintf('Unable to create thumbnail for %s (%s)',$this->id,$e->getMessage())); } + + if ($this->thumbnail === FALSE) + $this->thumbnail = NULL; } /**