Improvements to Photo module and reinstall jobs tables

This commit is contained in:
Deon George 2019-11-10 12:09:03 +11:00
parent bd5fb5d46f
commit db0d0278ed

View File

@ -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;
}
/**