diff options
-rw-r--r-- | apps/dav/lib/Connector/Sabre/FilesPlugin.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 81cdfa464b5..f7904e87883 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -388,9 +388,9 @@ class FilesPlugin extends ServerPlugin { } $propFind->handle(self::HIDDEN_PROPERTYNAME, function () use ($node) { - $filesMetadataManager = \OCP\Server::get(IFilesMetadataManager::class); - $metadata = $filesMetadataManager->getMetadata((int)$node->getFileId(), true); - return $metadata->hasKey('files-live-photo') && $node->getFileInfo()->getMimetype() === 'video/quicktime' ? 'true' : 'false'; + $isLivePhoto = isset($node->getFileInfo()->getMetadata()['files-live-photo']); + $isMovFile = $node->getFileInfo()->getMimetype() === 'video/quicktime'; + return ($isLivePhoto && $isMovFile) ? 'true' : 'false'; }); /** |