Merge pull request #1969 from pixelfed/staging

Update Story model
This commit is contained in:
daniel 2020-01-28 21:34:24 -07:00 committed by GitHub
commit 9eb28f07dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 170 additions and 136 deletions

View file

@ -10,7 +10,7 @@ class Story extends Model
{ {
use HasSnowflakePrimary; use HasSnowflakePrimary;
public const MAX_PER_DAY = 10; public const MAX_PER_DAY = 20;
/** /**
* Indicates if the IDs are auto-incrementing. * Indicates if the IDs are auto-incrementing.

View file

@ -119,7 +119,41 @@ class Image
}); });
} else { } else {
if(config('media.exif.database', false) == true) { if(config('media.exif.database', false) == true) {
$media->metadata = json_encode($metadata); $meta = [];
$keys = [
"COMPUTED",
"FileName",
"FileSize",
"FileType",
"Make",
"Model",
"MimeType",
"ColorSpace",
"ExifVersion",
"Orientation",
"UserComment",
"XResolution",
"YResolution",
"FileDateTime",
"SectionsFound",
"ExifImageWidth",
"ResolutionUnit",
"ExifImageLength",
"FlashPixVersion",
"Exif_IFD_Pointer",
"YCbCrPositioning",
"ComponentsConfiguration",
"ExposureTime",
"FNumber",
"ISOSpeedRatings",
"ShutterSpeedValue"
];
foreach ($metadata as $k => $v) {
if(in_array($k, $keys)) {
$meta[$k] = $v;
}
}
$media->metadata = json_encode($meta);
} }
$img->resize($aspect['width'], $aspect['height'], function ($constraint) { $img->resize($aspect['width'], $aspect['height'], function ($constraint) {

View file

@ -43,7 +43,7 @@ return [
/* /*
* The maximum time in seconds each optimizer is allowed to run separately. * The maximum time in seconds each optimizer is allowed to run separately.
*/ */
'timeout' => 60, 'timeout' => 59,
/* /*
* If set to `true` all output of the optimizer binaries will be appended to the default log. * If set to `true` all output of the optimizer binaries will be appended to the default log.

View file

@ -15,6 +15,6 @@ return [
| |
*/ */
'driver' => env('IMAGE_DRIVER', 'gd'), 'driver' => env('IMAGE_DRIVER', 'imagick'),
]; ];