diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-04-13 10:52:26 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-04-14 12:11:02 +0200 |
commit | 1c7ecfc54499d866b9913c135c0c7439634d8bb1 (patch) | |
tree | 162eff580adaa1fe92a3806625f452caf525c738 /lib/private/Metadata | |
parent | 781784553889601d02553931aed8ff1fde95640b (diff) | |
download | nextcloud-server-1c7ecfc54499d866b9913c135c0c7439634d8bb1.tar.gz nextcloud-server-1c7ecfc54499d866b9913c135c0c7439634d8bb1.zip |
Fix an issue with the search backend update
And update autoloader
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/private/Metadata')
-rw-r--r-- | lib/private/Metadata/MetadataManager.php | 7 | ||||
-rw-r--r-- | lib/private/Metadata/Provider/ExifProvider.php | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/private/Metadata/MetadataManager.php b/lib/private/Metadata/MetadataManager.php index 69e9cb3c852..d1cb896febf 100644 --- a/lib/private/Metadata/MetadataManager.php +++ b/lib/private/Metadata/MetadataManager.php @@ -93,7 +93,12 @@ class MetadataManager implements IMetadataManager { public function getCapabilities(): array { $capabilities = []; foreach ($this->providers as $supportedMimetype => $provider) { - $capabilities[$supportedMimetype] = $provider::groupsProvided(); + foreach ($provider::groupsProvided() as $group) { + if (isset($capabilities[$group])) { + $capabilities[$group][] = $supportedMimetype; + } + $capabilities[$group] = [$supportedMimetype]; + } } return $capabilities; } diff --git a/lib/private/Metadata/Provider/ExifProvider.php b/lib/private/Metadata/Provider/ExifProvider.php index 91c858f6794..2e1eb1d4208 100644 --- a/lib/private/Metadata/Provider/ExifProvider.php +++ b/lib/private/Metadata/Provider/ExifProvider.php @@ -25,6 +25,14 @@ class ExifProvider implements IMetadataProvider { $size->setMetadata([]); if (!$data) { + $sizeResult = getimagesizefromstring($file->getContent()); + if ($sizeResult !== false) { + $size->setMetadata([ + 'width' => $sizeResult[0], + 'height' => $sizeResult[1], + ]); + } + return [ 'size' => $size, ]; |