From fd882e6a789d61b68e3a30215bd362fbf132aa3a Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Sun, 12 Jan 2025 01:23:14 +0000 Subject: [PATCH 01/14] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- translationfiles/templates/maps.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translationfiles/templates/maps.pot b/translationfiles/templates/maps.pot index 173817d17..d47a5c6ed 100644 --- a/translationfiles/templates/maps.pot +++ b/translationfiles/templates/maps.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Nextcloud 3.14159\n" "Report-Msgid-Bugs-To: translations\\@example.com\n" -"POT-Creation-Date: 2025-01-11 01:18+0000\n" +"POT-Creation-Date: 2025-01-12 01:22+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From 2f56974a17db2176cf90640a178e60510c823c88 Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Mon, 13 Jan 2025 01:19:21 +0000 Subject: [PATCH 02/14] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- translationfiles/templates/maps.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translationfiles/templates/maps.pot b/translationfiles/templates/maps.pot index d47a5c6ed..caddb87e8 100644 --- a/translationfiles/templates/maps.pot +++ b/translationfiles/templates/maps.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Nextcloud 3.14159\n" "Report-Msgid-Bugs-To: translations\\@example.com\n" -"POT-Creation-Date: 2025-01-12 01:22+0000\n" +"POT-Creation-Date: 2025-01-13 01:18+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From ce1ba78b50d52ee0ebceaef5f4a3ead589bce6eb Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Wed, 15 Jan 2025 01:20:07 +0000 Subject: [PATCH 03/14] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- translationfiles/templates/maps.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translationfiles/templates/maps.pot b/translationfiles/templates/maps.pot index caddb87e8..915ae055c 100644 --- a/translationfiles/templates/maps.pot +++ b/translationfiles/templates/maps.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Nextcloud 3.14159\n" "Report-Msgid-Bugs-To: translations\\@example.com\n" -"POT-Creation-Date: 2025-01-13 01:18+0000\n" +"POT-Creation-Date: 2025-01-15 01:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From 58832cb0cdf7e1ca8ddae661157b1634ae39d691 Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Thu, 16 Jan 2025 01:19:37 +0000 Subject: [PATCH 04/14] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- translationfiles/templates/maps.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translationfiles/templates/maps.pot b/translationfiles/templates/maps.pot index 915ae055c..693cddcb9 100644 --- a/translationfiles/templates/maps.pot +++ b/translationfiles/templates/maps.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Nextcloud 3.14159\n" "Report-Msgid-Bugs-To: translations\\@example.com\n" -"POT-Creation-Date: 2025-01-15 01:19+0000\n" +"POT-Creation-Date: 2025-01-16 01:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From c777ef27a71ade7eaacb8e814fe0a85d1e7493f4 Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Fri, 17 Jan 2025 01:19:34 +0000 Subject: [PATCH 05/14] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- translationfiles/templates/maps.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translationfiles/templates/maps.pot b/translationfiles/templates/maps.pot index 693cddcb9..82d248fba 100644 --- a/translationfiles/templates/maps.pot +++ b/translationfiles/templates/maps.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Nextcloud 3.14159\n" "Report-Msgid-Bugs-To: translations\\@example.com\n" -"POT-Creation-Date: 2025-01-16 01:19+0000\n" +"POT-Creation-Date: 2025-01-17 01:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From 983a42140eafe92562c57c486063d1494f21b184 Mon Sep 17 00:00:00 2001 From: umgfoin Date: Wed, 8 Jan 2025 14:48:08 +0100 Subject: [PATCH 06/14] Update GeophotoService.php: Remove FileCache-usage Remove FileCache-usage in GeophotoService::getAll and GeophotoService::getNonLocalized Signed-off-by: umgfoin --- lib/Service/GeophotoService.php | 195 +++++++++++++++----------------- 1 file changed, 94 insertions(+), 101 deletions(-) diff --git a/lib/Service/GeophotoService.php b/lib/Service/GeophotoService.php index 10207cfe6..935b27702 100644 --- a/lib/Service/GeophotoService.php +++ b/lib/Service/GeophotoService.php @@ -106,56 +106,53 @@ public function getAll(string $userId, $folder = null, bool $respectNomediaAndNo $photoEntities = $this->photoMapper->findAll($userId); $filesById = []; - $cache = $folder->getStorage()->getCache(); $previewEnableMimetypes = $this->getPreviewEnabledMimetypes(); foreach ($photoEntities as $photoEntity) { - $cacheEntry = $cache->get($photoEntity->getFileId()); - if ($cacheEntry) { - // this path is relative to owner's storage - //$path = $cacheEntry->getPath(); - //but we want it relative to current user's storage - $files = $folder->getById($photoEntity->getFileId()); - if (empty($files)) { - continue; - } - $file = array_shift($files); - if ($file === null) { - continue; - } - $path = $userFolder->getRelativePath($file->getPath()); - $isIgnored = false; - foreach ($ignoredPaths as $ignoredPath) { - if (str_starts_with($path, $ignoredPath)) { - $isIgnored = true; - break; - } + // this path is relative to owner's storage + //$path = $cacheEntry->getPath(); + //but we want it relative to current user's storage + $files = $folder->getById($photoEntity->getFileId()); + if (empty($files)) { + continue; + } + $file = array_shift($files); + + if ($file === null) { + continue; + } + $path = $userFolder->getRelativePath($file->getPath()); + $isIgnored = false; + foreach ($ignoredPaths as $ignoredPath) { + if (str_starts_with($path, $ignoredPath)) { + $isIgnored = true; + break; } - if (!$isIgnored) { - $isRoot = $file === $userFolder; + } + if (!$isIgnored) { + $isRoot = $file === $userFolder; - $file_object = new \stdClass(); - $file_object->fileId = $photoEntity->getFileId(); - $file_object->fileid = $file_object->fileId; - $file_object->lat = $photoEntity->getLat(); - $file_object->lng = $photoEntity->getLng(); - $file_object->dateTaken = $photoEntity->getDateTaken() ?? \time(); - $file_object->basename = $isRoot ? '' : $file->getName(); - $file_object->filename = $this->normalizePath($path); - $file_object->etag = $cacheEntry->getEtag(); - //Not working for NC21 as Viewer requires String representation of permissions - // $file_object->permissions = $file->getPermissions(); - $file_object->type = $file->getType(); - $file_object->mime = $file->getMimetype(); - $file_object->lastmod = $file->getMTime(); - $file_object->size = $file->getSize(); - $file_object->path = $path; - $file_object->isReadable = $file->isReadable(); - $file_object->isUpdateable = $file->isUpdateable(); - $file_object->isShareable = $file->isShareable(); - $file_object->isDeletable = $file->isDeletable(); - $file_object->hasPreview = in_array($cacheEntry->getMimeType(), $previewEnableMimetypes); - $filesById[] = $file_object; - } + $file_object = new \stdClass(); + $file_object->fileId = $photoEntity->getFileId(); + $file_object->fileid = $file_object->fileId; + $file_object->lat = $photoEntity->getLat(); + $file_object->lng = $photoEntity->getLng(); + $file_object->dateTaken = $photoEntity->getDateTaken() ?? \time(); + $file_object->basename = $isRoot ? '' : $file->getName(); + $file_object->filename = $this->normalizePath($path); + $file_object->etag = $file->getEtag(); + //Not working for NC21 as Viewer requires String representation of permissions + // $file_object->permissions = $file->getPermissions(); + $file_object->type = $file->getType(); + $file_object->mime = $file->getMimetype(); + $file_object->lastmod = $file->getMTime(); + $file_object->size = $file->getSize(); + $file_object->path = $path; + $file_object->isReadable = $file->isReadable(); + $file_object->isUpdateable = $file->isUpdateable(); + $file_object->isShareable = $file->isShareable(); + $file_object->isDeletable = $file->isDeletable(); + $file_object->hasPreview = in_array($file_object->mime, $previewEnableMimetypes); + $filesById[] = $file_object; } } $this->photosCache->set($key, $filesById, 60 * 60 * 24); @@ -199,65 +196,61 @@ public function getNonLocalized(string $userId, $folder = null, bool $respectNom $tz = new \DateTimeZone(\date_default_timezone_get()); } foreach ($photoEntities as $photoEntity) { - $cacheEntry = $cache->get($photoEntity->getFileId()); - if ($cacheEntry) { - // this path is relative to owner's storage - //$path = $cacheEntry->getPath(); - // but we want it relative to current user's storage - $files = $folder->getById($photoEntity->getFileId()); - if (empty($files)) { - continue; - } - $file = array_shift($files); - if ($file === null) { - continue; - } - $path = $userFolder->getRelativePath($file->getPath()); - $isIgnored = false; - foreach ($ignoredPaths as $ignoredPath) { - if (str_starts_with($path, $ignoredPath)) { - $isIgnored = true; - break; - } + // this path is relative to owner's storage + //$path = $cacheEntry->getPath(); + // but we want it relative to current user's storage + $files = $folder->getById($photoEntity->getFileId()); + if (empty($files)) { + continue; + } + $file = array_shift($files); + if ($file === null) { + continue; + } + $path = $userFolder->getRelativePath($file->getPath()); + $isIgnored = false; + foreach ($ignoredPaths as $ignoredPath) { + if (str_starts_with($path, $ignoredPath)) { + $isIgnored = true; + break; } - if (!$isIgnored) { - $isRoot = $file === $userFolder; + } + if (!$isIgnored) { + $isRoot = $file === $userFolder; - //Unfortunately Exif stores the local and not the UTC time. There is no way to get the timezone, therefore it has to be given by the user. - $date = $photoEntity->getDateTaken() ?? \time(); + //Unfortunately Exif stores the local and not the UTC time. There is no way to get the timezone, therefore it has to be given by the user. + $date = $photoEntity->getDateTaken() ?? \time(); - $dateWithTimezone = new \DateTime(gmdate('Y-m-d H:i:s', $date), $tz); - $locations = $this->getLocationGuesses($dateWithTimezone->getTimestamp()); - foreach ($locations as $key => $location) { - $file_object = new \stdClass(); - $file_object->fileId = $photoEntity->getFileId(); - $file_object->fileid = $file_object->fileId; - $file_object->path = $this->normalizePath($path); - $file_object->hasPreview = in_array($cacheEntry->getMimeType(), $previewEnableMimetypes); - $file_object->lat = $location[0]; - $file_object->lng = $location[1]; - $file_object->dateTaken = $date; - $file_object->basename = $isRoot ? '' : $file->getName(); - $file_object->filename = $this->normalizePath($path); - $file_object->etag = $cacheEntry->getEtag(); - //Not working for NC21 as Viewer requires String representation of permissions - // $file_object->permissions = $file->getPermissions(); - $file_object->type = $file->getType(); - $file_object->mime = $file->getMimetype(); - $file_object->lastmod = $file->getMTime(); - $file_object->size = $file->getSize(); - $file_object->path = $path; - $file_object->isReadable = $file->isReadable(); - $file_object->isUpdateable = $file->isUpdateable(); - $file_object->isShareable = $file->isShareable(); - $file_object->isDeletable = $file->isDeletable(); - $file_object->hasPreview = in_array($cacheEntry->getMimeType(), $previewEnableMimetypes); - $file_object->trackOrDeviceId = $key; - if (!array_key_exists($key, $suggestionsBySource)) { - $suggestionsBySource[$key] = []; - } - $suggestionsBySource[$key][] = $file_object; + $dateWithTimezone = new \DateTime(gmdate('Y-m-d H:i:s', $date), $tz); + $locations = $this->getLocationGuesses($dateWithTimezone->getTimestamp()); + foreach ($locations as $key => $location) { + $file_object = new \stdClass(); + $file_object->fileId = $photoEntity->getFileId(); + $file_object->fileid = $file_object->fileId; + $file_object->path = $this->normalizePath($path); + $file_object->mime = $file->getMimetype(); + $file_object->hasPreview = in_array($file_object->mime, $previewEnableMimetypes); + $file_object->lat = $location[0]; + $file_object->lng = $location[1]; + $file_object->dateTaken = $date; + $file_object->basename = $isRoot ? '' : $file->getName(); + $file_object->filename = $this->normalizePath($path); + $file_object->etag = $file->getEtag(); + //Not working for NC21 as Viewer requires String representation of permissions + // $file_object->permissions = $file->getPermissions(); + $file_object->type = $file->getType(); + $file_object->lastmod = $file->getMTime(); + $file_object->size = $file->getSize(); + $file_object->path = $path; + $file_object->isReadable = $file->isReadable(); + $file_object->isUpdateable = $file->isUpdateable(); + $file_object->isShareable = $file->isShareable(); + $file_object->isDeletable = $file->isDeletable(); + $file_object->trackOrDeviceId = $key; + if (!array_key_exists($key, $suggestionsBySource)) { + $suggestionsBySource[$key] = []; } + $suggestionsBySource[$key][] = $file_object; } } } From f17bea2a08ff6870ef4d9eb526507b01ab13d1f9 Mon Sep 17 00:00:00 2001 From: umgfoin Date: Thu, 9 Jan 2025 17:39:33 +0100 Subject: [PATCH 07/14] Inject LoggerInterface Signed-off-by: umgfoin --- lib/Service/GeophotoService.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Service/GeophotoService.php b/lib/Service/GeophotoService.php index 935b27702..1e7a08398 100644 --- a/lib/Service/GeophotoService.php +++ b/lib/Service/GeophotoService.php @@ -28,6 +28,7 @@ use OCP\ICacheFactory; use OCP\IL10N; use OCP\IPreview; +use Psr\Log\LoggerInterface; class GeophotoService { @@ -45,6 +46,7 @@ class GeophotoService { private \OCP\ICache $backgroundJobCache; public function __construct( + private LoggerInterface $logger, IRootFolder $root, IL10N $l10n, GeophotoMapper $photoMapper, From 6d837128e92b9103b0bec03c6fb13be1ed5d5a6a Mon Sep 17 00:00:00 2001 From: umgfoin Date: Thu, 9 Jan 2025 17:42:34 +0100 Subject: [PATCH 08/14] getTracksFromGPX($content): silence libxml internal errors Signed-off-by: umgfoin --- lib/Service/GeophotoService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Service/GeophotoService.php b/lib/Service/GeophotoService.php index 1e7a08398..2075539f7 100644 --- a/lib/Service/GeophotoService.php +++ b/lib/Service/GeophotoService.php @@ -352,6 +352,7 @@ private function loadTimeorderedPointSets(string $userId, $folder = null, bool $ */ private function getTracksFromGPX($content): array { $tracks = []; + libxml_use_internal_errors(false); $gpx = simplexml_load_string($content); foreach ($gpx->trk as $trk) { $tracks[] = $trk; From 90689ccf1f80af4260b991c2380e30662293ea11 Mon Sep 17 00:00:00 2001 From: umgfoin Date: Fri, 10 Jan 2025 10:10:15 +0100 Subject: [PATCH 09/14] Update CHANGELOG.md Signed-off-by: umgfoin --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3d88dbc1..e9a1849b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## 1.6.0 - 2024.12.31 Scan photos of specific directory +## 1.6.0 - 2025.01.10 Georeferenced photos from external folders not shown on map +### Added - Scan photos of specific directory [#1231](https://github.com/nextcloud/maps/pull/1231) @tetebueno + +### Fixed +- Georeferenced photos from external folders not shown on map + [#1371](https://github.com/nextcloud/maps/issues/1371) @umgfoin ## 1.5.0 - 2024.11.16 Nextcloud Hub 9 From c56295c6646e553b0b9260f1f66acb1988785c8b Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Sat, 18 Jan 2025 01:19:52 +0000 Subject: [PATCH 10/14] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- l10n/lt_LT.js | 4 ++-- l10n/lt_LT.json | 4 ++-- l10n/pt_PT.js | 3 ++- l10n/pt_PT.json | 3 ++- translationfiles/templates/maps.pot | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/l10n/lt_LT.js b/l10n/lt_LT.js index 2a9a14cd7..e6905a6e9 100644 --- a/l10n/lt_LT.js +++ b/l10n/lt_LT.js @@ -23,9 +23,9 @@ OC.L10N.register( "Category name" : "Kategorijos pavadinimas", "Rename" : "Pervadinti", "Add a favorite" : "Pridėti mėgstamą", - "Delete share link" : "Ištrinti bendrinimo nuorodą", + "Delete share link" : "Ištrinti viešinio nuorodą", "Copied!" : "Nukopijuota!", - "Copy share link" : "Kopijuoti bendrinimo nuorodą", + "Copy share link" : "Kopijuoti viešinio nuorodą", "Cancel" : "Atsisakyti", "Link copied" : "Nuoroda nukopijuota", "Link could not be copied to clipboard." : "Nepavyko nukopijuoti nuorodos į iškarpinę.", diff --git a/l10n/lt_LT.json b/l10n/lt_LT.json index 66a911ec4..8d492505a 100644 --- a/l10n/lt_LT.json +++ b/l10n/lt_LT.json @@ -21,9 +21,9 @@ "Category name" : "Kategorijos pavadinimas", "Rename" : "Pervadinti", "Add a favorite" : "Pridėti mėgstamą", - "Delete share link" : "Ištrinti bendrinimo nuorodą", + "Delete share link" : "Ištrinti viešinio nuorodą", "Copied!" : "Nukopijuota!", - "Copy share link" : "Kopijuoti bendrinimo nuorodą", + "Copy share link" : "Kopijuoti viešinio nuorodą", "Cancel" : "Atsisakyti", "Link copied" : "Nuoroda nukopijuota", "Link could not be copied to clipboard." : "Nepavyko nukopijuoti nuorodos į iškarpinę.", diff --git a/l10n/pt_PT.js b/l10n/pt_PT.js index 06f79c514..e974c0045 100644 --- a/l10n/pt_PT.js +++ b/l10n/pt_PT.js @@ -52,6 +52,7 @@ OC.L10N.register( "Not grouped" : "Não agrupados", "Default" : "Predefinido", "Failed to save settings" : "Erro ao gravar as definições", - "Metadata" : "Metadados" + "Metadata" : "Metadados", + "Bar" : "Barra" }, "nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); diff --git a/l10n/pt_PT.json b/l10n/pt_PT.json index 34df7bc90..cb8337a57 100644 --- a/l10n/pt_PT.json +++ b/l10n/pt_PT.json @@ -50,6 +50,7 @@ "Not grouped" : "Não agrupados", "Default" : "Predefinido", "Failed to save settings" : "Erro ao gravar as definições", - "Metadata" : "Metadados" + "Metadata" : "Metadados", + "Bar" : "Barra" },"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" } \ No newline at end of file diff --git a/translationfiles/templates/maps.pot b/translationfiles/templates/maps.pot index 82d248fba..925460f8f 100644 --- a/translationfiles/templates/maps.pot +++ b/translationfiles/templates/maps.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Nextcloud 3.14159\n" "Report-Msgid-Bugs-To: translations\\@example.com\n" -"POT-Creation-Date: 2025-01-17 01:19+0000\n" +"POT-Creation-Date: 2025-01-18 01:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From a0cfc6b5c4ed82c6c820ae3efb2a9ba8b136d8d2 Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Sun, 19 Jan 2025 01:19:58 +0000 Subject: [PATCH 11/14] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- translationfiles/templates/maps.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translationfiles/templates/maps.pot b/translationfiles/templates/maps.pot index 925460f8f..7418366d0 100644 --- a/translationfiles/templates/maps.pot +++ b/translationfiles/templates/maps.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Nextcloud 3.14159\n" "Report-Msgid-Bugs-To: translations\\@example.com\n" -"POT-Creation-Date: 2025-01-18 01:19+0000\n" +"POT-Creation-Date: 2025-01-19 01:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From 070988729faaf9e9a0ab4e132b32f03ee5dcc9db Mon Sep 17 00:00:00 2001 From: umgfoin Date: Thu, 16 Jan 2025 15:54:41 +0100 Subject: [PATCH 12/14] Fix wrong failure-msg when clearing photo-cache. bool GeophotoService::clearCache returns false, if any of the cleared caches was already empty. Accordingly a failure-msg is shown in the maps-GUI. This change makes the function always return true unless an exception occurred - then false is returned. Signed-off-by: umgfoin --- lib/Service/GeophotoService.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/Service/GeophotoService.php b/lib/Service/GeophotoService.php index 2075539f7..1d88d9062 100644 --- a/lib/Service/GeophotoService.php +++ b/lib/Service/GeophotoService.php @@ -74,11 +74,16 @@ public function __construct( * @return bool */ public function clearCache(string $userId = ''): bool { - $a = $this->photosCache->clear($userId); - $b = $this->timeOrderedPointSetsCache->clear($userId); - $c = $this->backgroundJobCache->clear('recentlyAdded:'.$userId); - $d = $this->backgroundJobCache->clear('recentlyUpdated:'.$userId); - return $a and $b and $c and $d; + try { + $this->photosCache->clear($userId); + $this->timeOrderedPointSetsCache->clear($userId); + $this->backgroundJobCache->clear('recentlyAdded:'.$userId); + $this->backgroundJobCache->clear('recentlyUpdated:'.$userId); + return true; + + } catch (\Exception $e) { + return false; + } } /** From 79bd524cfed2ae99f94ca91838f5b445e0d4b0c1 Mon Sep 17 00:00:00 2001 From: umgfoin Date: Fri, 17 Jan 2025 09:38:35 +0100 Subject: [PATCH 13/14] Update CHANGELOG.md Signed-off-by: umgfoin --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9a1849b6..808df6b4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## 1.6.0 - 2025.01.10 Georeferenced photos from external folders not shown on map +## 1.6.0 - [unreleased] ### Added - Scan photos of specific directory [#1231](https://github.com/nextcloud/maps/pull/1231) @tetebueno ### Fixed - Georeferenced photos from external folders not shown on map [#1371](https://github.com/nextcloud/maps/issues/1371) @umgfoin +- Fix wrong failure-msg. when clearing photo-cache + [#1375](https://github.com/nextcloud/maps/pull/1375) @umgfoin ## 1.5.0 - 2024.11.16 Nextcloud Hub 9 From 2a1a1ea043f39bca51376901500fdeba7de0faaf Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Mon, 20 Jan 2025 01:17:39 +0000 Subject: [PATCH 14/14] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- translationfiles/templates/maps.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translationfiles/templates/maps.pot b/translationfiles/templates/maps.pot index 7418366d0..8204ee2cc 100644 --- a/translationfiles/templates/maps.pot +++ b/translationfiles/templates/maps.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Nextcloud 3.14159\n" "Report-Msgid-Bugs-To: translations\\@example.com\n" -"POT-Creation-Date: 2025-01-19 01:19+0000\n" +"POT-Creation-Date: 2025-01-20 01:17+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"