From 5192483fff5b66cc0857cb39e9f83abfd24a9716 Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Thu, 19 Mar 2026 17:15:26 +0300 Subject: [PATCH] Add smart combined album asset redistribution + fix locale string Core library: - New combine_album_assets() in asset_utils.py: smart redistribution of unused quota when albums return fewer assets than their share. Two-pass algorithm: even split then redistribute remainder. - 6 new tests (56 total passing). Frontend: - Fix "leave empty to keep current" not localized in server edit. Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/lib/i18n/en.json | 1 + frontend/src/lib/i18n/ru.json | 1 + frontend/src/routes/servers/+page.svelte | 2 +- .../src/immich_watcher_core/asset_utils.py | 66 +++++++++++++++++++ packages/core/tests/test_asset_utils.py | 52 +++++++++++++++ 5 files changed, 121 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/i18n/en.json b/frontend/src/lib/i18n/en.json index d4adb1f..dcfcbad 100644 --- a/frontend/src/lib/i18n/en.json +++ b/frontend/src/lib/i18n/en.json @@ -48,6 +48,7 @@ "url": "Immich URL", "urlPlaceholder": "http://immich:2283", "apiKey": "API Key", + "apiKeyKeep": "API Key (leave empty to keep current)", "connecting": "Connecting...", "noServers": "No servers configured yet.", "delete": "Delete", diff --git a/frontend/src/lib/i18n/ru.json b/frontend/src/lib/i18n/ru.json index 3619da5..27880c2 100644 --- a/frontend/src/lib/i18n/ru.json +++ b/frontend/src/lib/i18n/ru.json @@ -48,6 +48,7 @@ "url": "URL Immich", "urlPlaceholder": "http://immich:2283", "apiKey": "API ключ", + "apiKeyKeep": "API ключ (оставьте пустым, чтобы сохранить текущий)", "connecting": "Подключение...", "noServers": "Серверы не настроены.", "delete": "Удалить", diff --git a/frontend/src/routes/servers/+page.svelte b/frontend/src/routes/servers/+page.svelte index 4bd4c2d..03b500f 100644 --- a/frontend/src/routes/servers/+page.svelte +++ b/frontend/src/routes/servers/+page.svelte @@ -71,7 +71,7 @@
- +