From efdb4c726f74c7f01a3e1246bbf8c270ce0dd183 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Tue, 7 Mar 2023 19:12:43 -0800 Subject: [PATCH] exif-edit: do not query tags --- lib/Controller/ImageController.php | 5 +++-- src/components/Metadata.vue | 8 +------- src/global.scss | 11 +++++++++++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/Controller/ImageController.php b/lib/Controller/ImageController.php index 87a6453e..b1c084e1 100644 --- a/lib/Controller/ImageController.php +++ b/lib/Controller/ImageController.php @@ -182,7 +182,8 @@ class ImageController extends ApiBase public function info( string $id, bool $basic = false, - bool $current = false + bool $current = false, + bool $tags = false ): JSONResponse { $file = $this->getUserFile((int) $id); if (!$file) { @@ -193,7 +194,7 @@ class ImageController extends ApiBase $info = $this->timelineQuery->getInfoById($file->getId(), $basic); // Get list of tags for this file - if (!$basic) { + if ($tags) { $info['tags'] = $this->getTags($file->getId()); } diff --git a/src/components/Metadata.vue b/src/components/Metadata.vue index a223d111..0349e03c 100644 --- a/src/components/Metadata.vue +++ b/src/components/Metadata.vue @@ -302,7 +302,7 @@ export default defineComponent({ this.exif = {}; const state = this.state; - const url = API.IMAGE_INFO(fileInfo.id); + const url = API.Q(API.IMAGE_INFO(fileInfo.id), "tags=1"); const res = await axios.get(url); if (state !== this.state) return; @@ -321,12 +321,6 @@ export default defineComponent({