diff --git a/frontend/src/locales/af.po b/frontend/src/locales/af.po index 1e54601ff..dfbc0812d 100644 --- a/frontend/src/locales/af.po +++ b/frontend/src/locales/af.po @@ -669,7 +669,7 @@ msgid "Delete" msgstr "Vee uit" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/ar.po b/frontend/src/locales/ar.po index 40ba3c65d..6b7eed309 100644 --- a/frontend/src/locales/ar.po +++ b/frontend/src/locales/ar.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "حذف" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/be.po b/frontend/src/locales/be.po index ab7eb97b0..b9d2a3c3d 100644 --- a/frontend/src/locales/be.po +++ b/frontend/src/locales/be.po @@ -669,7 +669,7 @@ msgid "Delete" msgstr "Выдаліць" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/bg.po b/frontend/src/locales/bg.po index 1f85949c9..92e956e33 100644 --- a/frontend/src/locales/bg.po +++ b/frontend/src/locales/bg.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Изтриване на" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/ca.po b/frontend/src/locales/ca.po index 5cb534807..98c4d4870 100644 --- a/frontend/src/locales/ca.po +++ b/frontend/src/locales/ca.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Esborrar" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/cs.po b/frontend/src/locales/cs.po index 51d55e140..a2b213048 100644 --- a/frontend/src/locales/cs.po +++ b/frontend/src/locales/cs.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Vymazat" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/da.po b/frontend/src/locales/da.po index d551f7507..88aedf04a 100644 --- a/frontend/src/locales/da.po +++ b/frontend/src/locales/da.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Slet" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/de.po b/frontend/src/locales/de.po index e11de7095..87f70d320 100644 --- a/frontend/src/locales/de.po +++ b/frontend/src/locales/de.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Löschen" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/el.po b/frontend/src/locales/el.po index 81c784677..e548378ab 100644 --- a/frontend/src/locales/el.po +++ b/frontend/src/locales/el.po @@ -669,7 +669,7 @@ msgid "Delete" msgstr "Διαγραφή" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/en.po b/frontend/src/locales/en.po index 3332c59fd..03fd12937 100644 --- a/frontend/src/locales/en.po +++ b/frontend/src/locales/en.po @@ -671,7 +671,7 @@ msgid "Delete" msgstr "" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/es.po b/frontend/src/locales/es.po index 1f2eb9b87..c87c46a2b 100644 --- a/frontend/src/locales/es.po +++ b/frontend/src/locales/es.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Borrar" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/et.po b/frontend/src/locales/et.po index 00780e3d8..c4a449a23 100644 --- a/frontend/src/locales/et.po +++ b/frontend/src/locales/et.po @@ -669,7 +669,7 @@ msgid "Delete" msgstr "Kustuta" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/eu.po b/frontend/src/locales/eu.po index 544d27d83..69023edc2 100644 --- a/frontend/src/locales/eu.po +++ b/frontend/src/locales/eu.po @@ -669,7 +669,7 @@ msgid "Delete" msgstr "Ezabatu" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/fa.po b/frontend/src/locales/fa.po index e344c63e7..59975f91f 100644 --- a/frontend/src/locales/fa.po +++ b/frontend/src/locales/fa.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "حذف" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/fi.po b/frontend/src/locales/fi.po index b797e94ef..04c790276 100644 --- a/frontend/src/locales/fi.po +++ b/frontend/src/locales/fi.po @@ -669,7 +669,7 @@ msgid "Delete" msgstr "Poista" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/fr.po b/frontend/src/locales/fr.po index db509d1a1..5f00155a7 100644 --- a/frontend/src/locales/fr.po +++ b/frontend/src/locales/fr.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Supprimer" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/he.po b/frontend/src/locales/he.po index 1e063f6af..7496ec116 100644 --- a/frontend/src/locales/he.po +++ b/frontend/src/locales/he.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "מחק" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/hi.po b/frontend/src/locales/hi.po index 825a55f59..2308a56a5 100644 --- a/frontend/src/locales/hi.po +++ b/frontend/src/locales/hi.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "हटाएं" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/hr.po b/frontend/src/locales/hr.po index f3ed41aef..34368fe0b 100644 --- a/frontend/src/locales/hr.po +++ b/frontend/src/locales/hr.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Izbriši" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/hu.po b/frontend/src/locales/hu.po index 8f84ce1bd..1ffda7337 100644 --- a/frontend/src/locales/hu.po +++ b/frontend/src/locales/hu.po @@ -671,7 +671,7 @@ msgid "Delete" msgstr "Törlés" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/id.po b/frontend/src/locales/id.po index 31624e6bd..ede18dc9f 100644 --- a/frontend/src/locales/id.po +++ b/frontend/src/locales/id.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Hapus" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/it.po b/frontend/src/locales/it.po index 2cbdf6f34..6748129bd 100644 --- a/frontend/src/locales/it.po +++ b/frontend/src/locales/it.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Elimina" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/ja.po b/frontend/src/locales/ja.po index fc9febd25..791d1b211 100644 --- a/frontend/src/locales/ja.po +++ b/frontend/src/locales/ja.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "削除" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/ko.po b/frontend/src/locales/ko.po index ab092a24c..afad6779b 100644 --- a/frontend/src/locales/ko.po +++ b/frontend/src/locales/ko.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "삭제" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/ku.po b/frontend/src/locales/ku.po index 8b90240d4..8ae63ce6e 100644 --- a/frontend/src/locales/ku.po +++ b/frontend/src/locales/ku.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "سڕینەوە" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/lt.po b/frontend/src/locales/lt.po index 0d0b603f3..a511543c0 100644 --- a/frontend/src/locales/lt.po +++ b/frontend/src/locales/lt.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Ištrinti" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/ms.po b/frontend/src/locales/ms.po index aa40e8056..3b4951df2 100644 --- a/frontend/src/locales/ms.po +++ b/frontend/src/locales/ms.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Padam" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/nb.po b/frontend/src/locales/nb.po index 20c86bb7b..af1c04238 100644 --- a/frontend/src/locales/nb.po +++ b/frontend/src/locales/nb.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Slett" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/nl.po b/frontend/src/locales/nl.po index 409ca40c7..65606f876 100644 --- a/frontend/src/locales/nl.po +++ b/frontend/src/locales/nl.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Verwijder" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/pl.po b/frontend/src/locales/pl.po index b75bbd369..a0f07133a 100644 --- a/frontend/src/locales/pl.po +++ b/frontend/src/locales/pl.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Usuń" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/pt.po b/frontend/src/locales/pt.po index 1fd293056..60a051fd7 100644 --- a/frontend/src/locales/pt.po +++ b/frontend/src/locales/pt.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Apagar" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/pt_BR.po b/frontend/src/locales/pt_BR.po index 283480cb0..1e722d712 100644 --- a/frontend/src/locales/pt_BR.po +++ b/frontend/src/locales/pt_BR.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Excluir" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/ro.po b/frontend/src/locales/ro.po index 6db92e5c5..4087ef3cc 100644 --- a/frontend/src/locales/ro.po +++ b/frontend/src/locales/ro.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Ștergeți" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/ru.po b/frontend/src/locales/ru.po index 70f17c2fa..32eee9079 100644 --- a/frontend/src/locales/ru.po +++ b/frontend/src/locales/ru.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Удалить" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/sk.po b/frontend/src/locales/sk.po index 0355445de..02b87585a 100644 --- a/frontend/src/locales/sk.po +++ b/frontend/src/locales/sk.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Vymazať" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/sl.po b/frontend/src/locales/sl.po index bc99c53cb..a51124c82 100644 --- a/frontend/src/locales/sl.po +++ b/frontend/src/locales/sl.po @@ -669,7 +669,7 @@ msgid "Delete" msgstr "Izbriši" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/sv.po b/frontend/src/locales/sv.po index cdf950eaa..f3bc37918 100644 --- a/frontend/src/locales/sv.po +++ b/frontend/src/locales/sv.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Radera" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/th.po b/frontend/src/locales/th.po index 5f8ce12c3..58b880713 100644 --- a/frontend/src/locales/th.po +++ b/frontend/src/locales/th.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "ลบ" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/tr.po b/frontend/src/locales/tr.po index 779b14ccd..c2fd9e220 100644 --- a/frontend/src/locales/tr.po +++ b/frontend/src/locales/tr.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Sil" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/translations.pot b/frontend/src/locales/translations.pot index ad38b35f1..3e4cb6992 100644 --- a/frontend/src/locales/translations.pot +++ b/frontend/src/locales/translations.pot @@ -788,7 +788,7 @@ msgid "Delete" msgstr "" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 diff --git a/frontend/src/locales/uk.po b/frontend/src/locales/uk.po index 630525e6e..25e3b9030 100644 --- a/frontend/src/locales/uk.po +++ b/frontend/src/locales/uk.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "Видалити" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/zh.po b/frontend/src/locales/zh.po index d2fe292c5..87035a04d 100644 --- a/frontend/src/locales/zh.po +++ b/frontend/src/locales/zh.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "删除" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/locales/zh_TW.po b/frontend/src/locales/zh_TW.po index 2b8d72b04..995edd46b 100644 --- a/frontend/src/locales/zh_TW.po +++ b/frontend/src/locales/zh_TW.po @@ -672,7 +672,7 @@ msgid "Delete" msgstr "刪除" #: src/page/library/index.vue:141 -msgid "Delete orphaned index entries, cache files and thumbnails." +msgid "Delete orphaned index entries, sidecar files and thumbnails." msgstr "" #: src/component/photo/cards.vue:459 src/dialog/album/edit.vue:148 diff --git a/frontend/src/page/library/index.vue b/frontend/src/page/library/index.vue index 9b2f6f303..a6cc4bb0e 100644 --- a/frontend/src/page/library/index.vue +++ b/frontend/src/page/library/index.vue @@ -11,18 +11,18 @@

