aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2023-12-18 11:44:44 +0100
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-12-19 13:31:46 +0000
commit8cb5d47341da84b19d67874a07178c53d2c6b86e (patch)
treecfd631096d39fc19d4944ba361e1c221766928b1 /apps/dav
parent1a45dd0b8c7093e47f24df68db610a93c114d05a (diff)
downloadnextcloud-server-8cb5d47341da84b19d67874a07178c53d2c6b86e.tar.gz
nextcloud-server-8cb5d47341da84b19d67874a07178c53d2c6b86e.zip
Use FileInfo's metadata for hidden prop
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php6
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';
});
/**