diff options
author | Louis Chemineau <louis@chmn.me> | 2023-11-08 14:52:50 +0100 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2023-11-09 22:39:52 +0100 |
commit | 1c84139fa6d2803d7b555dbedfda8bba8067a5ed (patch) | |
tree | cd856ad1fe482dfe56ecf7a2dfe6b680d3eeff1b /apps/files/src/services | |
parent | 397c96967a39b18354ce87a0c81964d3abc7cdc1 (diff) | |
download | nextcloud-server-1c84139fa6d2803d7b555dbedfda8bba8067a5ed.tar.gz nextcloud-server-1c84139fa6d2803d7b555dbedfda8bba8067a5ed.zip |
Hide .mov for live photos
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps/files/src/services')
-rw-r--r-- | apps/files/src/services/LivePhotos.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/apps/files/src/services/LivePhotos.ts b/apps/files/src/services/LivePhotos.ts new file mode 100644 index 00000000000..df6c9decd4a --- /dev/null +++ b/apps/files/src/services/LivePhotos.ts @@ -0,0 +1,33 @@ +/** + * @copyright Copyright (c) 2023 Louis Chmn <louis@chmn.me> + * + * @author Louis Chmn <louis@chmn.me> + * + * @license AGPL-3.0-or-later + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +import { Node, registerDavProperty } from '@nextcloud/files' + +export function initLivePhotos(): void { + registerDavProperty('nc:metadata-files-live-photo', { nc: 'http://nextcloud.org/ns' }) +} + +/** + * @param {Node} node - The node + */ +export function isLivePhoto(node: Node): boolean { + return node.attributes['metadata-files-live-photo'] !== null +} |