@@ -32,53 +32,65 @@

- + + + + + Cancel Start update - The index currently contains %{n} hidden files. + The index currently contains %{n} hidden files. Their format may not be supported, they haven't been converted to JPEG yet or there are duplicates. @@ -105,6 +117,7 @@ export default { settings: new Settings(this.$config.settings()), readonly: this.$config.get("readonly"), config: this.$config.values, + isAdmin: this.$session.isAdmin(), started: false, busy: false, loading: false, @@ -112,6 +125,7 @@ export default { subscriptionId: "", action: "", fileName: "", + cleanup: false, source: null, root: root, dirs: [root], @@ -189,7 +203,15 @@ export default { const ctx = this; Notify.blockUI(); - Api.post('index', this.settings.index, {cancelToken: this.source.token}).then(function () { + // Request parameters. + const params = { + path: this.settings.index.path, + rescan: this.settings.index.rescan, + cleanup: this.cleanup, + }; + + // Submit POST request. + Api.post('index', params, {cancelToken: this.source.token}).then(function () { Notify.unblockUI(); ctx.busy = false; ctx.completed = 100; @@ -198,7 +220,7 @@ export default { Notify.unblockUI(); if (Axios.isCancel(e)) { - // run in background + // Run in background. return; } @@ -240,6 +262,8 @@ export default { this.action = this.$gettext("Updating faces"); } else if (data.step === "previews") { this.action = this.$gettext("Updating previews"); + } else if (data.step === "cleanup") { + this.action = this.$gettext("Cleaning index and cache"); } else { this.action = this.$gettext("Updating index"); } diff --git a/internal/api/index.go b/internal/api/index.go index 10e8f33f6..0a347552e 100644 --- a/internal/api/index.go +++ b/internal/api/index.go @@ -65,7 +65,7 @@ func StartIndexing(router *gin.RouterGroup) { lastRun, lastFound := ind.LastRun() indexStart := time.Now() - // Start indexing. + // Update file index. found, indexed := ind.Start(indOpt) // Only run purge and moments if necessary. @@ -90,17 +90,18 @@ func StartIndexing(router *gin.RouterGroup) { "step": "purge", }) - // Configure purge options. - prgOpt := photoprism.PurgeOptions{ + // Get purge worker instance. + w := get.Purge() + + // Purge worker options. + opt := photoprism.PurgeOptions{ Path: filepath.Clean(f.Path), Ignore: found, Force: forceUpdate, } - // Start purging. - prg := get.Purge() - - if files, photos, updated, err := prg.Start(prgOpt); err != nil { + // Start purge to remove missing files from search results. + if files, photos, updated, err := w.Start(opt); err != nil { c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"error": txt.UpperFirst(err.Error())}) return } else if updated > 0 { @@ -109,6 +110,31 @@ func StartIndexing(router *gin.RouterGroup) { } } + // Delete orphaned index entries, sidecar files and thumbnails? + if f.Cleanup && s.User().IsAdmin() { + event.Publish("index.updating", event.Data{ + "uid": indOpt.UID, + "action": indOpt.Action, + "step": "cleanup", + }) + + // Get cleanup worker instance. + w := get.CleanUp() + + // Cleanup worker options. + opt := photoprism.CleanUpOptions{ + Dry: false, + } + + // Start index and cache cleanup. + cleanupStart := time.Now() + if thumbnails, _, sidecars, err := w.Start(opt); err != nil { + log.Errorf("cleanup: %s", err) + } else if total := thumbnails + sidecars; total > 0 { + log.Infof("cleanup: deleted %s in total [%s]", english.Plural(total, "file", "files"), time.Since(cleanupStart)) + } + } + // Update moments? if forceUpdate { event.Publish("index.updating", event.Data{ diff --git a/internal/commands/index.go b/internal/commands/index.go index 76b043360..e504a99a8 100644 --- a/internal/commands/index.go +++ b/internal/commands/index.go @@ -71,6 +71,7 @@ func indexAction(ctx *cli.Context) error { var found fs.Done var indexed int + // Update file index. if w := get.Index(); w != nil { indexStart := time.Now() convert := conf.Settings().Index.Convert && conf.SidecarWritable() @@ -81,14 +82,17 @@ func indexAction(ctx *cli.Context) error { log.Infof("index: updated %s [%s]", english.Plural(indexed, "file", "files"), time.Since(indexStart)) } + // Remove missing files from search results. if w := get.Purge(); w != nil { - purgeStart := time.Now() + // Purge worker options. opt := photoprism.PurgeOptions{ Path: subPath, Ignore: found, Force: ctx.Bool("force") || ctx.Bool("cleanup") || indexed > 0, } + // Start purge. + purgeStart := time.Now() if files, photos, updated, err := w.Start(opt); err != nil { log.Error(err) } else if updated > 0 { @@ -96,19 +100,22 @@ func indexAction(ctx *cli.Context) error { } } + // Delete orphaned index entries, sidecar files and thumbnails? if ctx.Bool("cleanup") { - cleanupStart := time.Now() + // Get cleanup worker instance. w := get.CleanUp() + // Cleanup worker options. opt := photoprism.CleanUpOptions{ Dry: false, } - // Start cleanup worker. + // Start index and cache cleanup. + cleanupStart := time.Now() if thumbnails, _, sidecars, err := w.Start(opt); err != nil { return err } else if total := thumbnails + sidecars; total > 0 { - log.Infof("cleanup: removed %s in total [%s]", english.Plural(total, "file", "files"), time.Since(cleanupStart)) + log.Infof("cleanup: deleted %s in total [%s]", english.Plural(total, "file", "files"), time.Since(cleanupStart)) } } diff --git a/internal/form/index_options.go b/internal/form/index_options.go index e3e3475e1..d8177015a 100644 --- a/internal/form/index_options.go +++ b/internal/form/index_options.go @@ -1,6 +1,7 @@ package form type IndexOptions struct { - Path string `json:"path"` - Rescan bool `json:"rescan"` + Path string `json:"path"` + Rescan bool `json:"rescan"` + Cleanup bool `json:"cleanup"` } diff --git a/internal/photoprism/cleanup.go b/internal/photoprism/cleanup.go index 13e1c0428..717ef056e 100644 --- a/internal/photoprism/cleanup.go +++ b/internal/photoprism/cleanup.go @@ -21,7 +21,7 @@ import ( "github.com/photoprism/photoprism/pkg/fs" ) -// CleanUp represents a worker that deletes unneeded data and files. +// CleanUp represents a worker that deletes orphaned index entries, sidecar files and thumbnails. type CleanUp struct { conf *config.Config } @@ -35,7 +35,7 @@ func NewCleanUp(conf *config.Config) *CleanUp { return instance } -// Start removes orphan index entries and thumbnails. +// Start index and cache cleanup. func (w *CleanUp) Start(opt CleanUpOptions) (thumbs int, orphans int, sidecars int, err error) { defer func() { if r := recover(); r != nil { @@ -96,7 +96,7 @@ func (w *CleanUp) Start(opt CleanUpOptions) (thumbs int, orphans int, sidecars i } } - log.Infof("cleanup: removed %s and %s [%s]", english.Plural(orphans, "index entry", "index entries"), english.Plural(sidecars, "sidecar file", "sidecar files"), time.Since(cleanupStart)) + log.Infof("cleanup: removed %s and deleted %s [%s]", english.Plural(orphans, "index entry", "index entries"), english.Plural(sidecars, "sidecar file", "sidecar files"), time.Since(cleanupStart)) // Remove orphan index entries. if opt.Dry { @@ -159,7 +159,7 @@ func (w *CleanUp) Cache(opt CleanUpOptions) (deleted int, err error) { log.Info("cleanup: searching for orphaned cache files") - // Find and remove orphan thumbnail files. + // Find and delete orphaned thumbnail files. for _, dir := range dirs { err = fastwalk.Walk(dir, func(fileName string, info os.FileMode) error { base := filepath.Base(fileName) @@ -184,19 +184,19 @@ func (w *CleanUp) Cache(opt CleanUpOptions) (deleted int, err error) { // Do nothing. } else if opt.Dry { deleted++ - log.Debugf("cleanup: %s would be removed", logName) + log.Debugf("cleanup: %s would be deleted", logName) } else if err := os.Remove(fileName); err != nil { log.Warnf("cleanup: %s in %s", err, logName) } else { deleted++ - log.Debugf("cleanup: removed %s from cache", logName) + log.Debugf("cleanup: deleted %s from cache", logName) } return nil }) } - log.Infof("cleanup: removed %s from cache [%s]", english.Plural(deleted, "file", "files"), time.Since(cleanupStart)) + log.Infof("cleanup: deleted %s from cache [%s]", english.Plural(deleted, "file", "files"), time.Since(cleanupStart)) return deleted, err }