diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index d216a96d..af4f5ff6 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -54,9 +54,9 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S
|---|---|
| `Sqlite`, `Postgres` | SQLite P/Invoke binding (winsqlite3 / libsqlite3), in-house PostgreSQL wire protocol v3 client with pool and LISTEN |
| `Migrations/{sqlite,postgres}/NNNN_name.sql` | Embedded, applied in one transaction at open (`MigrationRunner`) |
-| `Repositories` | `TitanoDatabase` facade: archives, sequences, frames, tags, renders, jobs, cards, users, tokens, uploads, render nodes, settings, audit |
-| `Jobs` | `JobEngine`, `IJobHandler`, `IJobHandlerProvider`, `JobContext` (progress, checkpoints, follow-up jobs) |
-| `Archiving` | `ArchiveService` (create/adopt/open), `ArchiveIndexer` (scan, rebuild), `ArchiveIngest` (uploads and imports), `ImportService`, `ArchiveVerifier`, `ArchiveImages`, `ArchiveMaintenance`, `MassRenamer`, `SequenceTrash` (delete into the archive's hidden trash with a dry run, restore; the folder moves back when the index step fails), job handlers |
+| `Repositories` | `TitanoDatabase` facade: archives, sequences, frames, tags, renders, jobs, cards, users, tokens, uploads, render nodes, settings, audit; `DatabaseBackups` (daily `VACUUM INTO` copies of an SQLite index kept ×3, restore staged for the next open) |
+| `Jobs` | `JobEngine` (its number of workers can change while it runs), `IJobHandler`, `IJobHandlerProvider`, `JobContext` (progress, checkpoints, follow-up jobs) |
+| `Archiving` | `ArchiveService` (create/adopt/open, archive settings written to `archive.json` then the index), `ArchiveIndexer` (scan, rebuild), `ArchiveIngest` (uploads and imports), `ImportService`, `ArchiveVerifier`, `ArchiveImages`, `ArchiveMaintenance`, `MassRenamer`, `SequenceTrash` (delete into the archive's hidden trash with a dry run, restore; the folder moves back when the index step fails), job handlers |
| `Processing` | `ProcessingService`, `SequenceAnalyser`, `SequenceRender`, `ProjectStore`, `RenderNodeClient`, job handlers |
| `Sync` | `SyncService` (sync table of one server: compare, link by content, settle conflicts, enqueue transfers), `SyncRules` (status, settings merge and differences, no I/O), `SyncLinkStore` (`sync_links`, `sync_state`), `SyncTransfers` and `SyncJobHandler` (resumable, hash-verified uploads and downloads as jobs; downloads commit through the archive ingest), `SyncAgent` (background comparison, server events, backoff, offline proxies), `ProxyCache` and `RemoteSequence` (server sequences opened with proxies), `ISyncRemote` (the server calls; `TitanoSyncRemote` over `TitanoClient`) |
@@ -71,7 +71,7 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S
| `Import` | `CardPool` (inserted cards, remembered cards, folders), camera profiles, plans and choices, destinations (archive, folder, server through `ServerImportSink`), card actions (verified delete, format, eject) |
| `Archive` | `CurrentArchive`, `ArchiveTree`, figures for the charts, maintenance reports, mass rename and move, delete and trash dialogs (`SequenceDeletion`, `DeletePlans`), `ArchiveFailures` |
| `Server` | `ServerSession`, `ConnectFlow` (trust on first use), `SyncHost` (sync engine, agent, metered hold, editor connections, Export Sync), sync table, `RemoteSequenceApi` |
-| `Jobs`, `Settings`, `About` | Job list and buffering; settings rows, encoder inventory, language catalog, naming preview; update check and download |
+| `Jobs`, `Settings`, `About` | Job list and buffering; settings rows, encoder and format inventories, `ProcessingTuning` (Settings › Rendering and Analysis applied to each job), `InterfacePriority`, language catalog, naming preview; update check and download |
| `Infrastructure` | `AppServices` (composition root), `AppSettings`, `AppEnvironment` (installed or portable), `UiLanguage`, `LiveRegion`, `RenderNodeHost`, `DiagnosticsBundle`, `ShellActions` (BRIEF §8.6), device monitor |
| `DesignTime` | `SampleData`: the archive, jobs and server the screenshots and smoke tests run on |
@@ -91,8 +91,8 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S
| Host | Composition root | What it runs |
|---|---|---|
-| Titano (desktop) | `App/Infrastructure/AppServices` | SQLite index in `%LOCALAPPDATA%\Titano` (or `.\data` when portable); `ArchiveService` with WIC first, then managed decoders; `ProcessingService` with Media Foundation, then managed encoders; one `JobEngine` with the handlers of both; thumbnails; `ServerSession`; `SyncHost` while signed in (sync engine and agent, upload and download handlers, metered hold, editors of server sequences); the render node while opted in and signed in; update check and download (`About/UpdateCheck`, `About/UpdateDownload`, `About/UpdateFlow`: the setup, or the portable zip for a portable copy, verified against `SHA256SUMS`, resumable, cancellable, failing after 60 s without data); diagnostics bundle |
-| Titano Server | `Server/Hosting/ServerHost.Build` | Options from `server.json` + `TITANO_*`; PostgreSQL (or SQLite on Windows); `ArchiveModule` then `ProcessingModule` register job handler providers; `JobEngineHost` (renders only managed formats and MP4 jobs no render node can take, BRIEF §14.7); `RenderNodeService`/`RenderNodeMonitor`; `UploadService`; `EventHub` (WebSocket); embedded admin panel; LAN discovery beacon; Windows service host |
+| Titano (desktop) | `App/Infrastructure/AppServices` | SQLite index in `%LOCALAPPDATA%\Titano` (or `.\data` when portable); `ArchiveService` with WIC first, then managed decoders; `ProcessingService` with Media Foundation, then managed encoders; one `JobEngine` with the handlers of both; thumbnails; `ServerSession`; `SyncHost` while signed in (sync engine and agent, upload and download handlers, metered hold, editors of server sequences); the render node while opted in and signed in; update check and download (`About/UpdateCheck`, `About/UpdateDownload`, `About/UpdateFlow`: the setup, or the portable zip for a portable copy, verified against `SHA256SUMS`, resumable, cancellable, failing after 60 s without data); diagnostics bundle; daily index backups and the restore staged in Settings › Advanced (`DatabaseBackups`) |
+| Titano Server | `Server/Hosting/ServerHost.Build` | Options from `server.json` + `TITANO_*`; PostgreSQL (or SQLite on Windows); `ArchiveModule` then `ProcessingModule` register job handler providers; `JobEngineHost` (renders only managed formats and MP4 jobs no render node can take, BRIEF §14.7); `RenderNodeService`/`RenderNodeMonitor`; `UploadService`; `EventHub` (WebSocket); embedded admin panel; LAN discovery beacon; Windows service host; daily backups of an SQLite index (`DatabaseBackupService`) |
| Titano Uploader | `Uploader/App.xaml.cs` | `TitanoClient`, persisted queue, watch folders; no database |
| Titano Setup | `Setup/Program` | TPK1 payload extraction, registry, shortcuts, silent mode, uninstaller |
diff --git a/i18n/ar/Tooltips.ar.resx b/i18n/ar/Tooltips.ar.resx
index 10859068..c9cfcc9a 100644
--- a/i18n/ar/Tooltips.ar.resx
+++ b/i18n/ar/Tooltips.ar.resx
@@ -538,7 +538,6 @@
محول الرسومات ومرمّزات Media Foundation المكتشفةالمساحة المتاحة على محرك أقراص الأرشيفجذر الأرشيف المحلي؛ لا تُنقل الملفات · Enter للتطبيق، Esc للتراجع
- خفض أولوية المهام أثناء وجود Titano في المقدمة لتبقى الواجهة سلسةنسخ الفهرس إلى مجلد النسخ الاحتياطية؛ يُحتفظ بأحدث ثلاث نسخ · بضع ثوانٍاختيار مجلد الأرشيفاختيار مجلد التخزين المؤقت؛ يفيد استخدام قرص SSD سريع
@@ -562,22 +561,17 @@
تلقائي: ربع الذاكرة المثبتةالعودة إلى «تلقائي»: ربع الذاكرة المثبتةفتح مجلد البيانات في مستكشف الملفات
- الوضع المحمول، والسجلات، والتشخيص، والنسخ الاحتياطي لقاعدة البيانات
- مجلد الأرشيف، وقوالب التسمية، وحجم النسخ الوكيلةاللغة، والسمة، وإحصاءات الاستخدامملف تعريف الجودة، وميزانية الذاكرة، والتوازي، والمرمّزاتالخادم الافتراضي، وعقدة التصيير، والشهادات الموثوقةمجلد التخزين المؤقت، والصور المصغرة في الذاكرة، وحد التخزين المؤقتالتحقق من التحديثات عند البدء
- مؤشرات الترابط العاملة لفك الترميز والمعالجة · Enter للتطبيق، Esc للتراجعتلقائي: عدد الأنوية ناقص أربعة لتبقى الواجهة سريعة الاستجابةالعودة إلى «تلقائي»: عدد الأنوية ناقص أربعةمفعّل عند وجود portable.txt بجانب Titano.exe: تبقى كل البيانات في مجلد البيانات الخاص بهاستخدام مرمّز عتادي عندما يدعم الإعداد المسبق، وإلا فالمرمّز البرمجيأول ثلاثة أسماء لاستيراد تجريبي بهذه القوالبالعتاد للمعاينات، والترميز البرمجي لإعدادات الأرشفة المسبقة
- الضلع الأطول للنسخ الوكيلة بتنسيق JPEG المُنشأة للتسلسلات الجديدة
- «متوازن» يناسب معظم الأعمال؛ «الأفضل» يضاعف أخذ العينات ولا يُفرغ إلى القرص أبدًا؛ «سريع» للمعايناتسرد المرمّزات مجددًا بعد تثبيت برنامج تشغيل أو برنامج ترميزإعادة كل عنصر تحكم في هذا القسم إلى قيمته الافتراضيةالبحث عن إعداد بالاسم
diff --git a/i18n/bg/Tooltips.bg.resx b/i18n/bg/Tooltips.bg.resx
index 0ef46b4f..dcfe8de7 100644
--- a/i18n/bg/Tooltips.bg.resx
+++ b/i18n/bg/Tooltips.bg.resx
@@ -508,7 +508,6 @@
Открит графичен адаптер и кодери на Media FoundationСвободно място на устройството на архиваКорен на локалния архив; файловете не се преместват · Enter прилага, Esc връща
- Понижава приоритета на задачите, докато Titano е на преден план, за да остане интерфейсът плавенКопира индекса в папката с резервни копия; пазят се последните три · няколко секундиИзбор на папката на архиваИзбор на папката на кеша; бърз SSD помага
@@ -532,22 +531,17 @@
Авто: една четвърт от инсталираната паметВръщане към „Авто“: една четвърт от инсталираната паметОтваря папката с данни във файловия мениджър
- Преносим режим, журнали, диагностика, резервно копие на базата данни
- Папка на архива, шаблони за имена, размер на проксиЕзик, тема, статистика за използванеПрофил на качеството, бюджет на паметта, паралелизъм, кодериСървър по подразбиране, възел за рендериране, доверени сертификатиПапка на кеша, миниатюри в паметта, лимит на кешаПроверка за актуализации при стартиране
- Работни нишки за декодиране и обработка · Enter прилага, Esc връщаАвто: броят ядра минус четири, за да остане интерфейсът отзивчивВръщане към „Авто“: броят ядра минус четириВключен, когато portable.txt е до Titano.exe: всички данни остават в неговата папка с данниИзползва хардуерен кодер, когато някой поддържа пресета; иначе софтуеренПървите три имена от примерно импортиране с тези шаблониХардуер за визуализациите, софтуер за архивните пресети
- Дългата страна на JPEG прокси файловете, създавани за новите серии
- „Балансиран“ е подходящ за повечето задачи; „Най-добър“ удвоява семплирането и никога не измества; „Бърз“ е за визуализацииИзброява кодерите отново след инсталиране на драйвер или кодекВръща всяка контрола в този раздел към стойността по подразбиранеНамира настройка по име
diff --git a/i18n/cs/Tooltips.cs.resx b/i18n/cs/Tooltips.cs.resx
index db55e6d4..1e9d8ebf 100644
--- a/i18n/cs/Tooltips.cs.resx
+++ b/i18n/cs/Tooltips.cs.resx
@@ -523,7 +523,6 @@
Nalezený grafický adaptér a kodéry Media FoundationVolné místo na jednotce archivuKořen místního archivu; soubory se nepřesouvají · Enter použije, Esc vrátí zpět
- Sníží prioritu úloh, když je Titano v popředí, aby rozhraní zůstalo plynuléZkopíruje index do složky záloh; uchovávají se tři nejnovější · několik sekundOtevře výběr složky archivuOtevře výběr složky mezipaměti; pomůže rychlý SSD
@@ -547,22 +546,17 @@
Auto: čtvrtina nainstalované pamětiZpět na Auto: čtvrtina nainstalované pamětiOtevře datovou složku v Průzkumníkovi
- Přenosný režim, protokoly, diagnostika, záloha databáze
- Složka archivu, šablony pojmenování, velikost proxyJazyk, motiv, statistiky používáníProfil kvality, limit paměti, paralelismus, kodéryVýchozí server, renderovací uzel, důvěryhodné certifikátySložka mezipaměti, miniatury v paměti, limit mezipamětiKontrola aktualizací při spuštění
- Pracovní vlákna pro dekódování a zpracování · Enter použije, Esc vrátí zpětAuto: počet jader minus čtyři, aby rozhraní zůstalo svižnéZpět na Auto: počet jader minus čtyřiZapnuto, když vedle souboru Titano.exe leží portable.txt: všechna data zůstávají v jeho datové složcePoužije hardwarový kodér, pokud předvolbu podporuje; jinak softwarovýPrvní tři názvy ukázkového importu s těmito šablonamiHardware pro náhledy, software pro archivní předvolby
- Delší strana JPEG proxy vytvářených pro nové sekvence
- Vyvážený vyhovuje většině práce; Nejlepší zdvojnásobí vzorkování a nikdy neodkládá na disk; Rychlý je pro náhledyZnovu vypíše kodéry po instalaci ovladače nebo kodekuVrátí všechny ovládací prvky tohoto oddílu na výchozí hodnotyNajde nastavení podle názvu
diff --git a/i18n/da/Tooltips.da.resx b/i18n/da/Tooltips.da.resx
index c8e8a66c..50528e14 100644
--- a/i18n/da/Tooltips.da.resx
+++ b/i18n/da/Tooltips.da.resx
@@ -508,7 +508,6 @@
Fundne grafikkort og Media Foundation-encodereLedig plads på arkivdrevetRoden af det lokale arkiv; filer flyttes ikke · Enter anvender, Esc fortryder
- Sænk jobprioriteten, mens Titano er i forgrunden, så brugerfladen forbliver flydendeKopiér indekset til mappen med sikkerhedskopier; de tre nyeste bevares · et par sekunderVælg arkivmappenVælg cachemappen; en hurtig SSD hjælper
@@ -532,22 +531,17 @@
Auto: en fjerdedel af den installerede hukommelseTilbage til Auto: en fjerdedel af den installerede hukommelseÅbn datamappen i Stifinder
- Portabel tilstand, logge, diagnosticering, sikkerhedskopi af databasen
- Arkivmappe, navngivningsskabeloner, proxystørrelseSprog, tema, brugsstatistikKvalitetsprofil, hukommelsesbudget, parallelitet, encodereStandardserver, renderingsnode, betroede certifikaterCachemappe, miniaturer i hukommelsen, cachegrænseSøg efter opdateringer ved start
- Arbejdstråde til afkodning og behandling · Enter anvender, Esc fortryderAuto: antal kerner minus fire, så brugerfladen forbliver responsivTilbage til Auto: antal kerner minus fireTil, når portable.txt ligger ved siden af Titano.exe: alle data bliver i programmets datamappeBrug en hardwareencoder, når en understøtter forudindstillingen; ellers softwareDe tre første navne fra en prøveimport med disse skabelonerHardware til forhåndsvisninger, software til arkivforudindstillinger
- Den lange side af de JPEG-proxyer, der bygges til nye sekvenser
- Afbalanceret passer til det meste; Bedst fordobler samplingen og lægger aldrig ud; Hurtig er til forhåndsvisningerFind encoderne igen efter installation af en driver eller et codecNulstil alle kontrolelementer i dette afsnit til standardFind en indstilling efter navn
diff --git a/i18n/de/Tooltips.de.resx b/i18n/de/Tooltips.de.resx
index 0b4e4b6a..c540ebc2 100644
--- a/i18n/de/Tooltips.de.resx
+++ b/i18n/de/Tooltips.de.resx
@@ -508,7 +508,6 @@
Gefundener Grafikadapter und Media-Foundation-EncoderFreier Speicherplatz auf dem ArchivlaufwerkStammordner des lokalen Archivs; Dateien werden nicht verschoben · Enter übernimmt, Esc macht rückgängig
- Auftragspriorität senken, solange Titano im Vordergrund ist, damit die Oberfläche flüssig bleibtIndex in den Sicherungsordner kopieren; die neuesten drei werden behalten · wenige SekundenArchivordner auswählenCache-Ordner auswählen; eine schnelle SSD hilft
@@ -532,22 +531,17 @@
Auto: ein Viertel des installierten ArbeitsspeichersZurück zu Auto: ein Viertel des installierten ArbeitsspeichersDatenordner im Explorer öffnen
- Portabler Modus, Protokolle, Diagnose, Datenbanksicherung
- Archivordner, Namensvorlagen, ProxygrößeSprache, Design, NutzungsstatistikQualitätsprofil, Arbeitsspeicher-Budget, Parallelität, EncoderStandardserver, Render-Knoten, vertrauenswürdige ZertifikateCache-Ordner, Miniaturansichten im Arbeitsspeicher, Cache-LimitUpdateprüfung beim Start
- Worker-Threads für Dekodierung und Verarbeitung · Enter übernimmt, Esc macht rückgängigAuto: Kerne minus vier, damit die Oberfläche reaktionsfähig bleibtZurück zu Auto: Kerne minus vierAktiv, wenn portable.txt neben Titano.exe liegt: Alle Daten bleiben im Datenordner danebenEinen Hardware-Encoder verwenden, wenn einer die Vorgabe unterstützt, sonst SoftwareDie ersten drei Namen eines Beispielimports mit diesen VorlagenHardware für Vorschauen, Software für Archivvorgaben
- Lange Kante der JPEG-Proxys, die für neue Sequenzen erstellt werden
- „Ausgewogen“ passt für die meisten Arbeiten; „Beste“ verdoppelt die Abtastung und lagert nie aus; „Schnell“ ist für VorschauenEncoder nach einer Treiber- oder Codec-Installation erneut auflistenAlle Steuerelemente dieses Abschnitts auf den Standard zurücksetzenEine Einstellung nach Namen finden
diff --git a/i18n/el/Tooltips.el.resx b/i18n/el/Tooltips.el.resx
index 9c5f659f..6e2b4e3c 100644
--- a/i18n/el/Tooltips.el.resx
+++ b/i18n/el/Tooltips.el.resx
@@ -508,7 +508,6 @@
Η κάρτα γραφικών και οι κωδικοποιητές Media Foundation που βρέθηκανΕλεύθερος χώρος στη μονάδα δίσκου της αρχειοθήκηςΡιζικός φάκελος της τοπικής αρχειοθήκης. Τα αρχεία δεν μετακινούνται · Enter για εφαρμογή, Esc για αναίρεση
- Μείωση της προτεραιότητας των εργασιών όσο το Titano είναι σε πρώτο πλάνο, ώστε το περιβάλλον εργασίας να παραμένει ομαλόΑντιγραφή του ευρετηρίου στον φάκελο αντιγράφων ασφαλείας. Διατηρούνται τα τρία πιο πρόσφατα · λίγα δευτερόλεπταΕπιλογή του φακέλου της αρχειοθήκηςΕπιλογή του φακέλου κρυφής μνήμης. Ένας γρήγορος SSD βοηθά
@@ -532,22 +531,17 @@
Αυτόματο: το ένα τέταρτο της εγκατεστημένης μνήμηςΕπαναφορά σε Αυτόματο: το ένα τέταρτο της εγκατεστημένης μνήμηςΆνοιγμα του φακέλου δεδομένων στην Εξερεύνηση αρχείων
- Φορητή λειτουργία, αρχεία καταγραφής, διαγνωστικά, αντίγραφο ασφαλείας της βάσης δεδομένων
- Φάκελος αρχειοθήκης, πρότυπα ονοματοδοσίας, μέγεθος proxyΓλώσσα, θέμα, στατιστικά χρήσηςΠροφίλ ποιότητας, όριο μνήμης, παραλληλισμός, κωδικοποιητέςΠροεπιλεγμένος διακομιστής, κόμβος απόδοσης, αξιόπιστα πιστοποιητικάΦάκελος κρυφής μνήμης, μικρογραφίες στη μνήμη, όριο κρυφής μνήμηςΈλεγχος για ενημερώσεις κατά την εκκίνηση
- Νήματα εργασίας για αποκωδικοποίηση και επεξεργασία · Enter για εφαρμογή, Esc για αναίρεσηΑυτόματο: πυρήνες μείον τέσσερις, ώστε το περιβάλλον εργασίας να ανταποκρίνεταιΕπαναφορά σε Αυτόματο: πυρήνες μείον τέσσεριςΕνεργή όταν το portable.txt βρίσκεται δίπλα στο Titano.exe: όλα τα δεδομένα μένουν στον φάκελο δεδομένων τουΧρήση κωδικοποιητή υλικού όταν κάποιος υποστηρίζει την προρύθμιση, διαφορετικά κωδικοποιητή λογισμικούΤα τρία πρώτα ονόματα μιας δοκιμαστικής εισαγωγής με αυτά τα πρότυπαΥλικό για προεπισκοπήσεις, λογισμικό για προρυθμίσεις αρχειοθέτησης
- Μεγάλη πλευρά των proxy JPEG που δημιουργούνται για νέες ακολουθίες
- Το Ισορροπημένο ταιριάζει στις περισσότερες εργασίες. Το Βέλτιστο διπλασιάζει τη δειγματοληψία και δεν μεταφέρει ποτέ στον δίσκο. Το Γρήγορο είναι για προεπισκοπήσειςΝέα καταγραφή των κωδικοποιητών μετά από εγκατάσταση προγράμματος οδήγησης ή codecΕπαναφορά όλων των στοιχείων ελέγχου αυτής της ενότητας στις προεπιλογές τουςΕύρεση ρύθμισης με βάση το όνομα
diff --git a/i18n/en/Archive.resx b/i18n/en/Archive.resx
index 79ccbb34..b0fa151b 100644
--- a/i18n/en/Archive.resx
+++ b/i18n/en/Archive.resx
@@ -129,6 +129,8 @@
{0}: {1} made, {2} reused, {3} unreadablelong: job log line{0} copied, {1} skipped, {2} failedlong: job log lineNot copied: {0} ({1})long: job log line
+ Index: {0} reclaimablelong: job log line
+ Index compacted: {0} freedlong: job log line{0} stale locks, {1} temporary files, {2} packs compacted, {3} duplicate flags changedlong: job log line{0} unindexed photos, {1} missing photoslong: job log line{0} folders, {1} indexed, {2} adopted, {3} removedlong: job log line
diff --git a/i18n/en/Errors.resx b/i18n/en/Errors.resx
index 9caf8a3a..b81064b0 100644
--- a/i18n/en/Errors.resx
+++ b/i18n/en/Errors.resx
@@ -6,6 +6,8 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089{0} of {1} sequences could not be analysed; see the job log.long; {0} failed count (2 or more); {1} total countThe archive could not be opened.long
+ The current index could not be backed up or replaced; the restore runs again at the next start.long
+ This backup cannot be restored; choose another one.longEnter a whole number from {0} to {1}.Enter a folder.This is not a valid folder path.
diff --git a/i18n/en/Settings.resx b/i18n/en/Settings.resx
index 0447eb74..b67cd880 100644
--- a/i18n/en/Settings.resx
+++ b/i18n/en/Settings.resx
@@ -13,22 +13,70 @@
Save the diagnostics bundle toExport bundleLogs
+ No backups yetPortable modeOffOn
+ Reset
+ Reset all
+ Reset all…
+ Settings reset
+ Every preference returns to its default. The archive folder, the server sign-in and the trusted certificates stay.long
+ Reset every setting?
+ Restart Titano to restore the index.long
+ Restore
+ Restore
+ Backup: {0} sequences, {1} photoslong
+ Cancel restore
+ Now: {0} sequences, {1} photoslong
+ The index was not restoredlong
+ The index returns to this backup when Titano starts next. The current index is backed up first; the files of the archive are not touched.long
+ Restore…
+ Waiting for restart
+ Restore ready
+ Restore the index of {0}?long
+ Index restored from a backuplong
+ After import
+ After a scan
+ Deep analysis
+ Night frames
+ % brightness or less
+ Star fields
+ stars per megapixel
+ Analysis width
+ px long edgeFile namesFolders{0} freeFull size
+ None
+ The archive settings were not savedlongChoose the archive folder
+ Rescan everyPreviewProxy sizeArchive folder
+ Thumbnail sizeBack to AutoChoose folderExport…Settings exportedExport the settings to
+ Decoder
+ Extensions
+ Format
+ Codec to install
+ On this PC
+ Titanoinvariant
+ Windowsinvariant
+ Install
+ Install {0}long
+ {0} missinglong
+ {0}: {1}invariant
+ Preview only
+ Full decode
+ Not supported
+ Formats on this PCCheck on startLanguageTheme
@@ -42,6 +90,7 @@
Settings importedTitano settingsImport settings
+ Harbour sunsetAdvancedAnalysisArchive
diff --git a/i18n/en/Tooltips.resx b/i18n/en/Tooltips.resx
index 915ab73b..2de80576 100644
--- a/i18n/en/Tooltips.resx
+++ b/i18n/en/Tooltips.resx
@@ -506,10 +506,11 @@
Trust this certificate for this server and continue to sign inUse this addressGraphics adapter and Media Foundation encoders found
+ Largest long edge frames are decoded at for deep analysis (half the native size up to this); wider is slower and sees finer detailFree space on the archive driveRoot of the local archive; files are not moved · Enter applies, Esc reverts
- Lower the job priority while Titano is in front so the interface stays fluidCopy the index to the backups folder; the newest three are kept · a few seconds
+ Daily copies of the index (the newest three are kept); choose the one to return toChoose the archive folderChoose the cache folder; a fast SSD helpsWhere frames spill and thumbnails are kept; a fast SSD helps · Enter applies, Esc reverts
@@ -519,46 +520,70 @@
Delete the cache contents nowDelete spilled frames and cached thumbnails; asks firstDatabase, settings, logs and caches of this PC
+ New cards and folders queue a deep analysis of what they import, in the background; each card can change it
+ Sequences a scan finds (adopted folders, new sidecars) also get a deep analysis, in the backgroundServer Titano connects to at start; changing it signs out · Enter applies, Esc revertsZip the logs, a system and codec report, settings and recent failed jobs into a folder you choose; passwords, tokens and photos are left outSave every setting as JSON, without the session tokenFile name of each frame, for example {date}_{time}_{n:0000}; the extension is added · Enter applies, Esc revertsArchive folders, for example {year}/{date} {camera}; a slash starts a subfolder · Enter applies, Esc revertsLoad settings from a JSON file; the session and the window layout stay as they are
+ Open the Microsoft Store page of this free or paid extension; Re-detect after installing it
+ While Titano is in front, its interface runs ahead of the jobs so it stays fluid during renders and analysesKeep the cache as it is
+ Keep the index as it is
+ Keep every setting as it isLanguage of the interface · applies immediatelyDaily log files, kept for 14 daysFrames stay in memory up to this budget, then spill to the cache folderAuto: a quarter of installed memoryBack to Auto: a quarter of installed memory
+ Without this extension some formats are read only from their embedded preview, or not at all, on this PC
+ Frames whose mean brightness is at most this share of white count as night (star fields, night presets) · Enter applies, Esc revertsOpen the data folder in Explorer
- Portable mode, logs, diagnostics, database backup
- Archive folder, naming templates, proxy size
+ Portable mode, logs, diagnostics, database backup and restore, reset
+ Analysis width, night and star thresholds, deep analysis
+ Archive folder, naming templates, proxy and thumbnail size, rescans
+ Which decoder handles each format on this PC, codec install linksLanguage, theme, usage counts
+ Session rules, verification, duplicates, after-import actionsQuality profile, memory budget, parallelism, encodersDefault server, render node, trusted certificatesCache folder, thumbnails in memory, cache limitUpdate check on start
- Worker threads for decoding and processing · Enter applies, Esc revertsAuto: cores minus four so the interface stays responsiveBack to Auto: cores minus four
+ How often Titano rescans the archive for changes made elsewhere, such as by a server sharing itOn when portable.txt sits next to Titano.exe: all data stays in its data folderUse a hardware encoder when one supports the preset; software otherwiseFirst three names of a sample import with these templatesHardware for previews, software for archive presets
- Long edge of the JPEG proxies built for new sequences
- Balanced suits most work; Best doubles sampling and never spills; Fast is for previews
+ Long edge of the JPEG proxies of this archive and of new ones; proxies built before keep their size until rebuilt
+ Balanced suits most work; Best measures at double resolution and reads further ahead; Fast measures at half resolution with draft motionList the encoders again after a driver or codec install
+ Look for codec extensions again after installing one; the next jobs use them
+ Return every setting of this PC to its default; asks first
+ Reset every setting nowReturn every control of this section to its default
+ Compare the chosen backup with the index, then restore it at the next start; asks first
+ Keep the current index at the next start
+ At the next start of Titano, back up the current index and then restore this backup
+ The chosen backup replaces the index when Titano starts nextFind a setting by nameEncode a short synthetic clip with every encoder and report pass or fail and speed · about a minuteSpeed on the synthetic 1280×720 test clipAlways the Microsoft software H.264 encoder; slower, identical everywhere
+ Stars per megapixel from which a night frame counts as a star field · Enter applies, Esc revertsDark interface (default)Light interfaceFollow the Windows app modeDecoded thumbnails kept in memory; more scrolls faster and uses more RAM · Enter applies
+ Long edge of the thumbnails of this archive and of new ones; thumbnails built before keep their size until rebuilt
+ Only the JPEG preview inside the file is read; the output is capped to its size
+ Every pixel is decoded
+ No decoder on this PC reads its pixels; such frames are left out of rendersSend a daily anonymous count of versions and languages in use; nothing else, off by default
+ Jobs and frames processed at once; fewer leave more room to other programs · Enter applies, Esc revertsInstall in Program Files for every account · asks for administrator approvalReturn to the options without changing anythingChoose the installation folder
diff --git a/i18n/es/Tooltips.es.resx b/i18n/es/Tooltips.es.resx
index 27e331e3..ab490a8e 100644
--- a/i18n/es/Tooltips.es.resx
+++ b/i18n/es/Tooltips.es.resx
@@ -508,7 +508,6 @@
Adaptador gráfico y codificadores de Media Foundation encontradosEspacio libre en la unidad de la fototecaRaíz de la fototeca local; los archivos no se mueven · Enter aplica, Esc revierte
- Baja la prioridad de las tareas mientras Titano está en primer plano para que la interfaz siga fluidaCopia el índice en la carpeta de copias de seguridad; se conservan las tres más recientes · unos segundosElige la carpeta de la fototecaElige la carpeta de caché; un SSD rápido ayuda
@@ -532,22 +531,17 @@
Auto: una cuarta parte de la memoria instaladaVolver a Auto: una cuarta parte de la memoria instaladaAbre la carpeta de datos en el Explorador
- Modo portátil, registros, diagnóstico, copia de seguridad de la base de datos
- Carpeta de la fototeca, plantillas de nombres, tamaño de proxyIdioma, tema, estadísticas de usoPerfil de calidad, memoria asignada, paralelismo, codificadoresServidor predeterminado, nodo de renderizado, certificados de confianzaCarpeta de caché, miniaturas en memoria, límite de cachéBúsqueda de actualizaciones al iniciar
- Hilos de trabajo para decodificar y procesar · Enter aplica, Esc revierteAuto: núcleos menos cuatro para que la interfaz siga respondiendoVolver a Auto: núcleos menos cuatroActivado cuando portable.txt está junto a Titano.exe: todos los datos se quedan en su carpeta de datosUsa un codificador por hardware cuando alguno admite el preajuste; si no, por softwarePrimeros tres nombres de una importación de ejemplo con estas plantillasHardware para las vistas previas y software para los preajustes de archivado
- Lado largo de los proxies JPEG generados para las secuencias nuevas
- Equilibrado sirve para casi todo; Óptimo duplica el muestreo y nunca vuelca al disco; Rápido es para vistas previasVuelve a listar los codificadores tras instalar un controlador o un códecDevuelve todos los controles de esta sección a su valor predeterminadoBusca un ajuste por su nombre
diff --git a/i18n/et/Tooltips.et.resx b/i18n/et/Tooltips.et.resx
index 04b68594..c7859b3b 100644
--- a/i18n/et/Tooltips.et.resx
+++ b/i18n/et/Tooltips.et.resx
@@ -508,7 +508,6 @@
Leitud graafikaadapter ja Media Foundationi kodeerijadVaba ruum arhiivi draivilKohaliku arhiivi juurkaust; faile ei teisaldata · Enter rakendab, Esc taastab
- Alandab tööde prioriteeti, kui Titano on esiplaanil, et liides jääks sujuvaksKopeerige indeks varukoopiate kausta; säilitatakse kolm uusimat · mõni sekundValige arhiivikaustValige vahemälu kaust; kiire SSD on abiks
@@ -532,22 +531,17 @@
Auto: veerand installitud mälustTagasi režiimile Auto: veerand installitud mälustAvage andmekaust failihalduris
- Kaasaskantav režiim, logid, diagnostika, andmebaasi varundamine
- Arhiivikaust, nimemallid, proksi suurusKeel, kujundus, kasutusstatistikaKvaliteediprofiil, mälueelarve, paralleelsus, kodeerijadVaikeserver, renderdussõlm, usaldatud sertifikaadidVahemälu kaust, pisipildid mälus, vahemälu piirangVärskenduste otsimine käivitamisel
- Töölõimed dekodeerimiseks ja töötlemiseks · Enter rakendab, Esc taastabAuto: tuumade arv miinus neli, et liides jääks reageerivaksTagasi režiimile Auto: tuumade arv miinus neliSees, kui portable.txt asub Titano.exe kõrval: kõik andmed jäävad selle andmekaustaKasutab riistvarakodeerijat, kui see toetab eelseadistust; muul juhul tarkvaraNende mallidega näidisimpordi kolm esimest nimeRiistvara eelvaadeteks, tarkvara arhiivi eelseadistusteks
- Uutele jadadele loodava JPEG-proksi pikema külje pikkus
- „Tasakaalustatud“ sobib enamikuks tööks; „Parim“ kahekordistab diskreetimise ega tõsta kunagi kettale; „Kiire“ on eelvaadeteksLoetlege kodeerijad uuesti pärast draiveri või koodeki installimistTaastage selle jaotise kõigi juhtelementide vaikeväärtusedLeidke säte nime järgi
diff --git a/i18n/fi/Tooltips.fi.resx b/i18n/fi/Tooltips.fi.resx
index 86978775..930d8980 100644
--- a/i18n/fi/Tooltips.fi.resx
+++ b/i18n/fi/Tooltips.fi.resx
@@ -508,7 +508,6 @@
Löydetty näytönohjain ja Media Foundation -kooderitVapaa tila arkiston asemallaPaikallisen arkiston juuri; tiedostoja ei siirretä · Enter ottaa käyttöön, Esc palauttaa
- Laske töiden prioriteettia, kun Titano on etualalla, jotta käyttöliittymä pysyy sujuvanaKopioi indeksi varmuuskopiokansioon; kolme uusinta säilytetään · muutama sekuntiValitse arkistokansioValitse välimuistikansio; nopea SSD auttaa
@@ -532,22 +531,17 @@
Automaattinen: neljännes asennetusta muististaPalauta automaattinen: neljännes asennetusta muististaAvaa datakansio Resurssienhallinnassa
- Kannettava tila, lokit, diagnostiikka, tietokannan varmuuskopio
- Arkistokansio, nimeämismallit, proxyn kokoKieli, teema, käyttötilastotLaatuprofiili, muistibudjetti, rinnakkaisuus, kooderitOletuspalvelin, renderöintisolmu, luotetut varmenteetVälimuistikansio, pikkukuvat muistissa, välimuistin rajaPäivitysten tarkistus käynnistettäessä
- Purkamisen ja käsittelyn työsäikeet · Enter ottaa käyttöön, Esc palauttaaAutomaattinen: ytimet miinus neljä, jotta käyttöliittymä pysyy reagoivanaPalauta automaattinen: ytimet miinus neljäKäytössä, kun portable.txt on Titano.exe-tiedoston vieressä: kaikki tiedot pysyvät sen datakansiossaKäytä laitteistokooderia, kun jokin tukee esiasetusta; muuten ohjelmistoaNäillä malleilla tehdyn esimerkkituonnin kolme ensimmäistä nimeäLaitteisto esikatseluihin, ohjelmisto arkiston esiasetuksiin
- Uusille sarjoille luotavien JPEG-proxyjen pitkän sivun mitta
- Tasapainoinen sopii useimpiin töihin; Paras kaksinkertaistaa näytteistyksen eikä koskaan siirrä kuvia levylle; Nopea on esikatseluja vartenLuettele kooderit uudelleen ohjaimen tai koodekin asennuksen jälkeenPalauta tämän osion kaikki säätimet oletusarvoihinEtsi asetus nimen perusteella
diff --git a/i18n/fr/Tooltips.fr.resx b/i18n/fr/Tooltips.fr.resx
index a7111ff0..481b6e65 100644
--- a/i18n/fr/Tooltips.fr.resx
+++ b/i18n/fr/Tooltips.fr.resx
@@ -508,7 +508,6 @@
Carte graphique et encodeurs Media Foundation détectésEspace libre sur le lecteur de l'archiveRacine de l'archive locale ; les fichiers ne sont pas déplacés · Enter pour appliquer, Esc pour rétablir
- Abaisser la priorité des tâches quand Titano est au premier plan pour que l'interface reste fluideCopier l'index dans le dossier des sauvegardes ; les trois plus récentes sont conservées · quelques secondesChoisir le dossier de l'archiveChoisir le dossier du cache ; un SSD rapide est préférable
@@ -532,22 +531,17 @@
Auto : un quart de la mémoire installéeRevenir à Auto : un quart de la mémoire installéeOuvrir le dossier de données dans l'Explorateur
- Mode portable, journaux, diagnostic, sauvegarde de la base de données
- Dossier de l'archive, modèles de nommage, taille des proxysLangue, thème, statistiques d'utilisationProfil de qualité, budget mémoire, parallélisme, encodeursServeur par défaut, nœud de rendu, certificats approuvésDossier du cache, miniatures en mémoire, limite du cacheRecherche de mises à jour au démarrage
- Threads de travail pour le décodage et le traitement · Enter pour appliquer, Esc pour rétablirAuto : nombre de cœurs moins quatre, pour que l'interface reste réactiveRevenir à Auto : nombre de cœurs moins quatreActivé quand portable.txt se trouve à côté de Titano.exe : toutes les données restent dans son dossier de donnéesUtiliser un encodeur matériel s'il prend en charge le préréglage, sinon l'encodeur logicielTrois premiers noms d'un exemple d'importation avec ces modèlesMatériel pour les aperçus, logiciel pour les préréglages d'archivage
- Grand côté des proxys JPEG créés pour les nouvelles séquences
- Équilibré convient à la plupart des travaux ; Optimal double l'échantillonnage et ne déborde jamais sur disque ; Rapide sert aux aperçusLister de nouveau les encodeurs après l'installation d'un pilote ou d'un codecRétablir la valeur par défaut de chaque contrôle de cette sectionTrouver un paramètre par son nom
diff --git a/i18n/he/Tooltips.he.resx b/i18n/he/Tooltips.he.resx
index 1cd7bb78..961c17ec 100644
--- a/i18n/he/Tooltips.he.resx
+++ b/i18n/he/Tooltips.he.resx
@@ -523,7 +523,6 @@
מתאם הגרפיקה ומקודדי Media Foundation שנמצאושטח פנוי בכונן הארכיוןתיקיית השורש של הארכיון המקומי; הקבצים אינם מועברים · Enter מחיל, Esc מבטל
- הורדת עדיפות המשימות כאשר Titano בחזית, כדי שהממשק יישאר חלקהעתקת האינדקס לתיקיית הגיבויים; שלושת הגיבויים האחרונים נשמרים · כמה שניותבחירת תיקיית הארכיוןבחירת תיקיית המטמון; כונן SSD מהיר עוזר
@@ -547,22 +546,17 @@
אוטומטי: רבע מהזיכרון המותקןחזרה לאוטומטי: רבע מהזיכרון המותקןפתיחת תיקיית הנתונים בסייר הקבצים
- מצב נייד, יומנים, אבחון, גיבוי מסד הנתונים
- תיקיית הארכיון, תבניות שמות, גודל פרוקסישפה, ערכת נושא, נתוני שימושפרופיל איכות, תקציב זיכרון, מקביליות, מקודדיםשרת ברירת מחדל, צומת רינדור, תעודות מהימנותתיקיית מטמון, תמונות ממוזערות בזיכרון, מגבלת מטמוןבדיקת עדכונים בעת ההפעלה
- הליכי משנה לפענוח ולעיבוד · Enter מחיל, Esc מבטלאוטומטי: מספר הליבות פחות ארבע, כדי שהממשק יישאר מגיבחזרה לאוטומטי: מספר הליבות פחות ארבעפעיל כאשר portable.txt נמצא לצד Titano.exe: כל הנתונים נשמרים בתיקיית הנתונים שלושימוש במקודד חומרה כאשר יש כזה שתומך בפריסט; אחרת, קידוד בתוכנהשלושת השמות הראשונים בייבוא לדוגמה עם התבניות האלהחומרה לתצוגות מקדימות, תוכנה לפריסטים של ארכיון
- אורך הצלע הארוכה של קובצי הפרוקסי בפורמט JPEG שנבנים לרצפים חדשים
- "מאוזן" מתאים לרוב העבודה; "הטוב ביותר" מכפיל את הדגימה ולעולם אינו נשפך לדיסק; "מהיר" מיועד לתצוגות מקדימותרישום המקודדים מחדש לאחר התקנת מנהל התקן או קודקהחזרת כל הפקדים בסעיף הזה לברירת המחדל שלהםחיפוש הגדרה לפי שם
diff --git a/i18n/hi/Tooltips.hi.resx b/i18n/hi/Tooltips.hi.resx
index 1ae67a9b..1f8fa9e2 100644
--- a/i18n/hi/Tooltips.hi.resx
+++ b/i18n/hi/Tooltips.hi.resx
@@ -508,7 +508,6 @@
मिले ग्राफ़िक्स एडैप्टर और Media Foundation एनकोडरसंग्रह ड्राइव पर खाली स्थानस्थानीय संग्रह का रूट; फ़ाइलें स्थानांतरित नहीं होतीं · Enter से लागू, Esc से पूर्ववत
- Titano सामने होने पर कार्य की प्राथमिकता घटाएँ ताकि इंटरफ़ेस सुचारु रहेइंडेक्स को बैकअप फ़ोल्डर में कॉपी करें; नवीनतम तीन रखे जाते हैं · कुछ सेकंडसंग्रह फ़ोल्डर चुनेंकैश फ़ोल्डर चुनें; तेज़ SSD मदद करता है
@@ -532,22 +531,17 @@
ऑटो: इंस्टॉल की गई मेमोरी का एक चौथाईऑटो पर लौटें: इंस्टॉल की गई मेमोरी का एक चौथाईडेटा फ़ोल्डर को एक्सप्लोरर में खोलें
- पोर्टेबल मोड, लॉग, निदान, डेटाबेस बैकअप
- संग्रह फ़ोल्डर, नामकरण टेम्पलेट, प्रॉक्सी आकारभाषा, थीम, उपयोग गणनागुणवत्ता प्रोफ़ाइल, मेमोरी बजट, समानांतरता, एनकोडरडिफ़ॉल्ट सर्वर, रेंडर नोड, विश्वसनीय प्रमाणपत्रकैश फ़ोल्डर, मेमोरी में थंबनेल, कैश सीमाशुरू होने पर अपडेट की जाँच
- डिकोडिंग और प्रोसेसिंग के लिए वर्कर थ्रेड · Enter से लागू, Esc से पूर्ववतऑटो: कोर की संख्या में से चार कम, ताकि इंटरफ़ेस प्रतिक्रियाशील रहेऑटो पर लौटें: कोर की संख्या में से चार कमजब portable.txt, Titano.exe के बगल में हो तब चालू: सारा डेटा उसके डेटा फ़ोल्डर में रहता हैजब कोई हार्डवेयर एनकोडर प्रीसेट को सपोर्ट करे तो उसका उपयोग करें; अन्यथा सॉफ़्टवेयरइन टेम्पलेट के साथ नमूना आयात के पहले तीन नामपूर्वावलोकन के लिए हार्डवेयर, संग्रह प्रीसेट के लिए सॉफ़्टवेयर
- नए सीक्वेंस के लिए बनाए गए JPEG प्रॉक्सी का लंबा किनारा
- संतुलित ज़्यादातर काम के लिए उपयुक्त है; सर्वोत्तम सैंपलिंग दोगुनी करता है और कभी डिस्क पर नहीं उतारता; तेज़ पूर्वावलोकन के लिए हैड्राइवर या कोडेक इंस्टॉल करने के बाद एनकोडर फिर से सूचीबद्ध करेंइस अनुभाग के हर नियंत्रण को उसके डिफ़ॉल्ट पर लौटाएँनाम से कोई सेटिंग ढूँढें
diff --git a/i18n/hr/Tooltips.hr.resx b/i18n/hr/Tooltips.hr.resx
index aa4236ed..d103788a 100644
--- a/i18n/hr/Tooltips.hr.resx
+++ b/i18n/hr/Tooltips.hr.resx
@@ -523,7 +523,6 @@
Pronađeni grafički adapter i koderi Media FoundationSlobodan prostor na pogonu arhiveKorijen lokalne arhive; datoteke se ne premještaju · Enter primjenjuje, Esc vraća
- Snižava prioritet zadataka dok je Titano u prvom planu kako bi sučelje ostalo glatkoKopira indeks u mapu sigurnosnih kopija; čuvaju se tri najnovije · nekoliko sekundiOdabir mape arhiveOdabir mape predmemorije; brzi SSD pomaže
@@ -547,22 +546,17 @@
Auto: četvrtina instalirane memorijeVraća na Auto: četvrtina instalirane memorijeOtvara mapu s podacima u Eksploreru za datoteke
- Prijenosni način, zapisnici, dijagnostika, sigurnosna kopija baze podataka
- Mapa arhive, predlošci naziva, veličina proxy kopijaJezik, tema, statistika korištenjaProfil kvalitete, dopuštena memorija, paralelizam, koderiZadani poslužitelj, čvor za renderiranje, pouzdani certifikatiMapa predmemorije, minijature u memoriji, ograničenje predmemorijeProvjera ažuriranja pri pokretanju
- Radne niti za dekodiranje i obradu · Enter primjenjuje, Esc vraćaAuto: broj jezgri umanjen za četiri kako bi sučelje ostalo responzivnoVraća na Auto: broj jezgri umanjen za četiriUključeno kada se portable.txt nalazi pokraj datoteke Titano.exe: svi podaci ostaju u njezinoj mapi dataUpotrebljava hardverski koder kada podržava preset; inače softverskiPrva tri naziva oglednog uvoza s ovim predlošcimaHardver za pretpreglede, softver za arhivske presete
- Dulja stranica JPEG proxy kopija izrađenih za nove sekvence
- „Uravnoteženo” odgovara većini poslova; „Najbolje” udvostručuje uzorkovanje i nikad ne odlaže na disk; „Brzo” je za pretpregledePonovno navodi kodere nakon instalacije upravljačkog programa ili kodekaVraća sve kontrole ovog odjeljka na zadane vrijednostiPronalazi postavku po nazivu
diff --git a/i18n/hu/Tooltips.hu.resx b/i18n/hu/Tooltips.hu.resx
index 4d71109e..cf0759f3 100644
--- a/i18n/hu/Tooltips.hu.resx
+++ b/i18n/hu/Tooltips.hu.resx
@@ -508,7 +508,6 @@
A talált grafikus adapter és Media Foundation-kódolókSzabad terület az archívum meghajtójánA helyi archívum gyökérmappája; a fájlok nem mozdulnak · Enter: alkalmaz, Esc: visszavon
- Csökkenti a feladatok prioritását, amíg a Titano előtérben van, így a felület gördülékeny maradAz indexet a biztonsági mentések mappájába másolja; a legújabb három marad meg · néhány másodpercAz archívummappa kiválasztásaA gyorsítótár mappájának kiválasztása; egy gyors SSD sokat segít
@@ -532,22 +531,17 @@
Auto: a telepített memória negyedeVissza Auto értékre: a telepített memória negyedeMegnyitja az adatmappát a Fájlkezelőben
- Hordozható mód, naplók, diagnosztika, adatbázis-mentés
- Archívummappa, elnevezési sablonok, proxyméretNyelv, téma, használati statisztikaMinőségi profil, memóriakeret, párhuzamosság, kódolókAlapértelmezett szerver, renderelő csomópont, megbízható tanúsítványokGyorsítótár mappája, miniatűrök a memóriában, gyorsítótár korlátjaFrissítések keresése indításkor
- Feldolgozószálak a dekódoláshoz és a feldolgozáshoz · Enter: alkalmaz, Esc: visszavonAuto: a magok száma mínusz négy, így a felület gyorsan reagálVissza Auto értékre: a magok száma mínusz négyBekapcsolva, ha a portable.txt a Titano.exe mellett van: minden adat a saját data mappájában maradHardveres kódolót használ, ha valamelyik támogatja az előbeállítást; egyébként szoftverestEgy mintaimportálás első három neve ezekkel a sablonokkalHardver az előnézetekhez, szoftver az archiváló előbeállításokhoz
- Az új sorozatokhoz készülő JPEG-proxyk hosszabbik oldala
- A Kiegyensúlyozott a legtöbb munkához megfelel; a Legjobb kétszeres mintavételezést használ, és sosem ír lemezre; a Gyors előnézetekhez valóÚjra listázza a kódolókat illesztőprogram vagy kodek telepítése utánA szakasz minden vezérlőjét visszaállítja az alapértelmezett értékreBeállítás keresése név szerint
diff --git a/i18n/id/Tooltips.id.resx b/i18n/id/Tooltips.id.resx
index 5df3b565..939c91b5 100644
--- a/i18n/id/Tooltips.id.resx
+++ b/i18n/id/Tooltips.id.resx
@@ -508,7 +508,6 @@
Adaptor grafis dan encoder Media Foundation yang ditemukanRuang kosong di drive arsipAkar arsip lokal; file tidak dipindahkan · Enter menerapkan, Esc membatalkan
- Turunkan prioritas tugas saat Titano berada di depan agar antarmuka tetap lancarSalin indeks ke folder cadangan; tiga cadangan terbaru disimpan · beberapa detikPilih folder arsipPilih folder cache; SSD yang cepat akan membantu
@@ -532,22 +531,17 @@
Otomatis: seperempat dari memori terpasangKembali ke Otomatis: seperempat dari memori terpasangBuka folder data di Explorer
- Mode portabel, log, diagnostik, cadangan basis data
- Folder arsip, templat penamaan, ukuran proksiBahasa, tema, hitungan penggunaanProfil kualitas, anggaran memori, paralelisme, encoderServer default, node render, sertifikat tepercayaFolder cache, gambar mini di memori, batas cachePemeriksaan pembaruan saat mulai
- Thread pekerja untuk dekode dan pemrosesan · Enter menerapkan, Esc membatalkanOtomatis: jumlah inti dikurangi empat agar antarmuka tetap responsifKembali ke Otomatis: jumlah inti dikurangi empatAktif bila portable.txt berada di samping Titano.exe: semua data tetap di folder data miliknyaGunakan encoder perangkat keras jika ada yang mendukung preset; jika tidak, gunakan perangkat lunakTiga nama pertama dari contoh impor dengan templat iniPerangkat keras untuk pratinjau, perangkat lunak untuk preset arsip
- Sisi panjang proksi JPEG yang dibuat untuk sekuens baru
- Seimbang cocok untuk sebagian besar pekerjaan; Terbaik menggandakan sampling dan tidak pernah melimpahkan ke disk; Cepat untuk pratinjauDaftar ulang encoder setelah menginstal driver atau codecKembalikan setiap kontrol di bagian ini ke nilai default-nyaCari pengaturan menurut nama
diff --git a/i18n/it/Archive.it.resx b/i18n/it/Archive.it.resx
index 889e7ad4..c1126ee8 100644
--- a/i18n/it/Archive.it.resx
+++ b/i18n/it/Archive.it.resx
@@ -124,6 +124,8 @@
{0}: {1} create, {2} riusate, {3} illeggibili{0} copiate, {1} saltate, {2} non riusciteNon copiata: {0} ({1})
+ Indice: {0} recuperabili
+ Indice compattato: {0} liberati{0} blocchi scaduti, {1} file temporanei, {2} pacchetti compattati, {3} segni di duplicato cambiati{0} foto non indicizzate, {1} foto mancanti{0} cartelle, {1} indicizzate, {2} adottate, {3} rimosse
diff --git a/i18n/it/Errors.it.resx b/i18n/it/Errors.it.resx
index f90ce140..aad76a5f 100644
--- a/i18n/it/Errors.it.resx
+++ b/i18n/it/Errors.it.resx
@@ -6,6 +6,8 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089{0} sequenze su {1} non sono state analizzate; vedi il registro del job.Impossibile aprire l'archivio.
+ Non è stato possibile copiare o sostituire l'indice attuale; il ripristino riparte al prossimo avvio.
+ Questa copia non si può ripristinare; scegline un'altra.Inserisci un numero intero da {0} a {1}.Inserisci una cartella.Questo non è un percorso di cartella valido.
diff --git a/i18n/it/Settings.it.resx b/i18n/it/Settings.it.resx
index d559b97b..d3ffd928 100644
--- a/i18n/it/Settings.it.resx
+++ b/i18n/it/Settings.it.resx
@@ -13,22 +13,67 @@
Salva il pacchetto inEsporta pacchettoLog
+ Ancora nessuna copiaModalità portatileDisattivataAttiva
+ Predefiniti
+ Reimposta tutto
+ Reimposta tutto…
+ Impostazioni reimpostate
+ Ogni preferenza torna al valore predefinito. La cartella dell'archivio, l'accesso al server e i certificati attendibili restano.
+ Reimpostare tutto?
+ Riavvia Titano per ripristinare l'indice.
+ Ripristino
+ Ripristina
+ Copia: {0} sequenze, {1} foto
+ Annulla ripristino
+ Ora: {0} sequenze, {1} foto
+ L'indice non è stato ripristinato
+ L'indice torna a questa copia al prossimo avvio di Titano. Prima si salva una copia dell'indice attuale; i file dell'archivio non vengono toccati.
+ Ripristina…
+ In attesa di riavvio
+ Ripristino pronto
+ Ripristinare l'indice del {0}?
+ Indice ripristinato da una copia
+ Dopo l'importazione
+ Dopo una scansione
+ Analisi profonda
+ Fotogrammi notturni
+ % di luminosità o meno
+ Campi stellari
+ stelle per megapixel
+ Larghezza di analisi
+ px sul lato lungoNomi dei fileCartelle{0} liberiDimensione piena
+ Nessuno
+ Le impostazioni dell'archivio non sono state salvateScegli la cartella dell'archivio
+ Riscansiona ogniAnteprimaDimensione proxyCartella archivio
+ Dimensione miniatureTorna ad AutoScegli cartellaEsporta…Impostazioni esportateEsporta le impostazioni in
+ Decodificatore
+ Estensioni
+ Formato
+ Codec da installare
+ Su questo PC
+ Installa
+ Installa {0}
+ Manca {0}
+ Solo anteprima
+ Decodifica completa
+ Non supportato
+ Formati su questo PCControlla all'avvioLinguaTema
@@ -42,6 +87,7 @@
Impostazioni importateImpostazioni di TitanoImporta impostazioni
+ Tramonto sul portoAvanzateAnalisiArchivio
diff --git a/i18n/it/Tooltips.it.resx b/i18n/it/Tooltips.it.resx
index 634fa3ca..932ee8f3 100644
--- a/i18n/it/Tooltips.it.resx
+++ b/i18n/it/Tooltips.it.resx
@@ -506,10 +506,11 @@
Considera attendibile questo certificato per questo server e prosegui con l'accessoUsa questo indirizzoScheda grafica ed encoder Media Foundation trovati
+ Lato lungo massimo dei fotogrammi decodificati per l'analisi profonda (metà della dimensione nativa fino a questo); più largo è più lento e vede dettagli più finiSpazio libero sull'unità dell'archivioRadice dell'archivio locale; i file non vengono spostati · Invio applica, Esc annulla
- Abbassa la priorità delle attività mentre Titano è in primo piano, così l'interfaccia resta fluidaCopia l'indice nella cartella dei backup; vengono conservate le tre copie più recenti · pochi secondi
+ Copie giornaliere dell'indice (si tengono le tre più recenti); scegli quella a cui tornareScegli la cartella dell'archivioScegli la cartella della cache; un SSD veloce aiutaDove vanno i fotogrammi temporanei e le miniature; un SSD veloce aiuta · Invio applica, Esc annulla
@@ -519,46 +520,70 @@
Elimina adesso il contenuto della cacheElimina fotogrammi temporanei e miniature in cache; prima chiede confermaDatabase, impostazioni, log e cache di questo PC
+ Schede e cartelle nuove accodano l'analisi profonda di ciò che importano, in background; ogni scheda può cambiarlo
+ Anche le sequenze trovate da una scansione (cartelle adottate, nuovi sidecar) ricevono l'analisi profonda, in backgroundServer a cui Titano si connette all'avvio; cambiarlo chiude l'accesso · Invio applica, Esc annullaComprime log, rapporto su sistema e codec, impostazioni e attività fallite di recente in una cartella a tua scelta; password, token e foto restano fuoriSalva tutte le impostazioni in JSON, senza il token di sessioneNome del file di ogni fotogramma, ad esempio {date}_{time}_{n:0000}; l'estensione viene aggiunta · Invio applica, Esc annullaCartelle dell'archivio, ad esempio {year}/{date} {camera}; la barra crea una sottocartella · Invio applica, Esc annullaCarica le impostazioni da un file JSON; la sessione e la disposizione della finestra restano invariate
+ Apri la pagina del Microsoft Store di questa estensione, gratuita o a pagamento; dopo averla installata premi Rileva di nuovo
+ Mentre Titano è in primo piano, l'interfaccia ha la precedenza sulle attività e resta fluida durante rendering e analisiLascia la cache com'è
+ Lascia l'indice com'è
+ Lascia ogni impostazione com'èLingua dell'interfaccia · si applica subitoFile di log giornalieri, conservati per 14 giorniI fotogrammi restano in memoria fino a questo limite, poi passano nella cartella della cacheAuto: un quarto della memoria installataTorna ad Auto: un quarto della memoria installata
+ Senza questa estensione alcuni formati si leggono solo dall'anteprima incorporata, o per niente, su questo PC
+ I fotogrammi con luminosità media al massimo pari a questa quota del bianco contano come notturni (campi stellari, preset notturni) · Invio applica, Esc annullaApri la cartella dati in Esplora file
- Modalità portatile, log, diagnostica, backup del database
- Cartella dell'archivio, modelli dei nomi, dimensione dei proxy
+ Modalità portatile, log, diagnostica, backup e ripristino del database, valori predefiniti
+ Larghezza di analisi, soglie di notte e stelle, analisi profonda
+ Cartella dell'archivio, modelli dei nomi, dimensione di proxy e miniature, riscansioni
+ Quale decodificatore legge ogni formato su questo PC, link per installare i codecLingua, tema, statistiche d'uso
+ Regole delle sessioni, verifica, duplicati, azioni dopo l'importazioneProfilo di qualità, memoria, parallelismo, encoderServer predefinito, nodo di rendering, certificati attendibiliCartella della cache, miniature in memoria, limite della cacheControllo degli aggiornamenti all'avvio
- Thread di lavoro per decodifica ed elaborazione · Invio applica, Esc annullaAuto: core meno quattro, così l'interfaccia resta reattivaTorna ad Auto: core meno quattro
+ Ogni quanto Titano riscansiona l'archivio per le modifiche fatte altrove, per esempio da un server che lo condivideAttiva quando portable.txt si trova accanto a Titano.exe: tutti i dati restano nella sua cartella dataUsa un encoder hardware quando supporta il preset; altrimenti il softwareI primi tre nomi di un'importazione di esempio con questi modelliHardware per le anteprime, software per i preset d'archivio
- Lato lungo dei proxy JPEG creati per le nuove sequenze
- Bilanciato va bene quasi sempre; Massima qualità raddoppia il campionamento e non usa la cache su disco; Veloce è per le anteprime
+ Lato lungo dei proxy JPEG di questo archivio e di quelli nuovi; i proxy già creati tengono la loro dimensione finché non li ricrei
+ Bilanciato va bene quasi sempre; Massima qualità misura a risoluzione doppia e legge più avanti; Veloce misura a metà risoluzione con movimento in bozzaElenca di nuovo gli encoder dopo l'installazione di un driver o di un codec
+ Cerca di nuovo le estensioni codec dopo averne installata una; le prossime attività le usano
+ Riporta ogni impostazione di questo PC al valore predefinito; chiede prima
+ Reimposta ora ogni impostazioneRiporta ogni controllo di questa sezione al valore predefinito
+ Confronta la copia scelta con l'indice, poi la ripristina al prossimo avvio; chiede prima
+ Tieni l'indice attuale al prossimo avvio
+ Al prossimo avvio di Titano, salva una copia dell'indice attuale e poi ripristina questa copia
+ La copia scelta sostituisce l'indice al prossimo avvio di TitanoTrova un'impostazione per nomeCodifica una breve clip sintetica con ogni encoder e ne riporta esito e velocità · circa un minutoVelocità sulla clip di prova sintetica 1280×720Sempre l'encoder software H.264 di Microsoft; più lento, identico ovunque
+ Stelle per megapixel da cui un fotogramma notturno conta come campo stellare · Invio applica, Esc annullaInterfaccia scura (predefinita)Interfaccia chiaraSegui la modalità app di WindowsMiniature decodificate tenute in memoria; più sono, più lo scorrimento è veloce e più RAM serve · Invio applica
+ Lato lungo delle miniature di questo archivio e di quelli nuovi; le miniature già create tengono la loro dimensione finché non le ricrei
+ Si legge solo l'anteprima JPEG nel file; l'uscita è limitata alla sua dimensione
+ Ogni pixel viene decodificato
+ Nessun decodificatore su questo PC ne legge i pixel; questi fotogrammi restano fuori dai renderingInvia ogni giorno un conteggio anonimo di versioni e lingue in uso; nient'altro, disattivato per impostazione predefinita
+ Attività e fotogrammi elaborati insieme; meno lasciano più spazio agli altri programmi · Invio applica, Esc annullaInstalla in Programmi per tutti gli account · chiede l'autorizzazione di amministratoreTorna alle opzioni senza modificare nullaScegli la cartella di installazione
diff --git a/i18n/ja/Tooltips.ja.resx b/i18n/ja/Tooltips.ja.resx
index dd656290..7cc372f8 100644
--- a/i18n/ja/Tooltips.ja.resx
+++ b/i18n/ja/Tooltips.ja.resx
@@ -508,7 +508,6 @@
検出されたグラフィックアダプターと Media Foundation エンコーダーアーカイブのドライブの空き容量ローカルアーカイブのルートです。ファイルは移動されません · Enter で適用、Esc で元に戻す
- Titano が前面にある間はジョブの優先度を下げ、インターフェイスの動作を滑らかに保ちます。インデックスを backups フォルダーにコピーします。最新の 3 つが保持されます · 数秒アーカイブフォルダーを選択します。キャッシュフォルダーを選択します。高速な SSD がおすすめです。
@@ -532,22 +531,17 @@
自動: 搭載メモリの 4 分の 1自動に戻す: 搭載メモリの 4 分の 1エクスプローラーでデータフォルダーを開きます。
- ポータブルモード、ログ、診断、データベースのバックアップ
- アーカイブフォルダー、名前のテンプレート、プロキシのサイズ言語、テーマ、利用状況の集計品質プロファイル、メモリ割り当て、並列処理、エンコーダー既定のサーバー、レンダリングノード、信頼済みの証明書キャッシュフォルダー、メモリ内のサムネイル、キャッシュの上限起動時のアップデート確認
- デコードと処理に使うワーカースレッドの数です · Enter で適用、Esc で元に戻す自動: インターフェイスの応答性を保つため、コア数から 4 を引いた値自動に戻す: コア数から 4 を引いた値Titano.exe と同じ場所に portable.txt があるとオンになります。すべてのデータはそのデータフォルダーに保存されます。プリセットに対応するハードウェアエンコーダーがあればそれを使用し、なければソフトウェアを使用します。これらのテンプレートでインポートした場合の、最初の 3 つの名前の例プレビューにはハードウェア、アーカイブ用プリセットにはソフトウェアを使用します。
- 新しいシーケンス用に作成する JPEG プロキシの長辺です。
- 「バランス」はほとんどの作業に適しています。「最高品質」はサンプリングを 2 倍にし、ディスクに退避しません。「高速」はプレビュー向けです。ドライバーやコーデックをインストールした後に、エンコーダーを再度一覧表示します。このセクションのすべてのコントロールを既定値に戻します。名前で設定を検索します。
diff --git a/i18n/ko/Tooltips.ko.resx b/i18n/ko/Tooltips.ko.resx
index c15e022c..7c250700 100644
--- a/i18n/ko/Tooltips.ko.resx
+++ b/i18n/ko/Tooltips.ko.resx
@@ -508,7 +508,6 @@
찾은 그래픽 어댑터와 Media Foundation 인코더아카이브 드라이브의 여유 공간로컬 아카이브의 루트입니다. 파일은 이동되지 않습니다 · Enter로 적용, Esc로 되돌리기
- Titano 창이 활성 상태인 동안 작업 우선순위를 낮춰 인터페이스가 부드럽게 유지되도록 합니다.인덱스를 백업 폴더에 복사합니다. 최신 백업 3개가 보관됩니다 · 몇 초 소요아카이브 폴더를 선택합니다.캐시 폴더를 선택합니다. 빠른 SSD가 좋습니다.
@@ -532,22 +531,17 @@
자동: 설치된 메모리의 4분의 1자동으로 되돌리기: 설치된 메모리의 4분의 1탐색기에서 데이터 폴더를 엽니다.
- 포터블 모드, 로그, 진단, 데이터베이스 백업
- 아카이브 폴더, 이름 템플릿, 프록시 크기언어, 테마, 사용 통계품질 프로필, 메모리 한도, 병렬 처리, 인코더기본 서버, 렌더링 노드, 신뢰하는 인증서캐시 폴더, 메모리 내 썸네일, 캐시 한도시작할 때 업데이트 확인
- 디코딩과 처리에 쓰는 워커 스레드 수 · Enter로 적용, Esc로 되돌리기자동: 인터페이스가 원활하도록 코어 수에서 4를 뺀 값자동으로 되돌리기: 코어 수에서 4를 뺀 값Titano.exe 옆에 portable.txt가 있으면 켜집니다. 모든 데이터가 해당 데이터 폴더에 보관됩니다.프리셋을 지원하는 하드웨어 인코더가 있으면 사용하고, 없으면 소프트웨어를 사용합니다.이 템플릿으로 가져올 때의 처음 세 이름 예시미리 보기에는 하드웨어, 보관용 프리셋에는 소프트웨어
- 새 시퀀스용으로 만드는 JPEG 프록시의 긴 변 길이
- 대부분의 작업에는 ‘균형’이 적합합니다. ‘최고’는 샘플링을 두 배로 하고 디스크로 옮기지 않으며, ‘빠름’은 미리 보기용입니다.드라이버나 코덱을 설치한 후 인코더 목록을 다시 만듭니다.이 섹션의 모든 컨트롤을 기본값으로 되돌립니다.이름으로 설정을 찾습니다.
diff --git a/i18n/lt/Tooltips.lt.resx b/i18n/lt/Tooltips.lt.resx
index 7383df83..7b0482f7 100644
--- a/i18n/lt/Tooltips.lt.resx
+++ b/i18n/lt/Tooltips.lt.resx
@@ -523,7 +523,6 @@
Rasti grafikos adapteris ir Media Foundation koduotuvaiLaisva vieta archyvo diskeVietinio archyvo šaknis; failai neperkeliami · Enter – taikyti, Esc – atšaukti
- Sumažinti užduočių prioritetą, kai Titano yra priekyje, kad sąsaja veiktų sklandžiaiKopijuoti indeksą į atsarginių kopijų aplanką; saugomos trys naujausios · kelios sekundėsPasirinkti archyvo aplankąPasirinkti talpyklos aplanką; greitas SSD padeda
@@ -547,22 +546,17 @@
Auto: ketvirtadalis įdiegtos atmintiesGrįžti į Auto: ketvirtadalis įdiegtos atmintiesAtidaryti duomenų aplanką failų naršyklėje
- Nešiojamasis režimas, žurnalai, diagnostika, duomenų bazės atsarginė kopija
- Archyvo aplankas, pavadinimų šablonai, tarpinių kopijų dydisKalba, tema, naudojimo statistikaKokybės profilis, atminties limitas, lygiagretumas, koduotuvaiNumatytasis serveris, atvaizdavimo mazgas, patikimi sertifikataiTalpyklos aplankas, miniatiūros atmintyje, talpyklos ribaNaujinimų tikrinimas paleidžiant
- Darbinės gijos iškodavimui ir apdorojimui · Enter – taikyti, Esc – atšauktiAuto: branduolių skaičius minus keturi, kad sąsaja greitai reaguotųGrįžti į Auto: branduolių skaičius minus keturiĮjungta, kai šalia Titano.exe yra portable.txt: visi duomenys lieka programos duomenų aplankeNaudoti aparatinį koduotuvą, kai jis palaiko išankstinę nuostatą; kitu atveju – programinįPirmieji trys pavyzdinio importavimo pavadinimai pagal šiuos šablonusAparatinis peržiūroms, programinis archyvavimo išankstinėms nuostatoms
- Naujoms sekoms kuriamų JPEG tarpinių kopijų ilgoji kraštinė
- „Subalansuotas“ tinka daugeliui darbų; „Geriausias“ dvigubina ėminių skaičių ir niekada neiškelia į diską; „Greitas“ skirtas peržiūromsIš naujo išvardyti koduotuvus įdiegus tvarkyklę ar kodekąGrąžinti visus šio skyriaus valdiklius į numatytąsias reikšmesRasti parametrą pagal pavadinimą
diff --git a/i18n/lv/Tooltips.lv.resx b/i18n/lv/Tooltips.lv.resx
index 3d586ff1..813a6a2d 100644
--- a/i18n/lv/Tooltips.lv.resx
+++ b/i18n/lv/Tooltips.lv.resx
@@ -523,7 +523,6 @@
Atrastais grafikas adapteris un Media Foundation kodētājiBrīvā vieta arhīva diskāLokālā arhīva sakne; faili netiek pārvietoti · Enter piemēro, Esc atsauc
- Pazemināt darbu prioritāti, kamēr Titano ir priekšplānā, lai saskarne paliktu plūstošaKopēt indeksu dublējumu mapē; tiek saglabāti trīs jaunākie · dažas sekundesIzvēlēties arhīva mapiIzvēlēties kešatmiņas mapi; ātrs SSD palīdz
@@ -547,22 +546,17 @@
Auto: ceturtdaļa no instalētās atmiņasAtpakaļ uz Auto: ceturtdaļa no instalētās atmiņasAtvērt datu mapi failu pārlūkā
- Portatīvais režīms, žurnāli, diagnostika, datu bāzes dublēšana
- Arhīva mape, nosaukumu veidnes, proxy izmērsValoda, motīvs, lietojuma statistikaKvalitātes profils, atmiņas budžets, paralēlisms, kodētājiNoklusējuma serveris, renderēšanas mezgls, uzticamie sertifikātiKešatmiņas mape, sīktēli atmiņā, kešatmiņas ierobežojumsAtjauninājumu pārbaude startējot
- Darba pavedieni dekodēšanai un apstrādei · Enter piemēro, Esc atsaucAuto: kodoli mīnus četri, lai saskarne paliktu atsaucīgaAtpakaļ uz Auto: kodoli mīnus četriIeslēgts, ja blakus Titano.exe atrodas portable.txt: visi dati paliek tā datu mapēIzmantot aparatūras kodētāju, ja kāds atbalsta priekšiestatījumu; citādi programmatūrasPirmie trīs nosaukumi parauga importēšanai ar šīm veidnēmAparatūra priekšskatījumiem, programmatūra arhīva priekšiestatījumiem
- JPEG proxy attēlu garākā mala jaunām secībām
- „Līdzsvarots” der vairumam darbu; „Labākais” divkāršo paraugu ņemšanu un nekad nepārvieto kadrus uz disku; „Ātrs” ir priekšskatījumiemVēlreiz uzskaitīt kodētājus pēc draivera vai kodeka instalēšanasAtgriezt visas šīs sadaļas vadīklas uz noklusējumuAtrast iestatījumu pēc nosaukuma
diff --git a/i18n/ms/Tooltips.ms.resx b/i18n/ms/Tooltips.ms.resx
index 08d3bcee..339db12a 100644
--- a/i18n/ms/Tooltips.ms.resx
+++ b/i18n/ms/Tooltips.ms.resx
@@ -508,7 +508,6 @@
Penyesuai grafik dan pengekod Media Foundation yang ditemuiRuang kosong pada pemacu arkibAkar arkib setempat; fail tidak dipindahkan · Enter untuk menggunakan, Esc untuk membatalkan
- Rendahkan keutamaan tugas semasa Titano berada di hadapan supaya antara muka kekal lancarSalin indeks ke folder sandaran; tiga yang terbaharu disimpan · beberapa saatPilih folder arkibPilih folder cache; SSD yang pantas membantu
@@ -532,22 +531,17 @@
Auto: satu perempat daripada memori yang dipasangKembali ke Auto: satu perempat daripada memori yang dipasangBuka folder data dalam Penjelajah Fail
- Mod mudah alih, log, diagnostik, sandaran pangkalan data
- Folder arkib, templat penamaan, saiz proksiBahasa, tema, kiraan penggunaanProfil kualiti, bajet memori, keselarian, pengekodPelayan lalai, nod render, sijil dipercayaiFolder cache, lakaran kecil dalam memori, had cacheSemakan kemas kini semasa mula
- Bebenang pekerja untuk penyahkodan dan pemprosesan · Enter untuk menggunakan, Esc untuk membatalkanAuto: bilangan teras tolak empat supaya antara muka kekal responsifKembali ke Auto: bilangan teras tolak empatHidup apabila portable.txt terletak di sebelah Titano.exe: semua data kekal dalam folder datanyaGunakan pengekod perkakasan apabila ada yang menyokong praset; jika tidak, gunakan perisianTiga nama pertama bagi contoh import dengan templat iniPerkakasan untuk pratonton, perisian untuk praset arkib
- Sisi panjang proksi JPEG yang dibina untuk jujukan baharu
- Seimbang sesuai untuk kebanyakan kerja; Terbaik menggandakan pensampelan dan tidak pernah melimpah; Pantas untuk pratontonSenaraikan pengekod sekali lagi selepas pemacu atau kodek dipasangKembalikan setiap kawalan dalam bahagian ini kepada nilai lalainyaCari tetapan mengikut nama
diff --git a/i18n/nb/Tooltips.nb.resx b/i18n/nb/Tooltips.nb.resx
index 0aa9f19b..d50e2d90 100644
--- a/i18n/nb/Tooltips.nb.resx
+++ b/i18n/nb/Tooltips.nb.resx
@@ -508,7 +508,6 @@
Grafikkort og Media Foundation-kodere som ble funnetLedig plass på arkivstasjonenRoten av det lokale arkivet; filer flyttes ikke · Enter tar i bruk, Esc angrer
- Senk jobbprioriteten mens Titano er i forgrunnen, slik at grensesnittet reagerer rasktKopier indeksen til sikkerhetskopimappen; de tre nyeste beholdes · noen sekunderVelg arkivmappenVelg hurtigbuffermappen; en rask SSD hjelper
@@ -532,22 +531,17 @@
Auto: en firedel av det installerte minnetTilbake til Auto: en firedel av det installerte minnetÅpne datamappen i Filutforsker
- Portabel modus, logger, diagnostikk, sikkerhetskopi av databasen
- Arkivmappe, navnemaler, proxystørrelseSpråk, tema, bruksstatistikkKvalitetsprofil, minnebudsjett, parallellitet, kodereStandardserver, renderingsnode, klarerte sertifikaterHurtigbuffermappe, miniatyrbilder i minnet, hurtigbuffergrenseSe etter oppdateringer ved oppstart
- Arbeidstråder for dekoding og behandling · Enter tar i bruk, Esc angrerAuto: antall kjerner minus fire, slik at grensesnittet reagerer rasktTilbake til Auto: antall kjerner minus firePå når portable.txt ligger ved siden av Titano.exe: alle data blir liggende i programmets egen datamappeBruk en maskinvarekoder når en støtter forhåndsinnstillingen, ellers programvareDe tre første navnene fra en eksempelimport med disse maleneMaskinvare for forhåndsvisninger, programvare for arkivforhåndsinnstillinger
- Langsiden på JPEG-proxyene som lages for nye sekvenser
- Balansert passer til det meste; Beste dobler samplingen og flytter aldri bilder ut av minnet; Rask er for forhåndsvisningerList opp koderne på nytt etter installasjon av en driver eller kodekTilbakestill alle kontroller i denne seksjonen til standardverdieneFinn en innstilling etter navn
diff --git a/i18n/nl/Tooltips.nl.resx b/i18n/nl/Tooltips.nl.resx
index 74d3db87..367ddcb3 100644
--- a/i18n/nl/Tooltips.nl.resx
+++ b/i18n/nl/Tooltips.nl.resx
@@ -508,7 +508,6 @@
Gevonden grafische adapter en Media Foundation-encodersVrije ruimte op het archiefstationHoofdmap van het lokale archief; bestanden worden niet verplaatst · Enter past toe, Esc maakt ongedaan
- Verlaag de taakprioriteit terwijl Titano op de voorgrond staat, zodat de interface vloeiend blijftKopieer de index naar de back-upmap; de drie nieuwste worden bewaard · enkele secondenKies de archiefmapKies de cachemap; een snelle SSD helpt
@@ -532,22 +531,17 @@
Auto: een kwart van het geïnstalleerde geheugenTerug naar Auto: een kwart van het geïnstalleerde geheugenOpen de gegevensmap in Verkenner
- Draagbare modus, logboeken, diagnose, databaseback-up
- Archiefmap, naamsjablonen, proxygrootteTaal, thema, gebruikstellingenKwaliteitsprofiel, geheugenbudget, parallellisme, encodersStandaardserver, renderknooppunt, vertrouwde certificatenCachemap, miniaturen in geheugen, cachelimietControleren op updates bij starten
- Werkthreads voor decoderen en verwerken · Enter past toe, Esc maakt ongedaanAuto: aantal kernen min vier, zodat de interface responsief blijftTerug naar Auto: aantal kernen min vierAan wanneer portable.txt naast Titano.exe staat: alle gegevens blijven in de bijbehorende gegevensmapGebruik een hardware-encoder als die de voorinstelling ondersteunt; anders softwareEerste drie namen van een voorbeeldimport met deze sjablonenHardware voor voorbeelden, software voor archiefvoorinstellingen
- Lange zijde van de JPEG-proxy's die voor nieuwe reeksen worden gemaakt
- Gebalanceerd past bij het meeste werk; Beste verdubbelt de sampling en schrijft nooit naar schijf weg; Snel is voor voorbeeldenToon de encoders opnieuw na installatie van een stuurprogramma of codecZet elk besturingselement van deze sectie terug op de standaardwaardeZoek een instelling op naam
diff --git a/i18n/pl/Tooltips.pl.resx b/i18n/pl/Tooltips.pl.resx
index 653098fe..7ce08783 100644
--- a/i18n/pl/Tooltips.pl.resx
+++ b/i18n/pl/Tooltips.pl.resx
@@ -538,7 +538,6 @@
Znaleziona karta graficzna i enkodery Media FoundationWolne miejsce na dysku archiwumKatalog główny archiwum lokalnego; pliki nie są przenoszone · Enter stosuje, Esc przywraca
- Obniżaj priorytet zadań, gdy Titano jest na pierwszym planie, aby interfejs pozostał płynnySkopiuj indeks do folderu kopii zapasowych; zachowywane są trzy najnowsze · kilka sekundWybierz folder archiwumWybierz folder pamięci podręcznej; szybki dysk SSD przyspiesza pracę
@@ -562,22 +561,17 @@
Auto: jedna czwarta zainstalowanej pamięciPrzywróć Auto: jedna czwarta zainstalowanej pamięciOtwórz folder danych w Eksploratorze
- Tryb przenośny, dzienniki, diagnostyka, kopia zapasowa bazy danych
- Folder archiwum, szablony nazw, rozmiar proxyJęzyk, motyw, statystyki użyciaProfil jakości, budżet pamięci, równoległość, enkoderySerwer domyślny, węzeł renderowania, zaufane certyfikatyFolder pamięci podręcznej, miniatury w pamięci, limit pamięci podręcznejSprawdzanie aktualizacji przy uruchomieniu
- Wątki robocze do dekodowania i przetwarzania · Enter stosuje, Esc przywracaAuto: liczba rdzeni minus cztery, aby interfejs pozostał responsywnyPrzywróć Auto: liczba rdzeni minus czteryWłączony, gdy obok Titano.exe znajduje się plik portable.txt: wszystkie dane pozostają w jego folderze danychUżywaj enkodera sprzętowego, jeśli obsługuje on preset; w przeciwnym razie programowegoPierwsze trzy nazwy przykładowego importu z tymi szablonamiSprzętowe do podglądów, programowe dla presetów archiwalnych
- Dłuższy bok plików proxy JPEG tworzonych dla nowych sekwencji
- Zrównoważony sprawdza się w większości prac; Najlepszy podwaja próbkowanie i nigdy nie przenosi klatek na dysk; Szybki służy do podglądówPonownie wyświetl listę enkoderów po instalacji sterownika lub kodekaPrzywróć wartości domyślne wszystkich kontrolek w tej sekcjiZnajdź ustawienie według nazwy
diff --git a/i18n/pt-BR/Tooltips.pt-BR.resx b/i18n/pt-BR/Tooltips.pt-BR.resx
index ecc1f6bc..246101a2 100644
--- a/i18n/pt-BR/Tooltips.pt-BR.resx
+++ b/i18n/pt-BR/Tooltips.pt-BR.resx
@@ -508,7 +508,6 @@
Adaptador gráfico e codificadores Media Foundation encontradosEspaço livre na unidade do acervoRaiz do acervo local; os arquivos não são movidos · Enter aplica, Esc reverte
- Reduz a prioridade das tarefas enquanto o Titano está em primeiro plano, para a interface continuar fluidaCopia o índice para a pasta de backups; os três mais recentes são mantidos · alguns segundosEscolhe a pasta do acervoEscolhe a pasta do cache; um SSD rápido ajuda
@@ -532,22 +531,17 @@
Auto: um quarto da memória instaladaVolta para Auto: um quarto da memória instaladaAbre a pasta de dados no Explorador de Arquivos
- Modo portátil, logs, diagnóstico, backup do banco de dados
- Pasta do acervo, modelos de nomes, tamanho do proxyIdioma, tema, contagens de usoPerfil de qualidade, limite de memória, paralelismo, codificadoresServidor padrão, nó de renderização, certificados confiáveisPasta do cache, miniaturas na memória, limite do cacheVerificação de atualizações ao iniciar
- Threads de trabalho para decodificação e processamento · Enter aplica, Esc reverteAuto: núcleos menos quatro, para a interface continuar responsivaVolta para Auto: núcleos menos quatroAtivado quando portable.txt está ao lado de Titano.exe: todos os dados ficam na pasta data deleUsa um codificador de hardware quando algum suporta a predefinição; caso contrário, softwareOs três primeiros nomes de uma importação de exemplo com estes modelosHardware para prévias, software para predefinições de acervo
- Lado maior dos proxies JPEG criados para novas sequências
- Equilibrado serve para a maioria dos trabalhos; Melhor dobra a amostragem e nunca usa o cache em disco; Rápido é para préviasLista os codificadores de novo após instalar um driver ou codecRestaura o valor padrão de todos os controles desta seçãoEncontra uma configuração pelo nome
diff --git a/i18n/pt-PT/Tooltips.pt-PT.resx b/i18n/pt-PT/Tooltips.pt-PT.resx
index 55b1ea00..fbb8b59d 100644
--- a/i18n/pt-PT/Tooltips.pt-PT.resx
+++ b/i18n/pt-PT/Tooltips.pt-PT.resx
@@ -508,7 +508,6 @@
Placa gráfica e codificadores Media Foundation encontradosEspaço livre na unidade do arquivoRaiz do arquivo local; os ficheiros não são movidos · Enter aplica, Esc reverte
- Reduzir a prioridade das tarefas enquanto o Titano está em primeiro plano, para que a interface se mantenha fluidaCopiar o índice para a pasta de cópias de segurança; são mantidas as três mais recentes · alguns segundosEscolher a pasta do arquivoEscolher a pasta da cache; um SSD rápido ajuda
@@ -532,22 +531,17 @@
Auto: um quarto da memória instaladaVoltar a Auto: um quarto da memória instaladaAbrir a pasta de dados no Explorador de Ficheiros
- Modo portátil, registos, diagnóstico, cópia de segurança da base de dados
- Pasta do arquivo, modelos de nomes, tamanho do proxyIdioma, tema, contagens de utilizaçãoPerfil de qualidade, limite de memória, paralelismo, codificadoresServidor predefinido, nó de renderização, certificados fidedignosPasta da cache, miniaturas em memória, limite da cacheVerificação de atualizações ao iniciar
- Threads de trabalho para descodificação e processamento · Enter aplica, Esc reverteAuto: número de núcleos menos quatro, para que a interface continue a responderVoltar a Auto: número de núcleos menos quatroAtivado quando o portable.txt está junto ao Titano.exe: todos os dados ficam na respetiva pasta de dadosUtilizar um codificador de hardware quando algum suporta a predefinição; caso contrário, softwareOs três primeiros nomes de uma importação de exemplo com estes modelosHardware para pré-visualizações, software para as predefinições de arquivo
- Lado maior dos proxies JPEG criados para novas sequências
- «Equilibrado» serve para a maioria dos trabalhos; «Melhor» duplica a amostragem e nunca recorre ao disco; «Rápido» destina-se a pré-visualizaçõesListar novamente os codificadores após instalar um controlador ou codecRepor o valor predefinido de todos os controlos desta secçãoEncontrar uma definição pelo nome
diff --git a/i18n/ro/Tooltips.ro.resx b/i18n/ro/Tooltips.ro.resx
index 262438d3..aab545ee 100644
--- a/i18n/ro/Tooltips.ro.resx
+++ b/i18n/ro/Tooltips.ro.resx
@@ -523,7 +523,6 @@
Placa grafică și codificatoarele Media Foundation găsiteSpațiul liber pe unitatea arhiveiRădăcina arhivei locale; fișierele nu sunt mutate · Enter aplică, Esc anulează
- Reduceți prioritatea lucrărilor cât timp Titano este în prim-plan, pentru ca interfața să rămână fluidăCopiați indexul în folderul de copii de rezervă; se păstrează cele mai recente trei · câteva secundeAlegeți folderul arhiveiAlegeți folderul cache; un SSD rapid ajută
@@ -547,22 +546,17 @@
Auto: un sfert din memoria instalatăRevenire la Auto: un sfert din memoria instalatăDeschideți folderul de date în Explorer
- Mod portabil, jurnale, diagnosticare, copie de rezervă a bazei de date
- Folderul arhivei, șabloane de denumire, dimensiunea proxy-urilorLimbă, temă, statistici de utilizareProfil de calitate, limită de memorie, paralelism, codificatoareServer implicit, nod de randare, certificate de încredereFolderul cache, miniaturi în memorie, limita cacheVerificarea actualizărilor la pornire
- Fire de execuție pentru decodare și procesare · Enter aplică, Esc anuleazăAuto: numărul de nuclee minus patru, pentru ca interfața să rămână receptivăRevenire la Auto: numărul de nuclee minus patruActivat când portable.txt se află lângă Titano.exe: toate datele rămân în folderul său de dateFolosiți un codificator hardware când acesta acceptă presetarea; altfel, softwarePrimele trei nume ale unui import de probă cu aceste șabloaneHardware pentru previzualizări, software pentru presetările de arhivă
- Latura lungă a proxy-urilor JPEG create pentru secvențele noi
- Echilibrat se potrivește majorității lucrărilor; Calitate maximă dublează eșantionarea și nu mută niciodată cadre pe disc; Rapid este pentru previzualizăriListați din nou codificatoarele după instalarea unui driver sau a unui codecReaduceți fiecare control din această secțiune la valoarea implicităGăsiți o setare după nume
diff --git a/i18n/ru/Tooltips.ru.resx b/i18n/ru/Tooltips.ru.resx
index 8692d2c1..13957f60 100644
--- a/i18n/ru/Tooltips.ru.resx
+++ b/i18n/ru/Tooltips.ru.resx
@@ -538,7 +538,6 @@
Найденный графический адаптер и кодировщики Media FoundationСвободное место на диске архиваКорневая папка локального архива; файлы не перемещаются · Enter — применить, Esc — отменить
- Понижать приоритет заданий, пока Titano на переднем плане, чтобы интерфейс оставался плавнымСкопировать индекс в папку резервных копий; хранятся три последние · несколько секундВыбрать папку архиваВыбрать папку кэша; быстрый SSD ускоряет работу
@@ -562,22 +561,17 @@
Авто: четверть установленной памятиВернуть «Авто»: четверть установленной памятиОткрыть папку данных в проводнике
- Портативный режим, журналы, диагностика, резервная копия базы данных
- Папка архива, шаблоны имён, размер проксиЯзык, тема, статистика использованияПрофиль качества, лимит памяти, параллелизм, кодировщикиСервер по умолчанию, узел рендеринга, доверенные сертификатыПапка кэша, эскизы в памяти, лимит кэшаПроверка обновлений при запуске
- Рабочие потоки для декодирования и обработки · Enter — применить, Esc — отменитьАвто: число ядер минус четыре, чтобы интерфейс оставался отзывчивымВернуть «Авто»: число ядер минус четыреВключён, если рядом с Titano.exe лежит portable.txt: все данные хранятся в его папке данныхИспользовать аппаратный кодировщик, если он поддерживает пресет; иначе программныйПервые три имени примерного импорта с этими шаблонамиАппаратное кодирование для предпросмотра, программное — для архивных пресетов
- Длинная сторона JPEG-прокси, создаваемых для новых серий
- «Сбалансированный» подходит для большинства задач; «Наилучший» удваивает выборку и никогда не выгружает кадры на диск; «Быстрый» — для предпросмотраЗаново составить список кодировщиков после установки драйвера или кодекаВернуть все элементы этого раздела к значениям по умолчаниюНайти параметр по названию
diff --git a/i18n/sk/Tooltips.sk.resx b/i18n/sk/Tooltips.sk.resx
index 4e3b1ab7..911557b5 100644
--- a/i18n/sk/Tooltips.sk.resx
+++ b/i18n/sk/Tooltips.sk.resx
@@ -523,7 +523,6 @@
Nájdený grafický adaptér a kodéry Media FoundationVoľné miesto na jednotke archívuKoreňový priečinok lokálneho archívu; súbory sa nepresúvajú · Enter použije, Esc vráti späť
- Zníži prioritu úloh, keď je Titano v popredí, aby rozhranie zostalo plynuléSkopíruje index do priečinka záloh; ponechajú sa tri najnovšie · niekoľko sekúndOtvorí výber priečinka archívuOtvorí výber priečinka vyrovnávacej pamäte; pomôže rýchly disk SSD
@@ -547,22 +546,17 @@
Auto: štvrtina nainštalovanej pamäteSpäť na Auto: štvrtina nainštalovanej pamäteOtvorí priečinok údajov v Prieskumníkovi
- Prenosný režim, denníky, diagnostika, záloha databázy
- Priečinok archívu, šablóny názvov, veľkosť proxyJazyk, motív, štatistiky používaniaProfil kvality, limit pamäte, paralelizmus, kodéryPredvolený server, renderovací uzol, dôveryhodné certifikátyPriečinok vyrovnávacej pamäte, miniatúry v pamäti, limit vyrovnávacej pamäteKontrola aktualizácií pri spustení
- Pracovné vlákna na dekódovanie a spracovanie · Enter použije, Esc vráti späťAuto: počet jadier mínus štyri, aby rozhranie pohotovo reagovaloSpäť na Auto: počet jadier mínus štyriZapnutý, keď je vedľa Titano.exe súbor portable.txt: všetky údaje zostávajú v jeho priečinku údajovPoužije hardvérový kodér, ak niektorý podporuje predvoľbu; inak softvérovýPrvé tri názvy vzorového importu s týmito šablónamiHardvér na náhľady, softvér na archívne predvoľby
- Dlhšia strana proxy JPEG vytváraných pre nové sekvencie
- Vyvážený vyhovuje väčšine práce; Najlepší zdvojnásobí vzorkovanie a nikdy neodkladá na disk; Rýchly je na náhľadyZnova zistí kodéry po inštalácii ovládača alebo kodekuVráti všetky ovládacie prvky tejto sekcie na predvolené hodnotyVyhľadá nastavenie podľa názvu
diff --git a/i18n/sl/Tooltips.sl.resx b/i18n/sl/Tooltips.sl.resx
index 2f38c040..7bc2c18f 100644
--- a/i18n/sl/Tooltips.sl.resx
+++ b/i18n/sl/Tooltips.sl.resx
@@ -523,7 +523,6 @@
Najdeni grafični vmesnik in kodirniki Media FoundationProsti prostor na pogonu arhivaKoren lokalnega arhiva; datoteke se ne premaknejo · Enter uveljavi, Esc razveljavi
- Znižaj prednost opravil, ko je Titano v ospredju, da vmesnik ostane tekočKopiraj indeks v mapo z varnostnimi kopijami; hranijo se tri najnovejše · nekaj sekundIzberi mapo arhivaIzberi mapo predpomnilnika; hiter SSD pomaga
@@ -547,22 +546,17 @@
Samodejno: četrtina nameščenega pomnilnikaNazaj na samodejno: četrtina nameščenega pomnilnikaOdpri mapo s podatki v Raziskovalcu
- Prenosni način, dnevniki, diagnostika, varnostna kopija zbirke podatkov
- Mapa arhiva, predloge za poimenovanje, velikost proxyjevJezik, tema, statistika uporabeProfil kakovosti, omejitev pomnilnika, vzporednost, kodirnikiPrivzeti strežnik, vozlišče za upodabljanje, zaupanja vredna potrdilaMapa predpomnilnika, miniature v pomnilniku, omejitev predpomnilnikaPreverjanje posodobitev ob zagonu
- Niti delovnih procesov za dekodiranje in obdelavo · Enter uveljavi, Esc razveljaviSamodejno: jedra minus štiri, da se vmesnik še naprej odzivaNazaj na samodejno: jedra minus štiriVklopljeno, ko je portable.txt poleg Titano.exe: vsi podatki ostanejo v njegovi mapi s podatkiUporabi strojni kodirnik, kadar podpira prednastavitev, sicer programskegaPrva tri imena vzorčnega uvoza s temi predlogamiStrojno za predoglede, programsko za arhivske prednastavitve
- Daljša stranica proxyjev JPEG, ki se ustvarijo za nove sekvence
- »Uravnoteženo« ustreza večini dela; »Najboljše« podvoji vzorčenje in nikoli ne odlaga na disk; »Hitro« je za predogledeZnova poišči kodirnike po namestitvi gonilnika ali kodekaVrni vse kontrolnike tega razdelka na privzete vrednostiPoišči nastavitev po imenu
diff --git a/i18n/sv/Tooltips.sv.resx b/i18n/sv/Tooltips.sv.resx
index 75b8ef13..11a55726 100644
--- a/i18n/sv/Tooltips.sv.resx
+++ b/i18n/sv/Tooltips.sv.resx
@@ -508,7 +508,6 @@
Grafikkort och Media Foundation-kodare som hittatsLedigt utrymme på arkivenhetenRot för det lokala arkivet; filer flyttas inte · Enter tillämpar, Esc återställer
- Sänk jobbprioriteten medan Titano är i förgrunden så att gränssnittet förblir smidigtKopiera indexet till mappen för säkerhetskopior; de tre senaste sparas · några sekunderVälj arkivmappenVälj cachemappen; en snabb SSD hjälper
@@ -532,22 +531,17 @@
Auto: en fjärdedel av det installerade minnetTillbaka till Auto: en fjärdedel av det installerade minnetÖppna datamappen i Utforskaren
- Portabelt läge, loggar, diagnostik, säkerhetskopiering av databasen
- Arkivmapp, namngivningsmallar, proxystorlekSpråk, tema, användningsstatistikKvalitetsprofil, minnesbudget, parallellitet, kodareStandardserver, renderingsnod, betrodda certifikatCachemapp, miniatyrer i minnet, cachegränsSök efter uppdateringar vid start
- Arbetstrådar för avkodning och bearbetning · Enter tillämpar, Esc återställerAuto: antal kärnor minus fyra så att gränssnittet förblir responsivtTillbaka till Auto: antal kärnor minus fyraPå när portable.txt ligger bredvid Titano.exe: alla data stannar i dess datamappAnvänd en maskinvarukodare när någon stöder förinställningen; annars programvaraDe tre första namnen i en exempelimport med de här mallarnaMaskinvara för förhandsvisningar, programvara för arkivförinställningar
- Långsidan på de JPEG-proxyer som skapas för nya sekvenser
- Balanserad passar det mesta; Bästa fördubblar samplingen och flyttar aldrig ut till disk; Snabb är för förhandsvisningarLista kodarna igen efter installation av en drivrutin eller codecÅterställ alla kontroller i det här avsnittet till standardvärdetHitta en inställning efter namn
diff --git a/i18n/th/Tooltips.th.resx b/i18n/th/Tooltips.th.resx
index 795e7462..0f4ca9e7 100644
--- a/i18n/th/Tooltips.th.resx
+++ b/i18n/th/Tooltips.th.resx
@@ -508,7 +508,6 @@
การ์ดแสดงผลและตัวเข้ารหัส Media Foundation ที่พบพื้นที่ว่างบนไดรฟ์ของคลังภาพรากของคลังภาพในเครื่อง ไฟล์จะไม่ถูกย้าย · Enter เพื่อใช้ Esc เพื่อย้อนกลับ
- ลดลำดับความสำคัญของงานขณะ Titano อยู่ด้านหน้า เพื่อให้อินเทอร์เฟซลื่นไหลคัดลอกดัชนีไปยังโฟลเดอร์สำรองข้อมูล โดยเก็บไว้สามชุดล่าสุด · ใช้เวลาไม่กี่วินาทีเลือกโฟลเดอร์คลังภาพเลือกโฟลเดอร์แคช SSD ที่เร็วจะช่วยได้
@@ -532,22 +531,17 @@
อัตโนมัติ: หนึ่งในสี่ของหน่วยความจำที่ติดตั้งกลับเป็นอัตโนมัติ: หนึ่งในสี่ของหน่วยความจำที่ติดตั้งเปิดโฟลเดอร์ข้อมูลในตัวสำรวจไฟล์
- โหมดพกพา ไฟล์บันทึก การวินิจฉัย การสำรองฐานข้อมูล
- โฟลเดอร์คลังภาพ เทมเพลตการตั้งชื่อ ขนาดพร็อกซีภาษา ธีม สถิติการใช้งานโปรไฟล์คุณภาพ งบหน่วยความจำ การประมวลผลแบบขนาน ตัวเข้ารหัสเซิร์ฟเวอร์เริ่มต้น โหนดเรนเดอร์ ใบรับรองที่เชื่อถือโฟลเดอร์แคช ภาพขนาดย่อในหน่วยความจำ ขีดจำกัดแคชตรวจหาการอัปเดตเมื่อเริ่มต้น
- เธรดทำงานสำหรับการถอดรหัสและการประมวลผล · Enter เพื่อใช้ Esc เพื่อย้อนกลับอัตโนมัติ: จำนวนคอร์ลบสี่ เพื่อให้อินเทอร์เฟซตอบสนองได้ดีกลับเป็นอัตโนมัติ: จำนวนคอร์ลบสี่เปิดเมื่อมี portable.txt อยู่ข้าง Titano.exe: ข้อมูลทั้งหมดจะอยู่ในโฟลเดอร์ข้อมูลของโปรแกรมใช้ตัวเข้ารหัสฮาร์ดแวร์เมื่อมีตัวที่รองรับพรีเซ็ต มิฉะนั้นใช้ซอฟต์แวร์สามชื่อแรกของการนำเข้าตัวอย่างด้วยเทมเพลตเหล่านี้ฮาร์ดแวร์สำหรับการแสดงตัวอย่าง ซอฟต์แวร์สำหรับพรีเซ็ตเก็บถาวร
- ด้านยาวของพร็อกซี JPEG ที่สร้างสำหรับซีเควนซ์ใหม่
- “สมดุล” เหมาะกับงานส่วนใหญ่ “ดีที่สุด” สุ่มตัวอย่างเป็นสองเท่าและไม่ล้นไปยังดิสก์ “เร็ว” ใช้สำหรับการแสดงตัวอย่างแสดงรายการตัวเข้ารหัสอีกครั้งหลังติดตั้งไดรเวอร์หรือโคเดกคืนค่าทุกตัวควบคุมในส่วนนี้เป็นค่าเริ่มต้นค้นหาการตั้งค่าตามชื่อ
diff --git a/i18n/tr/Tooltips.tr.resx b/i18n/tr/Tooltips.tr.resx
index 6b716a11..1cdc2ae6 100644
--- a/i18n/tr/Tooltips.tr.resx
+++ b/i18n/tr/Tooltips.tr.resx
@@ -508,7 +508,6 @@
Bulunan grafik bağdaştırıcısı ve Media Foundation kodlayıcılarıArşiv sürücüsündeki boş alanYerel arşivin kök klasörü; dosyalar taşınmaz · Enter uygular, Esc geri alır
- Titano öndeyken arayüz akıcı kalsın diye görev önceliğini düşürürDizini yedekler klasörüne kopyalar; en yeni üç yedek saklanır · birkaç saniyeArşiv klasörünü seçerÖnbellek klasörünü seçer; hızlı bir SSD işe yarar
@@ -532,22 +531,17 @@
Otomatik: yüklü belleğin dörtte biriOtomatiğe dön: yüklü belleğin dörtte biriVeri klasörünü Dosya Gezgini'nde açar
- Taşınabilir mod, günlükler, tanılama, veritabanı yedeği
- Arşiv klasörü, adlandırma şablonları, proxy boyutuDil, tema, kullanım sayılarıKalite profili, bellek bütçesi, paralellik, kodlayıcılarVarsayılan sunucu, işleme düğümü, güvenilen sertifikalarÖnbellek klasörü, bellekteki küçük resimler, önbellek sınırıBaşlangıçta güncelleme denetimi
- Kod çözme ve hesaplama için iş parçacıkları · Enter uygular, Esc geri alırOtomatik: arayüz duyarlı kalsın diye çekirdek sayısı eksi dörtOtomatiğe dön: çekirdek sayısı eksi dörtTitano.exe dosyasının yanında portable.txt varsa açıktır: tüm veriler onun veri klasöründe kalırHazır ayarı destekleyen bir donanım kodlayıcısı varsa onu, yoksa yazılımı kullanırBu şablonlarla örnek bir içe aktarmanın ilk üç adıÖnizlemeler için donanım, arşiv hazır ayarları için yazılım
- Yeni sekanslar için oluşturulan JPEG proxy'lerin uzun kenarı
- Dengeli çoğu iş için uygundur; En iyi örneklemeyi ikiye katlar ve hiç diske taşmaz; Hızlı önizlemeler içindirSürücü veya codec kurulumundan sonra kodlayıcıları yeniden listelerBu bölümdeki tüm denetimleri varsayılanlarına döndürürBir ayarı adına göre bulur
diff --git a/i18n/uk/Tooltips.uk.resx b/i18n/uk/Tooltips.uk.resx
index 917ef314..63e5d89d 100644
--- a/i18n/uk/Tooltips.uk.resx
+++ b/i18n/uk/Tooltips.uk.resx
@@ -538,7 +538,6 @@
Знайдені графічний адаптер і кодувальники Media FoundationВільне місце на диску архівуКорінь локального архіву; файли не переміщуються · Enter застосовує, Esc скасовує
- Знижувати пріоритет завдань, поки Titano на передньому плані, щоб інтерфейс працював плавноСкопіювати індекс до папки резервних копій; зберігаються три найновіші · кілька секундВибрати папку архівуВибрати папку кешу; бажано на швидкому SSD
@@ -562,22 +561,17 @@
Авто: чверть установленої пам’ятіПовернути «Авто»: чверть установленої пам’ятіВідкрити папку даних у Провіднику
- Портативний режим, журнали, діагностика, резервна копія бази даних
- Папка архіву, шаблони імен, розмір проксіМова, тема, статистика використанняПрофіль якості, бюджет пам’яті, паралелізм, кодувальникиСервер за замовчуванням, вузол рендерингу, довірені сертифікатиПапка кешу, мініатюри в пам’яті, ліміт кешуПеревірка оновлень під час запуску
- Робочі потоки для декодування та обробки · Enter застосовує, Esc скасовуєАвто: кількість ядер мінус чотири, щоб інтерфейс залишався чутливимПовернути «Авто»: кількість ядер мінус чотириУвімкнено, коли portable.txt лежить поруч із Titano.exe: усі дані зберігаються в його папці данихВикористовувати апаратний кодувальник, якщо він підтримує пресет; інакше — програмнийПерші три імені зразкового імпорту з цими шаблонамиАпаратне кодування для попереднього перегляду, програмне — для архівних пресетів
- Довга сторона JPEG-проксі, що створюються для нових послідовностей
- «Збалансований» підходить для більшості робіт; «Найкращий» подвоює вибірку й ніколи не скидає кадри на диск; «Швидкий» — для попереднього переглядуЗнову скласти список кодувальників після встановлення драйвера чи кодекаПовернути всі елементи цього розділу до стандартних значеньЗнайти параметр за назвою
diff --git a/i18n/vi/Tooltips.vi.resx b/i18n/vi/Tooltips.vi.resx
index feb719c5..69d7b16e 100644
--- a/i18n/vi/Tooltips.vi.resx
+++ b/i18n/vi/Tooltips.vi.resx
@@ -508,7 +508,6 @@
Bộ điều hợp đồ họa và các bộ mã hóa Media Foundation đã tìm thấyDung lượng trống trên ổ đĩa kho lưu trữThư mục gốc của kho lưu trữ cục bộ; tệp không bị di chuyển · Enter để áp dụng, Esc để hoàn tác
- Giảm mức ưu tiên tác vụ khi cửa sổ Titano đang ở phía trước để giao diện luôn mượt màSao chép chỉ mục vào thư mục sao lưu; giữ lại ba bản mới nhất · mất vài giâyChọn thư mục kho lưu trữChọn thư mục bộ nhớ đệm; nên dùng SSD nhanh
@@ -532,22 +531,17 @@
Tự động: một phần tư bộ nhớ đã lắpVề Tự động: một phần tư bộ nhớ đã lắpMở thư mục dữ liệu trong Explorer
- Chế độ di động, nhật ký, chẩn đoán, sao lưu cơ sở dữ liệu
- Thư mục kho lưu trữ, mẫu đặt tên, kích thước proxyNgôn ngữ, chủ đề, số liệu sử dụngHồ sơ chất lượng, giới hạn bộ nhớ, mức song song, bộ mã hóaMáy chủ mặc định, nút kết xuất, chứng chỉ tin cậyThư mục bộ nhớ đệm, hình thu nhỏ trong bộ nhớ, giới hạn bộ nhớ đệmKiểm tra cập nhật khi khởi động
- Số luồng xử lý để giải mã và xử lý · Enter để áp dụng, Esc để hoàn tácTự động: số lõi trừ bốn để giao diện luôn phản hồi nhanhVề Tự động: số lõi trừ bốnBật khi có portable.txt nằm cạnh Titano.exe: mọi dữ liệu nằm trong thư mục dữ liệu của nóDùng bộ mã hóa phần cứng khi có bộ hỗ trợ cài đặt sẵn; nếu không thì dùng phần mềmBa tên đầu tiên của một lượt nhập mẫu với các mẫu nàyPhần cứng cho xem trước, phần mềm cho cài đặt sẵn lưu trữ
- Cạnh dài của proxy JPEG được tạo cho chuỗi ảnh mới
- Cân bằng phù hợp với hầu hết công việc; Tốt nhất tăng gấp đôi lấy mẫu và không bao giờ tràn ra đĩa; Nhanh dùng cho xem trướcLiệt kê lại các bộ mã hóa sau khi cài trình điều khiển hoặc codecĐưa mọi điều khiển trong mục này về giá trị mặc địnhTìm cài đặt theo tên
diff --git a/i18n/zh-Hans/Tooltips.zh-Hans.resx b/i18n/zh-Hans/Tooltips.zh-Hans.resx
index cb6002f8..42702e75 100644
--- a/i18n/zh-Hans/Tooltips.zh-Hans.resx
+++ b/i18n/zh-Hans/Tooltips.zh-Hans.resx
@@ -508,7 +508,6 @@
找到的图形适配器和 Media Foundation 编码器档案库所在驱动器的可用空间本地档案库的根文件夹;文件不会被移动 · Enter 应用,Esc 还原
- Titano 位于前台时降低任务优先级,使界面保持流畅将索引复制到备份文件夹;保留最新的三份 · 需要几秒钟选择档案库文件夹选择缓存文件夹;使用快速的 SSD 效果更好
@@ -532,22 +531,17 @@
自动:已安装内存的四分之一恢复自动:已安装内存的四分之一在资源管理器中打开数据文件夹
- 便携模式、日志、诊断、数据库备份
- 档案库文件夹、命名模板、代理尺寸语言、主题、使用统计质量模式、内存预算、并行度、编码器默认服务器、渲染节点、受信任的证书缓存文件夹、内存中的缩略图、缓存上限启动时检查更新
- 用于解码和处理的工作线程数 · Enter 应用,Esc 还原自动:核心数减四,使界面保持响应恢复自动:核心数减四当 portable.txt 与 Titano.exe 位于同一文件夹时开启:所有数据都保存在其数据文件夹中有硬件编码器支持该预设时使用硬件编码器,否则使用软件编码使用这些模板时示例导入的前三个名称预览使用硬件编码,存档预设使用软件编码
- 为新序列生成的 JPEG 代理的长边尺寸
- “均衡”适合大多数工作;“最佳”采样加倍且从不溢出;“快速”用于预览安装驱动程序或编解码器后重新列出编码器将此部分的所有控件恢复为默认值按名称查找设置
diff --git a/i18n/zh-Hant/Tooltips.zh-Hant.resx b/i18n/zh-Hant/Tooltips.zh-Hant.resx
index 793edffb..15791c61 100644
--- a/i18n/zh-Hant/Tooltips.zh-Hant.resx
+++ b/i18n/zh-Hant/Tooltips.zh-Hant.resx
@@ -508,7 +508,6 @@
找到的顯示卡與 Media Foundation 編碼器典藏庫所在磁碟機的可用空間本機典藏庫的根目錄;檔案不會被移動 · Enter 套用,Esc 還原
- Titano 位於前景時降低工作優先順序,讓介面保持流暢將索引複製到備份資料夾;保留最新的三份 · 需要幾秒鐘選擇典藏庫資料夾選擇快取資料夾;使用高速 SSD 會有幫助
@@ -532,22 +531,17 @@
自動:已安裝記憶體的四分之一恢復自動:已安裝記憶體的四分之一在檔案總管中開啟資料位置
- 可攜式模式、記錄、診斷、資料庫備份
- 典藏庫資料夾、命名範本、代理檔大小語言、佈景主題、使用統計品質設定檔、記憶體上限、平行處理、編碼器預設伺服器、算圖節點、信任的憑證快取資料夾、記憶體中的縮圖、快取上限啟動時檢查更新
- 用於解碼與處理的工作執行緒 · Enter 套用,Esc 還原自動:核心數減四,讓介面保持回應恢復自動:核心數減四當 portable.txt 與 Titano.exe 位於同一資料夾時開啟:所有資料都保留在其 data 資料夾中預設集支援時使用硬體編碼器;否則使用軟體以這些範本進行範例匯入時的前三個名稱預覽使用硬體,典藏預設集使用軟體
- 為新序列建立的 JPEG 代理檔長邊尺寸
- 「平衡」適合大多數工作;「最佳」會將取樣加倍且永不溢出;「快速」適用於預覽安裝驅動程式或編解碼器後,重新列出編碼器將此區段的所有控制項恢復為預設值依名稱尋找設定
diff --git a/src/Titano.App/DesignTime/SampleData.cs b/src/Titano.App/DesignTime/SampleData.cs
index 828dcccd..31096066 100644
--- a/src/Titano.App/DesignTime/SampleData.cs
+++ b/src/Titano.App/DesignTime/SampleData.cs
@@ -62,6 +62,7 @@ public sealed class SampleData
services.Server.Dispose();
services.Server = new ServerSession(settings, services.SaveSettings, new SampleServerApiFactory(sample), new PlainTokenProtector());
services.Encoders = new SampleEncoders();
+ services.Formats = new SampleFormats();
services.CheckForUpdateAsync = _ => Task.FromResult(null);
services.Devices.Dispose();
services.Devices = new SampleDeviceMonitor();
@@ -859,4 +860,30 @@ public sealed class SampleData
_ => new SelfTestResult(true, 64, null),
});
}
+
+ /// A PC with the HEVC Video Extensions but without the Raw Image and HEIF extensions: RAW files decode through
+ /// Titano's own developers or their previews, HEIF only through its preview (Settings › Formats and its notice).
+ private sealed class SampleFormats : IFormatInventory
+ {
+ private static readonly Core.Windows.Codecs.StoreExtension Raw = Core.Windows.Codecs.StoreExtension.Get(Core.Windows.Codecs.StoreExtensionKind.RawImage);
+ private static readonly Core.Windows.Codecs.StoreExtension Heif = Core.Windows.Codecs.StoreExtension.Get(Core.Windows.Codecs.StoreExtensionKind.HeifImage);
+ private static readonly Core.Windows.Codecs.StoreExtension Webp = Core.Windows.Codecs.StoreExtension.Get(Core.Windows.Codecs.StoreExtensionKind.WebpImage);
+
+ public FormatReport Detect(bool refresh) => new(
+ [
+ .. DecoderFactory.DescribeFormats(DecoderFactory.CreateClient(null)).Select(f => new FormatRow(f.Format, f.Tier, f.Provider, f.Format.Format switch
+ {
+ _ when f.Format.IsRaw => [Raw],
+ ImageFileFormat.Heif or ImageFileFormat.Avif => [Heif],
+ ImageFileFormat.WebP => [Webp],
+ _ => [],
+ })),
+ ],
+ [Raw, Heif, Webp]);
+
+ public void OpenStore(Core.Windows.Codecs.StoreExtension extension)
+ {
+ // Capture and smoke tests never open the Store.
+ }
+ }
}
diff --git a/src/Titano.App/Infrastructure/AppServices.cs b/src/Titano.App/Infrastructure/AppServices.cs
index 2c4fc936..83891860 100644
--- a/src/Titano.App/Infrastructure/AppServices.cs
+++ b/src/Titano.App/Infrastructure/AppServices.cs
@@ -26,21 +26,22 @@ using Titano.Protocol.Client;
namespace Titano.App.Infrastructure;
///
-/// Composition root of local mode (BRIEF §4.4): the SQLite index under the data folder (migrated on open), the
-/// archive engine (WIC first, then managed decoders), the analysis and render engine (the same decoders; Media
-/// Foundation, then managed encoders), the one of this PC with the handlers of
-/// , thumbnails, the server session, the render node, the encoder inventory, the
-/// update check and the sync with the signed-in server (). Started after the window shows,
-/// stopped when the app exits. The last archive is reopened at start and
-/// rescanned every (BRIEF §7: polling, no file-system watchers). The render node runs while
-/// the user offers this PC () and a server session is open (never in capture
-/// mode). Renders and the render node use hardware encoders as Settings › Rendering allows
-/// (). Disposal never needs the UI thread, which waits for it.
+/// Composition root of local mode (BRIEF §4.4): the SQLite index under the data folder (migrated on open, a restore
+/// staged in Settings › Advanced carried out first, then copied once a day into the backups folder), the archive engine
+/// (WIC first, then managed decoders), the analysis and render engine (the same decoders; Media Foundation, then
+/// managed encoders), the one of this PC with the handlers of ,
+/// thumbnails, the server session, the render node, the encoder and format inventories, the update check and the sync
+/// with the signed-in server (). Started after the window shows, stopped when the app exits. The
+/// last archive is reopened at start and rescanned every (Settings › Archive; BRIEF §7:
+/// polling, no file-system watchers). Jobs follow Settings › Rendering and Analysis from the next one on (memory
+/// budget, quality profile, analysis parameters through ; parallelism as the engine's
+/// workers). The render node runs while the user offers this PC () and a
+/// server session is open (never in capture mode). Renders and the render node use hardware encoders as Settings ›
+/// Rendering allows (). Disposal never needs the UI thread,
+/// which waits for it.
///
public sealed class AppServices : IAsyncDisposable
{
- public static readonly TimeSpan ScanInterval = TimeSpan.FromMinutes(10);
-
/// The quick preview preset: the one render "Hardware for previews only" leaves on the GPU.
private const string PreviewPresetId = "720p-preview";
@@ -51,6 +52,9 @@ public sealed class AppServices : IAsyncDisposable
private readonly CancellationTokenSource _stopping = new();
private readonly Dictionary _scans = [];
private Task _polling = Task.CompletedTask;
+ private Task _backups = Task.CompletedTask;
+ private PeriodicTimer? _pollTimer;
+ private WicDecoderProvider? _wic;
private readonly RenderNodeHost _renderNode;
private ServerSession _server = null!;
@@ -65,6 +69,7 @@ public sealed class AppServices : IAsyncDisposable
Sync = new SyncHost(this);
Server = new ServerSession(settings, saveSettings, new TitanoServerApiFactory(), new DpapiTokenProtector());
Encoders = new MediaFoundationInventory();
+ Formats = new WicFormatInventory(() => _wic);
CheckForUpdateAsync = ct => UpdateCheck.FetchAsync(Http.Value, ProductLinks.LatestReleaseApi, VersionText, ct);
DownloadUpdateAsync = (release, progress, ct) =>
UpdateDownload.DownloadAsync(DownloadHttp.Value, release, environment.IsPortable, UpdateDownload.Root(Path.GetTempPath()), VersionText, progress,
@@ -104,6 +109,15 @@ public sealed class AppServices : IAsyncDisposable
public IEncoderInventory Encoders { get; set; }
+ /// Decode tier per format on this PC and the missing codec extensions (Settings › Formats).
+ public IFormatInventory Formats { get; set; }
+
+ /// Time between the rescans of the open archive (Settings › Archive).
+ public TimeSpan ScanInterval => TimeSpan.FromMinutes(int.Clamp(Settings.ScanIntervalMinutes, 1, 24 * 60));
+
+ /// How the restore staged in Settings › Advanced went when the index opened; null when none was staged.
+ public StagedRestoreResult? StagedRestore { get; private set; }
+
/// Card detection, eject and format (BRIEF §13); started with the index, replaced by a fake in capture.
public IDeviceMonitor Devices { get; set; } = new WindowsDeviceMonitor();
@@ -140,7 +154,10 @@ public sealed class AppServices : IAsyncDisposable
.. services.Sync.Service?.CreateJobHandlers(services.Sync) ?? [],
];
- /// Queues a scan of unless one is already waiting or running.
+ ///
+ /// Queues a scan of unless one is already waiting or running; the sequences it indexes get
+ /// a background deep analysis when Settings › Analysis asks for it.
+ ///
public async Task QueueScanAsync(Archive archive, bool full, CancellationToken ct = default)
{
if (Engine is null || Database is null) return;
@@ -150,7 +167,7 @@ public sealed class AppServices : IAsyncDisposable
_scans.TryGetValue(archive.Id, out previous);
}
if (previous != Guid.Empty && await Database.Jobs.GetAsync(previous, ct) is { State: JobState.Queued or JobState.Running }) return;
- var job = await Engine.EnqueueAsync(ArchiveJobs.Scan(archive, full), cancellationToken: ct);
+ var job = await Engine.EnqueueAsync(ArchiveJobs.Scan(archive, full, Settings.DeepAnalysisAfterScan), cancellationToken: ct);
lock (_scans)
{
_scans[archive.Id] = job.Id;
@@ -161,8 +178,19 @@ public sealed class AppServices : IAsyncDisposable
{
SaveSettingsAction();
UpdateRenderNode();
+ ApplyJobSettings();
}
+ /// The parallelism of Settings › Rendering as the engine's workers, and the archive's rescan interval, now.
+ public void ApplyJobSettings()
+ {
+ Engine?.SetWorkers(Parallelism);
+ if (_pollTimer is { } timer && timer.Period != ScanInterval) timer.Period = ScanInterval;
+ }
+
+ /// Workers of this PC's job engine (Settings › Rendering › Parallelism, Auto: cores minus four).
+ public int Parallelism => ProcessingTuning.Parallelism(Settings, System.Environment.ProcessorCount);
+
/// Starts, restarts or stops the render node to match the opt-in, the server session and the trusted certificates (BRIEF §14.7).
public void UpdateRenderNode() =>
_renderNode.Update(RenderNodeSession.For(Settings.RenderNodeOptIn && Processing is not null && !Environment.IsCapture, _server.IsConnected,
@@ -176,7 +204,10 @@ public sealed class AppServices : IAsyncDisposable
_ => false,
};
- /// Opens (or creates) the index at , migrates it and starts the job engine.
+ ///
+ /// Opens (or creates) the index at , migrates it (after a restore staged in Settings ›
+ /// Advanced replaced it), starts the job engine and the daily backups.
+ ///
public async Task OpenAsync(string databasePath, CancellationToken ct = default)
{
try
@@ -190,9 +221,12 @@ public sealed class AppServices : IAsyncDisposable
Log.Error("app", "The index could not be opened", ex);
return;
}
+ await RestoreStagedAsync(Database, ct);
await StartJobsAsync(Database, startEngine: true, ct);
Thumbnails = new ThumbnailService(Database, Settings.ThumbnailMemoryItems);
Devices.Start();
+ var database = Database;
+ _backups = Task.Run(() => DatabaseBackups.RunDailyAsync(database, Environment.BackupDirectory, null, _stopping.Token));
if (Settings.LastArchivePath is { Length: > 0 } root) _polling = PollAsync(root, _stopping.Token);
}
@@ -210,6 +244,7 @@ public sealed class AppServices : IAsyncDisposable
{
await _stopping.CancelAsync().ConfigureAwait(false);
await _polling.ConfigureAwait(false);
+ await _backups.ConfigureAwait(false);
_stopping.Dispose();
_server.PropertyChanged -= OnServerChanged;
await _renderNode.DisposeAsync().ConfigureAwait(false);
@@ -230,7 +265,8 @@ public sealed class AppServices : IAsyncDisposable
{
if (Archives is null) return;
var archive = await Task.Run(() => Archives.OpenAsync(root, ct), ct).ConfigureAwait(false);
- using var timer = new PeriodicTimer(ScanInterval);
+ // Settings › Archive changes the period of this timer (ApplyJobSettings).
+ using var timer = _pollTimer = new PeriodicTimer(ScanInterval);
do
{
if (ArchiveService.GetAvailability(archive) == ArchiveAvailability.Online) await QueueScanAsync(archive, full: false, ct).ConfigureAwait(false);
@@ -244,30 +280,58 @@ public sealed class AppServices : IAsyncDisposable
{
Log.Warning("archive", $"The archive at {root} could not be opened", ex);
}
+ finally
+ {
+ _pollTimer = null;
+ }
+ }
+
+ /// A restore staged in Settings › Advanced replaces the index before anything reads it ().
+ private async Task RestoreStagedAsync(TitanoDatabase database, CancellationToken ct)
+ {
+ try
+ {
+ if (await Task.Run(() => DatabaseBackups.RestoreStagedAsync(database, Environment.BackupDirectory, ct), ct))
+ {
+ StagedRestore = StagedRestoreResult.Restored;
+ Log.Info("app", $"Index restored (schema {database.SchemaVersion})");
+ }
+ }
+ catch (InvalidDataException ex)
+ {
+ StagedRestore = StagedRestoreResult.Unreadable;
+ Log.Error("app", "The staged index copy failed its checks; it was set aside and the index kept", ex);
+ }
+ catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or DatabaseException)
+ {
+ StagedRestore = StagedRestoreResult.Deferred;
+ Log.Error("app", "The staged index restore could not run; the index was kept and the restore stays staged", ex);
+ }
}
private async Task StartJobsAsync(TitanoDatabase database, bool startEngine, CancellationToken ct)
{
- var archive = new ArchiveServiceOptions { Decoder = DecoderFactory.CreateClient(new WicDecoderProvider()) };
+ _wic = new WicDecoderProvider();
+ var archive = new ArchiveServiceOptions { Decoder = DecoderFactory.CreateClient(_wic) };
Archives = new ArchiveService(database, archive);
Processing = new ProcessingService(database, ProcessingOptions(archive));
Sync.Open(database, Archives, archive);
var handlers = CreateJobHandlers(this);
var kinds = handlers.Select(h => h.Kind).Distinct().ToArray();
- Engine = new JobEngine(database, handlers, new JobEngineOptions { WorkerId = WorkerId, Kinds = kinds });
+ Engine = new JobEngine(database, handlers, new JobEngineOptions { WorkerId = WorkerId, Kinds = kinds, Workers = Parallelism });
// Sync follows the engine's jobs before it runs any: a render resumed at start that finishes at once is still sent (Export "Sync").
Sync.Update();
// With no handler the engine must not run: an empty kind list would let workers claim (and fail) every job.
var started = startEngine && handlers.Count > 0;
if (started) await Engine.StartAsync(ct);
Jobs = new EngineJobQueue(database, Engine, started);
- Log.Info("jobs", started ? $"Job engine started with {Engine.Options.Workers} worker(s) for {string.Join(", ", kinds)}" : "No job handlers registered; jobs stay queued");
+ Log.Info("jobs", started ? $"Job engine started with {Engine.Workers} worker(s) for {string.Join(", ", kinds)}" : "No job handlers registered; jobs stay queued");
UpdateRenderNode();
}
/// Media Foundation (hardware first, software H.264; hardware as Settings › Rendering allows) then managed
- /// encoders; frames spill into the cache folder within the memory budget of Settings › Rendering (Auto: a quarter of
- /// the installed memory).
+ /// encoders; at the start of each job the options take the current Settings › Rendering and Analysis (memory budget,
+ /// Auto a quarter of the installed memory; cache folder; quality profile; parallelism; analysis width and thresholds).
private ProcessingOptions ProcessingOptions(ArchiveServiceOptions archive) => new()
{
Archive = archive,
@@ -275,11 +339,8 @@ public sealed class AppServices : IAsyncDisposable
AllowsHardware = presetId => AllowsHardware(Settings.HardwareEncoding, presetId),
Host = EncoderHost.Client,
ProducedBy = System.Environment.MachineName,
- FrameWindow = new FrameWindowOptions
- {
- MemoryBudget = Settings.MemoryBudgetGb is { } gb ? gb * (1L << 30) : GC.GetGCMemoryInfo().TotalAvailableMemoryBytes / 4,
- SpillDirectory = CacheStore.Folder(Environment, Settings),
- },
+ Tune = basis => ProcessingTuning.Apply(basis, Settings, GC.GetGCMemoryInfo().TotalAvailableMemoryBytes, System.Environment.ProcessorCount,
+ CacheStore.Folder(Environment, Settings)),
};
private void OnServerChanged(object? sender, PropertyChangedEventArgs e)
@@ -323,3 +384,16 @@ public sealed class AppServices : IAsyncDisposable
}
}
}
+
+/// How a restore staged in Settings › Advanced went at start.
+public enum StagedRestoreResult
+{
+ /// The index is the chosen backup now; the one it replaced was backed up first.
+ Restored,
+
+ /// The staged copy failed its checks: it was set aside and the index kept.
+ Unreadable,
+
+ /// The index could not be backed up or replaced: it was kept and the restore runs at the next start.
+ Deferred,
+}
diff --git a/src/Titano.App/Infrastructure/AppSettings.cs b/src/Titano.App/Infrastructure/AppSettings.cs
index 21066cbe..6dfc120b 100644
--- a/src/Titano.App/Infrastructure/AppSettings.cs
+++ b/src/Titano.App/Infrastructure/AppSettings.cs
@@ -1,8 +1,12 @@
using System.IO;
using System.Text.Json;
using System.Text.Json.Serialization;
+using Titano.Core.Analysis.Deep;
+using Titano.Core.Archiving;
+using Titano.Core.Import;
using Titano.Core.IO;
using Titano.Core.Naming;
+using Titano.Data.Archiving;
using Titano.Data.Repositories;
using Titano.Ui.Theming;
@@ -51,6 +55,10 @@ public sealed class AppSettings
{
public const int DefaultThumbnailMemoryItems = 2_000;
public const int DefaultCacheLimitGb = 20;
+ public const int DefaultScanIntervalMinutes = 10;
+
+ /// 2⁻⁴ of white: the deep analysis' night threshold (a mean log2 luminance of −4).
+ public const double DefaultNightBrightnessPercent = 6.25;
// ---- General ----
public string? Language { get; set; }
@@ -69,12 +77,44 @@ public sealed class AppSettings
/// Root of the local archive; null until the first-run choice or Settings › Archive sets it.
public string? LastArchivePath { get; set; }
+ /// Naming templates of new archives; Settings › Archive also writes them into the open archive's archive.json.
public string FolderTemplate { get; set; } = TemplateDefaults.Folder;
public string FileTemplate { get; set; } = TemplateDefaults.File;
- /// Proxy long edge for new archives; 0 = full size.
+ /// Proxy long edge of new archives (also written into the open archive); 0 = full size, -1 = no proxies.
public int ProxyLongEdge { get; set; } = 1920;
+ /// Thumbnail long edge of new archives (also written into the open archive), BRIEF §8.5.
+ public int ThumbnailLongEdge { get; set; } = 320;
+
+ /// Minutes between the rescans of the open archive (BRIEF §7: polling by mtime and size, no file-system watchers).
+ public int ScanIntervalMinutes { get; set; } = DefaultScanIntervalMinutes;
+
+ // ---- Import (defaults of new cards and folders; a card's own profile wins) ----
+ public int ImportSessionGapMinutes { get; set; } = 45;
+ public int ImportMinimumFrames { get; set; } = 8;
+ public bool ImportSubfolders { get; set; } = true;
+ public bool ImportVerify { get; set; } = true;
+ public DuplicatePolicy ImportDuplicates { get; set; } = DuplicatePolicy.Skip;
+ public AfterImport ImportAfter { get; set; } = AfterImport.Keep;
+ public bool ImportEject { get; set; } = true;
+
+ // ---- Analysis ----
+ /// Upper bound of the deep-analysis long edge (BRIEF §10.2: half native, capped at 2048 by default).
+ public int AnalysisLongEdge { get; set; } = 2048;
+
+ /// Frames whose mean brightness is at or below this share of white (in percent) count as night frames.
+ public double NightBrightnessPercent { get; set; } = DefaultNightBrightnessPercent;
+
+ /// Stars per megapixel from which a night frame shows a star field.
+ public double StarFieldDensity { get; set; } = 30;
+
+ /// The default of a new card's "Deep analysis" after import (BRIEF §13: on, in the background).
+ public bool DeepAnalysisAfterImport { get; set; } = true;
+
+ /// Sequences a scan of this PC indexes (adopted folders, new sidecars) also get a background deep analysis.
+ public bool DeepAnalysisAfterScan { get; set; }
+
// ---- Library ----
public LibraryLayout LibraryLayout { get; set; } = LibraryLayout.Grid;
public SequenceSort LibrarySort { get; set; } = SequenceSort.Newest;
@@ -136,6 +176,33 @@ public sealed class AppSettings
public bool Maximized { get; set; }
}
+ /// Settings › Archive as the settings of a new archive (its name: the folder's).
+ public ArchiveSettings ArchiveDefaults() => new(string.Empty, new LayoutTemplates { Folder = FolderTemplate, File = FileTemplate },
+ new ProxyPolicy { LongEdge = ProxyLongEdge }, new ThumbnailPolicy { LongEdge = ThumbnailLongEdge });
+
+ /// Settings › Import and Analysis as the profile of a card or folder without its own (BRIEF §12.4), with the archive's templates.
+ public CardProfile ImportProfile(string folderTemplate, string fileTemplate) => new()
+ {
+ FolderTemplate = folderTemplate,
+ FileTemplate = fileTemplate,
+ SessionGapMinutes = ImportSessionGapMinutes,
+ MinimumSessionFrames = ImportMinimumFrames,
+ IncludeSubfolders = ImportSubfolders,
+ VerifyCopies = ImportVerify,
+ Duplicates = ImportDuplicates,
+ AfterImport = ImportAfter,
+ Eject = ImportEject,
+ DeepAnalysis = DeepAnalysisAfterImport,
+ };
+
+ /// Settings › Analysis over : the width cap and the night and star-field thresholds.
+ public DeepAnalysisOptions DeepAnalysis(DeepAnalysisOptions basis) => basis with
+ {
+ MaxAnalysisLongEdge = int.Max(basis.MinAnalysisLongEdge, AnalysisLongEdge),
+ DarkLogLuminance = System.Math.Log2(double.Clamp(NightBrightnessPercent, 0.01, 100) / 100),
+ StarFieldDensity = double.Max(0, StarFieldDensity),
+ };
+
public static AppSettings Load(string path)
{
try
diff --git a/src/Titano.App/Infrastructure/ArchiveSetup.cs b/src/Titano.App/Infrastructure/ArchiveSetup.cs
index 0533f67a..71380e74 100644
--- a/src/Titano.App/Infrastructure/ArchiveSetup.cs
+++ b/src/Titano.App/Infrastructure/ArchiveSetup.cs
@@ -1,4 +1,5 @@
using System.IO;
+using Titano.App.Archiving;
using Titano.Core.Diagnostics;
using Titano.Data.Archiving;
@@ -18,7 +19,8 @@ public interface IArchiveSetup
///
/// Creates or adopts the archive through the archive engine (originals stay where they are), remembers it as the
-/// archive to open at start and queues a full scan that indexes its sequences.
+/// archive to open at start and queues a full scan that indexes its sequences. A folder that becomes a new archive gets
+/// the naming templates, proxy size and thumbnail size of Settings › Archive; an existing archive keeps its own.
///
public sealed class EngineArchiveSetup(AppServices services) : IArchiveSetup
{
@@ -30,10 +32,11 @@ public sealed class EngineArchiveSetup(AppServices services) : IArchiveSetup
{
var archives = services.Archives ?? throw new InvalidOperationException("The index is not open.", services.OpenError);
var root = Path.GetFullPath(path);
+ var defaults = services.Settings.ArchiveDefaults();
var archive = await Task.Run(async () =>
{
Directory.CreateDirectory(root);
- return await archives.AdoptAsync(root, null, cancellationToken).ConfigureAwait(false);
+ return await archives.AdoptAsync(root, defaults, cancellationToken).ConfigureAwait(false);
}, cancellationToken);
services.Settings.LastArchivePath = root;
services.SaveSettings();
@@ -42,7 +45,10 @@ public sealed class EngineArchiveSetup(AppServices services) : IArchiveSetup
}
}
-/// Runs an archive action from the UI; a failure becomes a toast instead of an unhandled exception.
+///
+/// Runs an archive action from the UI; a failure becomes a toast instead of an unhandled exception. The toast says why
+/// in one localized sentence (); the exception's own text stays in the log.
+///
public static class ArchiveActions
{
public static async Task TryAsync(Shell.ShellViewModel shell, Func action)
@@ -53,13 +59,20 @@ public static class ArchiveActions
return true;
}
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidOperationException or InvalidDataException
- or Data.DatabaseException)
+ or ArgumentException or Data.DatabaseException)
{
Log.Error("archive", "Archive action failed", ex);
- shell.Notify(Core.Localization.Loc.L("Errors.Archive.Open"), ex.Message, isError: true);
+ shell.Notify(Core.Localization.Loc.L("Errors.Archive.Open"), Cause(ex), isError: true);
return false;
}
}
+
+ ///
+ /// Why creating or opening an archive failed: the archive's own sentences for files, access and the index
+ /// (), otherwise (a catalog sentence, or "Something went wrong").
+ ///
+ public static string Cause(Exception ex) =>
+ ex is IOException or UnauthorizedAccessException or Data.DatabaseException ? ArchiveFailures.Cause(ex) : Shell.ErrorText.For(ex);
}
/// Archive roots offered by default and their free space.
diff --git a/src/Titano.App/Sections/ArchiveViewModel.cs b/src/Titano.App/Sections/ArchiveViewModel.cs
index a2d11016..c73a7674 100644
--- a/src/Titano.App/Sections/ArchiveViewModel.cs
+++ b/src/Titano.App/Sections/ArchiveViewModel.cs
@@ -77,7 +77,7 @@ public sealed class ArchiveViewModel : SectionViewModel
_reloadDelay.Stop();
_ = LoadAsync();
};
- ScanCommand = new AsyncRelayCommand(() => QueueAsync(a => ArchiveJobs.Scan(a)), IsOnline);
+ ScanCommand = new AsyncRelayCommand(() => QueueAsync(a => ArchiveJobs.Scan(a, deepAnalysis: Services.Settings.DeepAnalysisAfterScan)), IsOnline);
RebuildCommand = new AsyncRelayCommand(() => OpenRebuildDialogAsync(), () => _archive is not null);
VerifyCommand = new AsyncRelayCommand(() => QueueAsync(a => ArchiveJobs.Verify(a)), IsOnline);
AdoptCommand = new AsyncRelayCommand(AdoptAsync);
diff --git a/src/Titano.App/Sections/ImportViewModel.cs b/src/Titano.App/Sections/ImportViewModel.cs
index 763091c5..dc33b0f3 100644
--- a/src/Titano.App/Sections/ImportViewModel.cs
+++ b/src/Titano.App/Sections/ImportViewModel.cs
@@ -727,12 +727,9 @@ public sealed class ImportViewModel : SectionViewModel
await _planning;
}
- /// A new card starts from the archive's templates and the brief's defaults.
- private CardProfile DefaultProfile() => new()
- {
- FolderTemplate = _archive?.FolderTemplate ?? Services.Settings.FolderTemplate,
- FileTemplate = _archive?.FileTemplate ?? Services.Settings.FileTemplate,
- };
+ /// A new card starts from the archive's templates and the defaults of Settings › Import and Analysis.
+ private CardProfile DefaultProfile() =>
+ Services.Settings.ImportProfile(_archive?.FolderTemplate ?? Services.Settings.FolderTemplate, _archive?.FileTemplate ?? Services.Settings.FileTemplate);
private void LoadChoices(CardProfile profile)
{
diff --git a/src/Titano.App/Sections/SettingsView.xaml b/src/Titano.App/Sections/SettingsView.xaml
index c19a884f..b40ff0d6 100644
--- a/src/Titano.App/Sections/SettingsView.xaml
+++ b/src/Titano.App/Sections/SettingsView.xaml
@@ -177,7 +177,82 @@
+ ToolTip="{l:Loc Tooltips.Settings.ProxySize}" AutomationProperties.Name="{l:Loc Settings.Archive.Proxies}" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -185,7 +260,7 @@
+ ToolTip="{l:Loc Tooltips.Settings.QualityProfile}" AutomationProperties.Name="{l:Loc Settings.Rendering.Quality}" />
@@ -215,7 +290,7 @@
-
@@ -299,6 +374,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -433,6 +584,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Titano.App/Sections/SettingsViewModel.cs b/src/Titano.App/Sections/SettingsViewModel.cs
index 45299c80..9a75aa06 100644
--- a/src/Titano.App/Sections/SettingsViewModel.cs
+++ b/src/Titano.App/Sections/SettingsViewModel.cs
@@ -3,15 +3,20 @@ using System.Globalization;
using System.IO;
using System.Text.Json;
using System.Windows.Input;
+using Titano.App.Archiving;
using Titano.App.Infrastructure;
using Titano.App.Server;
using Titano.App.Settings;
using Titano.App.Shell;
+using Titano.Core.Archiving;
using Titano.Core.Diagnostics;
+using Titano.Core.Import;
using Titano.Core.IO;
using Titano.Core.Localization;
+using Titano.Core.Model;
using Titano.Core.Naming;
using Titano.Data;
+using Titano.Data.Archiving;
using Titano.Ui.Mvvm;
using Titano.Ui.Theming;
@@ -20,7 +25,11 @@ namespace Titano.App.Sections;
///
/// Settings (BRIEF §12.8, Settings.html): a searchable section list on the left, the controls of one section on
/// the right, tooltips only. Text fields commit on Enter and revert on Esc; invalid input shows the Error border
-/// with the reason in the tooltip. Everything persists through (atomic writes).
+/// with the reason in the tooltip. Everything persists through (atomic writes). The
+/// Archive rows show and change the open archive's own settings (archive.json, through the archive engine) and are the
+/// defaults of new archives; Import and Analysis feed the defaults of new cards and the analysis jobs; Rendering feeds
+/// the jobs from the next one on; Formats lists the decode tier per format on this PC with the codec extensions to
+/// install; Advanced restores the index from a daily backup at the next start.
///
public sealed class SettingsViewModel : SectionViewModel
{
@@ -35,6 +44,12 @@ public sealed class SettingsViewModel : SectionViewModel
private bool _isDetecting;
private bool _isTesting;
private CancellationTokenSource? _selfTest;
+ private Archive? _archive;
+ private bool _isDetectingFormats;
+ private IReadOnlyList _backups = [];
+ private BackupOption? _selectedBackup;
+ private bool _isRestoring;
+ private InterfacePriority? _interfacePriority;
public SettingsViewModel(ShellViewModel shell)
: base(SectionKey.Settings, "Icon.Settings")
@@ -44,12 +59,18 @@ public sealed class SettingsViewModel : SectionViewModel
AllPages =
[
new(SettingsPage.General, ["Settings.General.Language", "Settings.General.Theme", "Settings.General.Usage"]),
- new(SettingsPage.Archive, ["Settings.Archive.Root", "Settings.Archive.Folders", "Settings.Archive.Files", "Settings.Archive.Proxies"]),
+ new(SettingsPage.Archive, ["Settings.Archive.Root", "Settings.Archive.Folders", "Settings.Archive.Files", "Settings.Archive.Proxies",
+ "Settings.Archive.Thumbnails", "Settings.Archive.Polling"]),
+ new(SettingsPage.Import, ["Import.Scan.Sessions", "Import.Label.Scan", "Import.Scan.Subfolders", "Import.Scan.Verify", "Import.Label.Duplicates",
+ "Import.Label.After", "Import.After.Eject"]),
+ new(SettingsPage.Analysis, ["Settings.Analysis.Width", "Settings.Analysis.Night", "Settings.Analysis.Stars", "Settings.Analysis.Deep"]),
new(SettingsPage.Rendering, ["Settings.Rendering.Quality", "Settings.Rendering.Memory", "Settings.Rendering.Parallelism", "Settings.Rendering.Hardware", "Settings.Rendering.Encoders"]),
+ new(SettingsPage.Formats, ["Settings.Formats.Title", "Settings.Formats.Column.Tier", "Settings.Formats.Install"]),
new(SettingsPage.Storage, ["Settings.Storage.Folder", "Settings.Storage.Thumbnails", "Settings.Storage.Limit"]),
new(SettingsPage.Server, ["Settings.Server.Default", "Settings.Server.RenderNode", "Settings.Server.Certificates"]),
new(SettingsPage.Updates, ["Settings.General.CheckOnStart"]),
- new(SettingsPage.Advanced, ["Settings.Advanced.DataFolder", "Settings.Advanced.Logs", "Settings.Advanced.Diagnostics", "Settings.Advanced.Backup"]),
+ new(SettingsPage.Advanced, ["Settings.Advanced.DataFolder", "Settings.Advanced.Logs", "Settings.Advanced.Diagnostics", "Settings.Advanced.Backup",
+ "Settings.Advanced.Restore", "Settings.Advanced.Reset"]),
];
_visiblePages = AllPages;
@@ -64,11 +85,13 @@ public sealed class SettingsViewModel : SectionViewModel
{
_s.FolderTemplate = v;
Save();
+ _ = UpdateArchiveAsync(a => a with { Templates = a.Templates with { Folder = v } });
}, () => Loc.L("Tooltips.Settings.FolderTemplate"));
FileTemplate = new EditableField(_s.FileTemplate, v => NamingPreview.Validate(v, isFolder: false), v =>
{
_s.FileTemplate = v;
Save();
+ _ = UpdateArchiveAsync(a => a with { Templates = a.Templates with { File = v } });
}, () => Loc.L("Tooltips.Settings.FileTemplate"));
FolderTemplate.PropertyChanged += (_, e) =>
{
@@ -79,15 +102,40 @@ public sealed class SettingsViewModel : SectionViewModel
if (e.PropertyName == nameof(EditableField.Text)) UpdatePreview();
};
+ // ---- Import ----
+ SessionGap = new EditableField(_s.ImportSessionGapMinutes.ToString(CultureInfo.CurrentCulture), v => ValidateInt(v, 1, 24 * 60), v =>
+ {
+ _s.ImportSessionGapMinutes = int.Parse(v, NumberStyles.Integer, CultureInfo.CurrentCulture);
+ Save();
+ }, () => Loc.L("Tooltips.Import.Gap"));
+ MinimumFrames = new EditableField(_s.ImportMinimumFrames.ToString(CultureInfo.CurrentCulture), v => ValidateInt(v, 1, 1000), v =>
+ {
+ _s.ImportMinimumFrames = int.Parse(v, NumberStyles.Integer, CultureInfo.CurrentCulture);
+ Save();
+ }, () => Loc.L("Tooltips.Import.MinimumFrames"));
+
+ // ---- Analysis ----
+ NightBrightness = new EditableField(_s.NightBrightnessPercent.ToString("0.##", CultureInfo.CurrentCulture), v => ValidateNumber(v, 0.5, 50), v =>
+ {
+ _s.NightBrightnessPercent = double.Parse(v, NumberStyles.Float, CultureInfo.CurrentCulture);
+ Save();
+ }, () => Loc.L("Tooltips.Settings.Night"));
+ StarDensity = new EditableField(_s.StarFieldDensity.ToString("0.##", CultureInfo.CurrentCulture), v => ValidateNumber(v, 1, 1000), v =>
+ {
+ _s.StarFieldDensity = double.Parse(v, NumberStyles.Float, CultureInfo.CurrentCulture);
+ Save();
+ }, () => Loc.L("Tooltips.Settings.Stars"));
+
// ---- Rendering ----
InstalledGb = Math.Max(2, (int)Math.Round(GC.GetGCMemoryInfo().TotalAvailableMemoryBytes / 1e9));
Parallelism = new EditableField(EffectiveParallelism.ToString(CultureInfo.CurrentCulture), ValidateParallelism, v =>
{
var n = int.Parse(v, NumberStyles.Integer, CultureInfo.CurrentCulture);
_s.Parallelism = n == ParallelismAuto ? null : n;
+ // Saving applies it: the job engine takes the new number of workers at once.
Save();
OnPropertyChanged(nameof(IsParallelismAuto));
- }, () => Loc.L("Tooltips.Settings.Parallelism"));
+ }, () => Loc.L("Tooltips.Settings.Workers"));
// ---- Storage ----
CacheFolder = new EditableField(CacheStore.Folder(shell.Services.Environment, _s), v => ArchiveLocations.Validate(v), v =>
@@ -144,6 +192,10 @@ public sealed class SettingsViewModel : SectionViewModel
OpenLogsCommand = new RelayCommand(() => ShellActions.Reveal(LogsFolder));
ExportDiagnosticsCommand = new AsyncRelayCommand(ExportDiagnosticsAsync);
BackupDatabaseCommand = new AsyncRelayCommand(BackupDatabaseAsync, () => Shell.Services.Database is not null);
+ RedetectFormatsCommand = new AsyncRelayCommand(() => DetectFormatsAsync(refresh: true), () => !_isDetectingFormats);
+ RestoreDatabaseCommand = new AsyncRelayCommand(RestoreDatabaseAsync, () => CanRestore);
+ CancelRestoreCommand = new RelayCommand(CancelRestore, () => IsRestoreStaged);
+ ResetAllCommand = new RelayCommand(ResetAll);
ResetSectionCommand = new RelayCommand(ResetSection, () => CanResetSection);
ExportSettingsCommand = new AsyncRelayCommand(ExportSettingsAsync);
ImportSettingsCommand = new AsyncRelayCommand(ImportSettingsAsync);
@@ -170,7 +222,9 @@ public sealed class SettingsViewModel : SectionViewModel
OnPropertyChanged(nameof(PageTitle));
OnPropertyChanged(nameof(CanResetSection));
if (value == SettingsPage.Rendering && Encoders.Count == 0 && !_isDetecting) _ = DetectEncodersAsync();
+ if (value == SettingsPage.Formats && Formats.Count == 0 && !_isDetectingFormats) _ = DetectFormatsAsync(refresh: false);
if (value == SettingsPage.Storage) _ = UpdateCacheUsageAsync();
+ if (value == SettingsPage.Advanced) LoadBackups();
}
}
@@ -280,14 +334,17 @@ public sealed class SettingsViewModel : SectionViewModel
private set => Set(ref _previewNames, value);
}
+ /// BRIEF §8.5: 1280, 1920 (default), 2560 or full size; no proxies is what a server admin may also choose.
public IReadOnlyList> ProxySizes =>
[
new(1280, "1280"),
new(1920, "1920"),
new(2560, "2560"),
- new(0, Loc.L("Settings.Archive.FullSize")),
+ new(ProxyPolicy.FullSize, Loc.L("Settings.Archive.FullSize")),
+ new(ProxyPolicy.Disabled, Loc.L("Settings.Archive.NoProxies")),
];
+ /// The open archive's proxy size (archive.json), and the one of new archives.
public SettingsOption SelectedProxySize
{
get => ProxySizes.FirstOrDefault(p => p.Value == _s.ProxyLongEdge) ?? ProxySizes[1];
@@ -297,9 +354,144 @@ public sealed class SettingsViewModel : SectionViewModel
_s.ProxyLongEdge = value.Value;
Save();
OnPropertyChanged();
+ _ = UpdateArchiveAsync(a => a with { Proxies = a.Proxies with { LongEdge = value.Value } });
}
}
+ public IReadOnlyList> ThumbnailSizes => [.. new[] { 240, 320, 480, 640 }.Select(n => new SettingsOption(n, n.ToString(CultureInfo.InvariantCulture)))];
+
+ /// The open archive's thumbnail size (archive.json), and the one of new archives.
+ public SettingsOption SelectedThumbnailSize
+ {
+ get => ThumbnailSizes.FirstOrDefault(p => p.Value == _s.ThumbnailLongEdge) ?? ThumbnailSizes[1];
+ set
+ {
+ if (value is null || value.Value == _s.ThumbnailLongEdge) return;
+ _s.ThumbnailLongEdge = value.Value;
+ Save();
+ OnPropertyChanged();
+ _ = UpdateArchiveAsync(a => a with { Thumbnails = a.Thumbnails with { LongEdge = value.Value } });
+ }
+ }
+
+ public IReadOnlyList> ScanIntervals =>
+ [.. new[] { 5, 10, 15, 30, 60 }.Select(m => new SettingsOption(m, Formatting.Duration(TimeSpan.FromMinutes(m))))];
+
+ /// How often this PC rescans the open archive for changes made elsewhere (BRIEF §7: polling).
+ public SettingsOption SelectedScanInterval
+ {
+ get => ScanIntervals.FirstOrDefault(p => p.Value == _s.ScanIntervalMinutes) ?? ScanIntervals[1];
+ set
+ {
+ if (value is null || value.Value == _s.ScanIntervalMinutes) return;
+ _s.ScanIntervalMinutes = value.Value;
+ // Saving applies it: the running rescan timer takes the new period.
+ Save();
+ OnPropertyChanged();
+ }
+ }
+
+ // ---------------- Import ----------------
+
+ public EditableField SessionGap { get; }
+ public EditableField MinimumFrames { get; }
+
+ public bool ImportSubfolders
+ {
+ get => _s.ImportSubfolders;
+ set => SetSetting(_s.ImportSubfolders, value, v => _s.ImportSubfolders = v);
+ }
+
+ public bool ImportVerify
+ {
+ get => _s.ImportVerify;
+ set => SetSetting(_s.ImportVerify, value, v => _s.ImportVerify = v);
+ }
+
+ public bool IsSkipDuplicates
+ {
+ get => _s.ImportDuplicates == DuplicatePolicy.Skip;
+ set
+ {
+ if (value) SetDuplicates(DuplicatePolicy.Skip);
+ }
+ }
+
+ public bool IsImportDuplicates
+ {
+ get => _s.ImportDuplicates == DuplicatePolicy.ImportAgain;
+ set
+ {
+ if (value) SetDuplicates(DuplicatePolicy.ImportAgain);
+ }
+ }
+
+ public bool IsKeepCard
+ {
+ get => _s.ImportAfter == AfterImport.Keep;
+ set
+ {
+ if (value) SetAfterImport(AfterImport.Keep);
+ }
+ }
+
+ public bool IsDeleteImported
+ {
+ get => _s.ImportAfter == AfterImport.DeleteImported;
+ set
+ {
+ if (value) SetAfterImport(AfterImport.DeleteImported);
+ }
+ }
+
+ public bool IsFormatCard
+ {
+ get => _s.ImportAfter == AfterImport.FormatCard;
+ set
+ {
+ if (value) SetAfterImport(AfterImport.FormatCard);
+ }
+ }
+
+ public bool ImportEject
+ {
+ get => _s.ImportEject;
+ set => SetSetting(_s.ImportEject, value, v => _s.ImportEject = v);
+ }
+
+ // ---------------- Analysis ----------------
+
+ /// BRIEF §10.2: half native, capped at 2048 by default.
+ public IReadOnlyList> AnalysisWidths =>
+ [.. new[] { 1024, 2048, 3072, 4096 }.Select(n => new SettingsOption(n, n.ToString(CultureInfo.InvariantCulture)))];
+
+ public SettingsOption SelectedAnalysisWidth
+ {
+ get => AnalysisWidths.FirstOrDefault(p => p.Value == _s.AnalysisLongEdge) ?? AnalysisWidths[1];
+ set
+ {
+ if (value is null || value.Value == _s.AnalysisLongEdge) return;
+ _s.AnalysisLongEdge = value.Value;
+ Save();
+ OnPropertyChanged();
+ }
+ }
+
+ public EditableField NightBrightness { get; }
+ public EditableField StarDensity { get; }
+
+ public bool DeepAnalysisAfterImport
+ {
+ get => _s.DeepAnalysisAfterImport;
+ set => SetSetting(_s.DeepAnalysisAfterImport, value, v => _s.DeepAnalysisAfterImport = v);
+ }
+
+ public bool DeepAnalysisAfterScan
+ {
+ get => _s.DeepAnalysisAfterScan;
+ set => SetSetting(_s.DeepAnalysisAfterScan, value, v => _s.DeepAnalysisAfterScan = v);
+ }
+
// ---------------- Rendering ----------------
public IReadOnlyList> Qualities =>
@@ -358,7 +550,7 @@ public sealed class SettingsViewModel : SectionViewModel
public int LogicalCores => Environment.ProcessorCount;
/// Auto: cores minus four so the UI stays responsive.
- public int ParallelismAuto => Math.Max(1, LogicalCores - 4);
+ public int ParallelismAuto => ProcessingTuning.ParallelismAuto(LogicalCores);
private int EffectiveParallelism => _s.Parallelism ?? ParallelismAuto;
@@ -379,6 +571,7 @@ public sealed class SettingsViewModel : SectionViewModel
_s.BackgroundPriority = value;
Save();
OnPropertyChanged();
+ _interfacePriority?.Update();
}
}
@@ -418,6 +611,23 @@ public sealed class SettingsViewModel : SectionViewModel
public ICommand RedetectCommand { get; }
public ICommand SelfTestCommand { get; }
+ // ---------------- Formats ----------------
+
+ public ObservableCollection Formats { get; } = [];
+
+ /// The one-line notices of BRIEF §8.1: each missing codec extension with its Install button.
+ public ObservableCollection MissingExtensions { get; } = [];
+
+ public bool HasMissingExtensions => MissingExtensions.Count > 0;
+
+ public bool IsDetectingFormats
+ {
+ get => _isDetectingFormats;
+ private set => Set(ref _isDetectingFormats, value);
+ }
+
+ public ICommand RedetectFormatsCommand { get; }
+
// ---------------- Storage ----------------
public EditableField CacheFolder { get; }
@@ -478,16 +688,50 @@ public sealed class SettingsViewModel : SectionViewModel
public ICommand ExportDiagnosticsCommand { get; }
public ICommand BackupDatabaseCommand { get; }
+ /// The daily copies of the index, newest first (Restore).
+ public IReadOnlyList Backups
+ {
+ get => _backups;
+ private set
+ {
+ if (!Set(ref _backups, value)) return;
+ OnPropertyChanged(nameof(HasBackups));
+ }
+ }
+
+ public bool HasBackups => _backups.Count > 0;
+
+ public BackupOption? SelectedBackup
+ {
+ get => _selectedBackup;
+ set
+ {
+ if (Set(ref _selectedBackup, value)) CommandManager.InvalidateRequerySuggested();
+ }
+ }
+
+ /// A restore waits for the next start of Titano.
+ public bool IsRestoreStaged => DatabaseBackups.HasStagedRestore(Shell.Services.Environment.DatabasePath);
+
+ private bool CanRestore => !_isRestoring && _selectedBackup is not null && Shell.Services.Database is not null && !IsRestoreStaged;
+
+ public ICommand RestoreDatabaseCommand { get; }
+ public ICommand CancelRestoreCommand { get; }
+ public ICommand ResetAllCommand { get; }
+
// ---------------- Footer ----------------
public ICommand ResetSectionCommand { get; }
- /// Advanced holds no setting with a default (paths and actions only): it has no Reset section.
- public bool CanResetSection => _page != SettingsPage.Advanced;
+ /// Advanced holds no setting with a default (paths and actions only) and Formats only shows this PC: they have no Reset section.
+ public bool CanResetSection => _page is not (SettingsPage.Advanced or SettingsPage.Formats);
public ICommand ExportSettingsCommand { get; }
public ICommand ImportSettingsCommand { get; }
- /// Loads what needs the services (certificates, cache usage) and follows the server session.
+ ///
+ /// Loads what needs the services (certificates, cache usage, the open archive's settings), follows the server session,
+ /// applies "Background priority" while Titano is in front and says how a restore staged before this start went.
+ ///
public void Attach()
{
try
@@ -500,6 +744,20 @@ public sealed class SettingsViewModel : SectionViewModel
}
LoadCertificates();
Shell.Services.Server.PropertyChanged += OnServerChanged;
+ if (System.Windows.Application.Current is { } app) _interfacePriority = new InterfacePriority(app, () => _s.BackgroundPriority);
+ _ = LoadArchiveAsync();
+ switch (Shell.Services.StagedRestore)
+ {
+ case StagedRestoreResult.Restored:
+ Shell.Notify(Loc.L("Settings.Advanced.Restored"));
+ break;
+ case StagedRestoreResult.Unreadable:
+ Shell.Notify(Loc.L("Settings.Advanced.RestoreFailed"), Loc.L("Errors.Backup.Unreadable"), isError: true);
+ break;
+ case StagedRestoreResult.Deferred:
+ Shell.Notify(Loc.L("Settings.Advanced.RestoreFailed"), Loc.L("Errors.Backup.Deferred"), isError: true);
+ break;
+ }
}
public override void Dispose()
@@ -507,6 +765,7 @@ public sealed class SettingsViewModel : SectionViewModel
Loc.CultureChanged -= OnCultureChanged;
Shell.Services.Server.PropertyChanged -= OnServerChanged;
_selfTest?.Cancel();
+ _interfacePriority?.Dispose();
base.Dispose();
}
@@ -538,6 +797,34 @@ public sealed class SettingsViewModel : SectionViewModel
Shell.Server.Refresh();
}
+ /// Stores a switch of Settings and tells the view (the caller's property).
+ private void SetSetting(bool current, bool value, Action store, [System.Runtime.CompilerServices.CallerMemberName] string? property = null)
+ {
+ if (current == value) return;
+ store(value);
+ Save();
+ OnPropertyChanged(property);
+ }
+
+ private void SetDuplicates(DuplicatePolicy policy)
+ {
+ if (_s.ImportDuplicates == policy) return;
+ _s.ImportDuplicates = policy;
+ Save();
+ OnPropertyChanged(nameof(IsSkipDuplicates));
+ OnPropertyChanged(nameof(IsImportDuplicates));
+ }
+
+ private void SetAfterImport(AfterImport after)
+ {
+ if (_s.ImportAfter == after) return;
+ _s.ImportAfter = after;
+ Save();
+ OnPropertyChanged(nameof(IsKeepCard));
+ OnPropertyChanged(nameof(IsDeleteImported));
+ OnPropertyChanged(nameof(IsFormatCard));
+ }
+
///
/// Takes the archive and server values other screens set (opening an archive, connecting), unless the field holds an
/// edit not committed yet.
@@ -547,8 +834,69 @@ public sealed class SettingsViewModel : SectionViewModel
if (!ArchiveRoot.IsDirty) ArchiveRoot.Load(_s.LastArchivePath ?? string.Empty);
if (!DefaultServer.IsDirty) DefaultServer.Load(ServerAddress.Display(_s.ServerUrl));
UpdateArchiveFree();
+ _ = LoadArchiveAsync();
+ if (_page == SettingsPage.Advanced) LoadBackups();
}
+ ///
+ /// Shows the open archive's own templates, proxy size and thumbnail size (its archive.json; the index's while it is
+ /// offline) unless a field holds an edit; they also become the defaults of new archives.
+ ///
+ private async Task LoadArchiveAsync()
+ {
+ if (Shell.Services.Database is not { } db || Shell.Services.Archives is not { } archives) return;
+ try
+ {
+ var archive = await CurrentArchive.FindAsync(db, _s.LastArchivePath);
+ _archive = archive;
+ if (archive is null) return;
+ var settings = await Task.Run(() => archives.GetSettingsAsync(archive.Id));
+ if (!FolderTemplate.IsDirty) FolderTemplate.Load(settings.Templates.Folder);
+ if (!FileTemplate.IsDirty) FileTemplate.Load(settings.Templates.File);
+ var changed = _s.FolderTemplate != settings.Templates.Folder || _s.FileTemplate != settings.Templates.File
+ || _s.ProxyLongEdge != settings.Proxies.LongEdge || _s.ThumbnailLongEdge != settings.Thumbnails.LongEdge;
+ _s.FolderTemplate = settings.Templates.Folder;
+ _s.FileTemplate = settings.Templates.File;
+ _s.ProxyLongEdge = settings.Proxies.LongEdge;
+ _s.ThumbnailLongEdge = settings.Thumbnails.LongEdge;
+ if (changed) Save();
+ OnPropertyChanged(nameof(SelectedProxySize));
+ OnPropertyChanged(nameof(SelectedThumbnailSize));
+ UpdatePreview();
+ }
+ catch (Exception ex) when (ex is DatabaseException or ArgumentException)
+ {
+ Log.Warning("settings", "The open archive's settings could not be read", ex);
+ }
+ }
+
+ ///
+ /// Writes one Archive row into the open archive's archive.json and index through the archive engine (BRIEF §7). When
+ /// that fails (offline, read-only, busy) the user hears why and the rows show the archive's values again.
+ ///
+ private async Task UpdateArchiveAsync(Func edit)
+ {
+ if (_archive is not { } archive || Shell.Services.Archives is not { } archives) return;
+ try
+ {
+ _archive = await Task.Run(() => archives.UpdateSettingsAsync(archive.Id, edit));
+ }
+ catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or ArgumentException or InvalidDataException or DatabaseException)
+ {
+ Log.Warning("settings", "The archive settings were not saved", ex);
+ Shell.Notify(Loc.L("Settings.Archive.NotSaved"), ArchiveActions.Cause(ex), isError: true);
+ await LoadArchiveAsync();
+ }
+ }
+
+ /// All of Settings › Archive into the open archive (after a reset or an import of settings).
+ private Task PushArchiveSettingsAsync() => UpdateArchiveAsync(a => a with
+ {
+ Templates = a.Templates with { Folder = _s.FolderTemplate, File = _s.FileTemplate },
+ Proxies = a.Proxies with { LongEdge = _s.ProxyLongEdge },
+ Thumbnails = a.Thumbnails with { LongEdge = _s.ThumbnailLongEdge },
+ });
+
private void OnServerChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
{
LoadCertificates();
@@ -570,6 +918,11 @@ public sealed class SettingsViewModel : SectionViewModel
? null
: Loc.L("Errors.Number.Range", min.ToString("N0", Loc.Culture), max.ToString("N0", Loc.Culture));
+ private static string? ValidateNumber(string text, double min, double max) =>
+ double.TryParse(text.Trim(), NumberStyles.Float, CultureInfo.CurrentCulture, out var n) && double.IsFinite(n) && n >= min && n <= max
+ ? null
+ : Loc.L("Errors.Number.Range", min.ToString("0.##", Loc.Culture), max.ToString("0.##", Loc.Culture));
+
private void Browse(EditableField field, string titleKey)
{
var folder = Shell.Services.Dialogs.PickFolder(Loc.L(titleKey), field.Value.Length > 0 ? field.Value : null);
@@ -633,6 +986,36 @@ public sealed class SettingsViewModel : SectionViewModel
}
}
+ ///
+ /// Lists the decode tier of every format on this PC (Settings › Formats); with the codecs are
+ /// detected again first (after installing an extension), and the next jobs decode with them.
+ ///
+ public async Task DetectFormatsAsync(bool refresh)
+ {
+ IsDetectingFormats = true;
+ try
+ {
+ var inventory = Shell.Services.Formats;
+ var report = await Task.Run(() => inventory.Detect(refresh));
+ Formats.Clear();
+ foreach (var row in report.Formats) Formats.Add(new FormatRowViewModel(row));
+ MissingExtensions.Clear();
+ foreach (var extension in report.Missing)
+ MissingExtensions.Add(new MissingExtensionViewModel(extension, new RelayCommand(() => inventory.OpenStore(extension))));
+ OnPropertyChanged(nameof(HasMissingExtensions));
+ Log.Info("settings", $"{report.Formats.Count(f => f.Tier == Core.Imaging.DecodeTier.Native)} format(s) decode fully; missing extensions: {string.Join(", ", report.Missing.Select(m => m.ProductName))}");
+ }
+ catch (Exception ex) when (ex is System.Runtime.InteropServices.COMException or PlatformNotSupportedException or DllNotFoundException or EntryPointNotFoundException)
+ {
+ Log.Warning("settings", "Image codecs could not be detected", ex);
+ }
+ finally
+ {
+ IsDetectingFormats = false;
+ CommandManager.InvalidateRequerySuggested();
+ }
+ }
+
private async Task UpdateCacheUsageAsync()
{
var folder = CacheStore.Folder(Shell.Services.Environment, _s);
@@ -690,13 +1073,112 @@ public sealed class SettingsViewModel : SectionViewModel
if (Shell.Services.Database is not { } db) return;
try
{
- var path = await db.BackupAsync(Shell.Services.Environment.BackupDirectory);
+ var path = await db.BackupAsync(Shell.Services.Environment.BackupDirectory, DatabaseBackups.Keep);
Shell.Notify(Loc.L("Settings.Advanced.BackupDone"), Path.GetFileName(path), Loc.L("Library.Export.Show"), Loc.L("Tooltips.Library.ShowExport"), () => ShellActions.Reveal(path));
}
catch (Exception ex) when (ex is DatabaseException or IOException or NotSupportedException)
{
Shell.ReportError(ex);
}
+ LoadBackups();
+ }
+
+ /// The copies in the backups folder, newest first; the newest is chosen.
+ private void LoadBackups()
+ {
+ var environment = Shell.Services.Environment;
+ IReadOnlyList found;
+ try
+ {
+ found = DatabaseBackups.List(environment.BackupDirectory, environment.DatabasePath);
+ }
+ catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
+ {
+ Log.Warning("settings", "The backups folder could not be listed", ex);
+ found = [];
+ }
+ var selected = _selectedBackup?.Backup.Path;
+ Backups = [.. found.Select(b => new BackupOption(b))];
+ SelectedBackup = Backups.FirstOrDefault(b => b.Backup.Path == selected) ?? Backups.FirstOrDefault();
+ OnPropertyChanged(nameof(IsRestoreStaged));
+ }
+
+ ///
+ /// Restore (BRIEF §6.2, §12.8): a dry run reads what the chosen copy holds against the index now; after the user's
+ /// destructive confirmation the copy is staged beside the index for the next start, where the index as it is then is
+ /// backed up first (; the staged copy is out of reach of the pruning
+ /// to three copies). Nothing replaces the index while Titano runs.
+ ///
+ private async Task RestoreDatabaseAsync()
+ {
+ if (_selectedBackup is not { } option || Shell.Services.Database is not { } db) return;
+ var backup = option.Backup;
+ var environment = Shell.Services.Environment;
+ _isRestoring = true;
+ CommandManager.InvalidateRequerySuggested();
+ try
+ {
+ DatabaseSummary current, restored;
+ try
+ {
+ current = await DatabaseBackups.SummarizeAsync(db);
+ restored = await Task.Run(() => DatabaseBackups.SummarizeBackupAsync(backup.Path, environment.DataDirectory));
+ }
+ catch (Exception ex) when (ex is InvalidDataException or IOException or UnauthorizedAccessException or DatabaseException)
+ {
+ Log.Warning("settings", $"The backup {backup.Path} cannot be restored", ex);
+ Shell.Notify(Loc.L("Errors.Backup.Unreadable"), isError: true);
+ return;
+ }
+ var confirmed = Shell.Services.Dialogs.Confirm(new ConfirmRequest
+ {
+ Heading = Loc.L("Settings.Advanced.RestoreTitle", option.Label),
+ Message = Loc.L("Settings.Advanced.RestoreMessage"),
+ Detail = string.Join(Environment.NewLine,
+ Loc.L("Settings.Advanced.RestoreBackup", Formatting.Count(restored.Sequences), Formatting.Count(restored.Photos)),
+ Loc.L("Settings.Advanced.RestoreCurrent", Formatting.Count(current.Sequences), Formatting.Count(current.Photos))),
+ IsDetailMonospaced = false,
+ DetailToolTip = Formatting.LeftToRight(backup.Path),
+ SafeText = Loc.L("Settings.Storage.Keep"),
+ SafeToolTip = Loc.L("Tooltips.Settings.KeepIndex"),
+ ActionText = Loc.L("Settings.Advanced.RestoreAction"),
+ ActionToolTip = Loc.L("Tooltips.Settings.RestoreConfirm"),
+ IsDestructive = true,
+ });
+ if (!confirmed) return;
+ try
+ {
+ await Task.Run(() => DatabaseBackups.StageRestoreAsync(backup.Path, environment.DatabasePath));
+ }
+ catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
+ {
+ Log.Error("settings", "The restore was not staged", ex);
+ Shell.ReportError(ex);
+ return;
+ }
+ Log.Info("settings", $"Restore of {backup.Path} staged ({restored.Sequences} sequences, {restored.Photos} photos)");
+ Shell.Notify(Loc.L("Settings.Advanced.RestoreStaged"), Loc.L("Settings.Advanced.RestartToRestore"));
+ }
+ finally
+ {
+ _isRestoring = false;
+ LoadBackups();
+ CommandManager.InvalidateRequerySuggested();
+ }
+ }
+
+ private void CancelRestore()
+ {
+ try
+ {
+ DatabaseBackups.CancelStagedRestore(Shell.Services.Environment.DatabasePath);
+ }
+ catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
+ {
+ Shell.ReportError(ex);
+ }
+ OnPropertyChanged(nameof(IsRestoreStaged));
+ CommandManager.InvalidateRequerySuggested();
}
private void ResetSection()
@@ -714,9 +1196,30 @@ public sealed class SettingsViewModel : SectionViewModel
_s.FolderTemplate = defaults.FolderTemplate;
_s.FileTemplate = defaults.FileTemplate;
_s.ProxyLongEdge = defaults.ProxyLongEdge;
+ _s.ThumbnailLongEdge = defaults.ThumbnailLongEdge;
+ _s.ScanIntervalMinutes = defaults.ScanIntervalMinutes;
FolderTemplate.Load(_s.FolderTemplate);
FileTemplate.Load(_s.FileTemplate);
UpdatePreview();
+ _ = PushArchiveSettingsAsync();
+ break;
+ case SettingsPage.Import:
+ _s.ImportSessionGapMinutes = defaults.ImportSessionGapMinutes;
+ _s.ImportMinimumFrames = defaults.ImportMinimumFrames;
+ _s.ImportSubfolders = defaults.ImportSubfolders;
+ _s.ImportVerify = defaults.ImportVerify;
+ _s.ImportDuplicates = defaults.ImportDuplicates;
+ _s.ImportAfter = defaults.ImportAfter;
+ _s.ImportEject = defaults.ImportEject;
+ LoadImportFields();
+ break;
+ case SettingsPage.Analysis:
+ _s.AnalysisLongEdge = defaults.AnalysisLongEdge;
+ _s.NightBrightnessPercent = defaults.NightBrightnessPercent;
+ _s.StarFieldDensity = defaults.StarFieldDensity;
+ _s.DeepAnalysisAfterImport = defaults.DeepAnalysisAfterImport;
+ _s.DeepAnalysisAfterScan = defaults.DeepAnalysisAfterScan;
+ LoadAnalysisFields();
break;
case SettingsPage.Rendering:
_s.Quality = defaults.Quality;
@@ -725,6 +1228,7 @@ public sealed class SettingsViewModel : SectionViewModel
_s.BackgroundPriority = defaults.BackgroundPriority;
_s.HardwareEncoding = defaults.HardwareEncoding;
Parallelism.Load(ParallelismAuto.ToString(CultureInfo.CurrentCulture));
+ _interfacePriority?.Update();
break;
case SettingsPage.Storage:
_s.CacheFolder = null;
@@ -747,6 +1251,80 @@ public sealed class SettingsViewModel : SectionViewModel
Shell.Server.Refresh();
}
+ private void LoadImportFields()
+ {
+ SessionGap.Load(_s.ImportSessionGapMinutes.ToString(CultureInfo.CurrentCulture));
+ MinimumFrames.Load(_s.ImportMinimumFrames.ToString(CultureInfo.CurrentCulture));
+ }
+
+ private void LoadAnalysisFields()
+ {
+ NightBrightness.Load(_s.NightBrightnessPercent.ToString("0.##", CultureInfo.CurrentCulture));
+ StarDensity.Load(_s.StarFieldDensity.ToString("0.##", CultureInfo.CurrentCulture));
+ }
+
+ ///
+ /// Advanced › Reset: every preference back to its default after a destructive confirmation. What identifies this PC's
+ /// data and session stays: the archive folder, the server, its session and trusted certificates, the window and the
+ /// first-run choice. The open archive takes the default templates and sizes.
+ ///
+ private void ResetAll()
+ {
+ var confirmed = Shell.Services.Dialogs.Confirm(new ConfirmRequest
+ {
+ Heading = Loc.L("Settings.Advanced.ResetTitle"),
+ Message = Loc.L("Settings.Advanced.ResetMessage"),
+ SafeText = Loc.L("Settings.Storage.Keep"),
+ SafeToolTip = Loc.L("Tooltips.Settings.KeepSettings"),
+ ActionText = Loc.L("Settings.Advanced.ResetAction"),
+ ActionToolTip = Loc.L("Tooltips.Settings.ResetConfirm"),
+ IsDestructive = true,
+ });
+ if (!confirmed) return;
+ var defaults = new AppSettings
+ {
+ LastArchivePath = _s.LastArchivePath,
+ ServerUrl = _s.ServerUrl,
+ ServerUsername = _s.ServerUsername,
+ ProtectedToken = _s.ProtectedToken,
+ TrustedCertificates = _s.TrustedCertificates,
+ RecentServers = _s.RecentServers,
+ Window = _s.Window,
+ FirstRunCompleted = _s.FirstRunCompleted,
+ JobsClearedAt = _s.JobsClearedAt,
+ };
+ ApplyAll(defaults);
+ _ = PushArchiveSettingsAsync();
+ Log.Info("settings", "Every setting reset to its default");
+ Shell.Notify(Loc.L("Settings.Advanced.ResetDone"));
+ }
+
+ /// Takes every value of and shows it everywhere (reset, import).
+ private void ApplyAll(AppSettings source)
+ {
+ foreach (var property in typeof(AppSettings).GetProperties().Where(p => p.CanRead && p.CanWrite))
+ property.SetValue(_s, property.GetValue(source));
+ Save();
+ ThemeManager.Apply(_s.Theme);
+ UiLanguage.Apply(_s.Language);
+ ArchiveRoot.Load(_s.LastArchivePath ?? string.Empty);
+ FolderTemplate.Load(_s.FolderTemplate);
+ FileTemplate.Load(_s.FileTemplate);
+ LoadImportFields();
+ LoadAnalysisFields();
+ Parallelism.Load(EffectiveParallelism.ToString(CultureInfo.CurrentCulture));
+ CacheFolder.Load(CacheStore.Folder(Shell.Services.Environment, _s));
+ ThumbnailMemory.Load(_s.ThumbnailMemoryItems.ToString(CultureInfo.CurrentCulture));
+ CacheLimit.Load(_s.CacheLimitGb.ToString(CultureInfo.CurrentCulture));
+ if (Shell.Services.Thumbnails is { } thumbs) thumbs.Capacity = _s.ThumbnailMemoryItems;
+ DefaultServer.Load(ServerAddress.Display(_s.ServerUrl));
+ _interfacePriority?.Update();
+ UpdatePreview();
+ LoadCertificates();
+ OnAllPropertiesChanged();
+ Shell.Server.Refresh();
+ }
+
private async Task ExportSettingsAsync()
{
var folder = Shell.Services.Dialogs.PickFolder(Loc.L("Settings.Export.Title"));
@@ -784,22 +1362,9 @@ public sealed class SettingsViewModel : SectionViewModel
imported.ServerUrl = _s.ServerUrl;
imported.Window = _s.Window;
imported.FirstRunCompleted = _s.FirstRunCompleted;
- foreach (var property in typeof(AppSettings).GetProperties().Where(p => p.CanRead && p.CanWrite))
- property.SetValue(_s, property.GetValue(imported));
- Save();
- ThemeManager.Apply(_s.Theme);
- UiLanguage.Apply(_s.Language);
- ArchiveRoot.Load(_s.LastArchivePath ?? string.Empty);
- FolderTemplate.Load(_s.FolderTemplate);
- FileTemplate.Load(_s.FileTemplate);
- Parallelism.Load(EffectiveParallelism.ToString(CultureInfo.CurrentCulture));
- CacheFolder.Load(CacheStore.Folder(Shell.Services.Environment, _s));
- ThumbnailMemory.Load(_s.ThumbnailMemoryItems.ToString(CultureInfo.CurrentCulture));
- CacheLimit.Load(_s.CacheLimitGb.ToString(CultureInfo.CurrentCulture));
- DefaultServer.Load(ServerAddress.Display(_s.ServerUrl));
- UpdatePreview();
- LoadCertificates();
- OnAllPropertiesChanged();
+ ApplyAll(imported);
+ // The imported templates and sizes become the open archive's, as when typed in Settings › Archive.
+ _ = PushArchiveSettingsAsync();
Shell.Notify(Loc.L("Settings.Import.Done"));
}
@@ -821,15 +1386,25 @@ public sealed class SettingsViewModel : SectionViewModel
{
foreach (var page in AllPages) page.Refresh();
foreach (var row in Encoders) row.Refresh();
+ foreach (var row in Formats) row.Refresh();
+ foreach (var row in MissingExtensions) row.Refresh();
ArchiveRoot.Refresh();
FolderTemplate.Refresh();
FileTemplate.Refresh();
+ SessionGap.Refresh();
+ MinimumFrames.Refresh();
+ // Decimals are written in the language's own way ("6.25", "6,25").
+ if (!NightBrightness.IsDirty && !StarDensity.IsDirty) LoadAnalysisFields();
+ NightBrightness.Refresh();
+ StarDensity.Refresh();
Parallelism.Refresh();
CacheFolder.Refresh();
ThumbnailMemory.Refresh();
CacheLimit.Refresh();
DefaultServer.Refresh();
UpdateArchiveFree();
+ UpdatePreview();
LoadCertificates();
+ if (_backups.Count > 0) LoadBackups();
}
}
diff --git a/src/Titano.App/Settings/FormatInventory.cs b/src/Titano.App/Settings/FormatInventory.cs
new file mode 100644
index 00000000..ba354da1
--- /dev/null
+++ b/src/Titano.App/Settings/FormatInventory.cs
@@ -0,0 +1,62 @@
+using Titano.App.Infrastructure;
+using Titano.Core.Diagnostics;
+using Titano.Core.Imaging;
+using Titano.Core.Imaging.Decoders;
+using Titano.Core.Windows.Codecs;
+using Titano.Core.Windows.Shell;
+using Titano.Core.Windows.Wic;
+
+namespace Titano.App.Settings;
+
+/// How one format decodes on this PC (Settings › Formats, BRIEF §8.1–8.2).
+/// The best tier the decoder chain reaches (WIC first, then the built-in decoders).
+/// Who delivers it: wic or managed; null when unavailable.
+/// Microsoft Store extensions that would make WIC decode it fully.
+public sealed record FormatRow(ImageFormatInfo Format, DecodeTier Tier, string? Provider, IReadOnlyList Missing);
+
+/// Every known format on this PC, and the Store extensions whose installation would widen them.
+public sealed record FormatReport(IReadOnlyList Formats, IReadOnlyList Missing);
+
+/// The decode tier per format on this PC (BRIEF §8.1: "the format table in Settings › Formats").
+public interface IFormatInventory
+{
+ /// Lists the formats (slow with : call off the UI thread).
+ /// Detect the WIC codecs again, after an extension was installed; the jobs started afterwards use them.
+ FormatReport Detect(bool refresh);
+
+ /// Opens the Microsoft Store page of through the shell (BRIEF §8.6).
+ void OpenStore(StoreExtension extension);
+}
+
+///
+/// The WIC codec inventory of this PC behind the decoder chain of the archive and processing engines, so a refresh
+/// changes what the next jobs decode with; a snapshot of its own while the index is not open.
+///
+public sealed class WicFormatInventory(Func engineProvider) : IFormatInventory
+{
+ private WicDecoderProvider? _own;
+
+ public FormatReport Detect(bool refresh)
+ {
+ var wic = engineProvider() ?? (_own ??= new WicDecoderProvider());
+ var inventory = refresh ? wic.Refresh() : wic.Inventory;
+ var rows = DecoderFactory.DescribeFormats(DecoderFactory.CreateClient(wic))
+ .Select(f => new FormatRow(f.Format, f.Tier, f.Provider, inventory.For(f.Format.Format).MissingExtensions))
+ .ToList();
+ return new FormatReport(rows, inventory.MissingExtensions);
+ }
+
+ /// The Store app's page, or the same product's web page on a PC without the Store app.
+ public void OpenStore(StoreExtension extension)
+ {
+ try
+ {
+ if (ShellLauncher.OpenUrl(extension.StoreUri.AbsoluteUri)) return;
+ }
+ catch (System.ComponentModel.Win32Exception ex)
+ {
+ Log.Warning("formats", $"The Store page of {extension.ProductName} could not be opened", ex);
+ }
+ ShellActions.OpenUrl(extension.WebUri.AbsoluteUri);
+ }
+}
diff --git a/src/Titano.App/Settings/InterfacePriority.cs b/src/Titano.App/Settings/InterfacePriority.cs
new file mode 100644
index 00000000..82cd3c21
--- /dev/null
+++ b/src/Titano.App/Settings/InterfacePriority.cs
@@ -0,0 +1,57 @@
+using System.Windows;
+
+namespace Titano.App.Settings;
+
+///
+/// Settings › Rendering "Background priority": while Titano is the active application, its interface thread runs above
+/// the threads of the jobs, so scrolling and editing stay fluid during renders and analyses; in the background, or with
+/// the option off, every thread runs at normal priority. Jobs run on shared pool threads whose priority cannot be set per
+/// job, so the interface thread is raised instead of the jobs lowered (DECISIONS).
+///
+public sealed class InterfacePriority : IDisposable
+{
+ private readonly Application _app;
+ private readonly Func _enabled;
+ private bool _active;
+
+ public InterfacePriority(Application app, Func enabled)
+ {
+ _app = app;
+ _enabled = enabled;
+ _active = app.Windows.OfType().Any(w => w.IsActive);
+ app.Activated += OnActivated;
+ app.Deactivated += OnDeactivated;
+ Update();
+ }
+
+ /// The interface thread's priority for an option state and whether Titano is the active application.
+ public static ThreadPriority For(bool enabled, bool active) => enabled && active ? ThreadPriority.AboveNormal : ThreadPriority.Normal;
+
+ /// Applies the current option (after Settings changed it).
+ public void Update()
+ {
+ var priority = For(_enabled(), _active);
+ var thread = _app.Dispatcher.Thread;
+ if (thread.Priority != priority) thread.Priority = priority;
+ }
+
+ public void Dispose()
+ {
+ _app.Activated -= OnActivated;
+ _app.Deactivated -= OnDeactivated;
+ _active = false;
+ Update();
+ }
+
+ private void OnActivated(object? sender, EventArgs e)
+ {
+ _active = true;
+ Update();
+ }
+
+ private void OnDeactivated(object? sender, EventArgs e)
+ {
+ _active = false;
+ Update();
+ }
+}
diff --git a/src/Titano.App/Settings/NamingPreview.cs b/src/Titano.App/Settings/NamingPreview.cs
index 1ad6181c..44d861cd 100644
--- a/src/Titano.App/Settings/NamingPreview.cs
+++ b/src/Titano.App/Settings/NamingPreview.cs
@@ -9,8 +9,11 @@ namespace Titano.App.Settings;
///
public static class NamingPreview
{
- /// A sample session used for the preview: three frames, two seconds apart, from a Canon EOS R5.
- public static IReadOnlyList SampleFrames { get; } = BuildSample();
+ ///
+ /// A sample session used for the preview: three frames, two seconds apart, from a Canon EOS R5, titled in the
+ /// interface language (made on each call, so the preview follows a language switch).
+ ///
+ public static IReadOnlyList SampleFrames => BuildSample();
/// The first problem of , localized; null when it is valid.
public static string? Validate(string? template, bool isFolder)
@@ -61,6 +64,7 @@ public static class NamingPreview
private static List BuildSample()
{
var start = new DateTime(2026, 9, 28, 18, 2, 11);
+ var title = Loc.L("Settings.Naming.SampleTitle");
return Enumerable.Range(0, 3).Select(i => new NamingContext
{
CapturedAt = start.AddSeconds(2 * i),
@@ -76,7 +80,7 @@ public static class NamingPreview
FNumber = 8,
OriginalName = "IMG_" + (4211 + i).ToString("0000", System.Globalization.CultureInfo.InvariantCulture),
Extension = "CR2",
- Title = "Harbour sunset",
+ Title = title,
}).ToList();
}
}
diff --git a/src/Titano.App/Settings/ProcessingTuning.cs b/src/Titano.App/Settings/ProcessingTuning.cs
new file mode 100644
index 00000000..aa2560f3
--- /dev/null
+++ b/src/Titano.App/Settings/ProcessingTuning.cs
@@ -0,0 +1,68 @@
+using Titano.App.Infrastructure;
+using Titano.Core.Analysis.Deep;
+using Titano.Core.Project;
+using Titano.Data.Processing;
+
+namespace Titano.App.Settings;
+
+///
+/// Settings › Rendering and Analysis applied to this PC's jobs (asked at the start of each analysis and render, so a
+/// change applies to the next job): the memory budget and cache folder of the frame window, the quality profile, the
+/// parallelism and the analysis width and thresholds.
+///
+public static class ProcessingTuning
+{
+ /// Long edge of the frames the render's preparation pass measures, per quality profile ("Best doubles sampling").
+ public static int PreparationLongEdge(QualityProfile quality) => quality switch
+ {
+ QualityProfile.Best => 1024,
+ QualityProfile.Fast => 256,
+ _ => 512,
+ };
+
+ /// Optical-flow quality of projects that neither the user nor the advisor set, per quality profile.
+ public static FlowQualitySetting FlowQuality(QualityProfile quality) => quality switch
+ {
+ QualityProfile.Best => FlowQualitySetting.Best,
+ QualityProfile.Fast => FlowQualitySetting.Draft,
+ _ => FlowQualitySetting.Balanced,
+ };
+
+ /// Frames decoded ahead of the render position, per quality profile (Best keeps more in flight, within the budget).
+ public static int ReadAhead(QualityProfile quality) => quality == QualityProfile.Best ? 8 : 4;
+
+ /// Auto parallelism: logical cores minus four, so the interface stays responsive (at least one).
+ public static int ParallelismAuto(int logicalCores) => int.Max(1, logicalCores - 4);
+
+ /// Workers and threads this PC's jobs use: the user's value, or Auto.
+ public static int Parallelism(AppSettings settings, int logicalCores) => settings.Parallelism is { } n and > 0 ? n : ParallelismAuto(logicalCores);
+
+ /// The frame memory budget in bytes: the user's GB, or Auto (a quarter of ).
+ public static long MemoryBudget(AppSettings settings, long installedBytes) =>
+ settings.MemoryBudgetGb is { } gb ? gb * (1L << 30) : long.Max(1L << 30, installedBytes / 4);
+
+ /// with the user's current Rendering and Analysis settings.
+ public static ProcessingOptions Apply(ProcessingOptions basis, AppSettings settings, long installedBytes, int logicalCores, string spillDirectory)
+ {
+ var parallelism = Parallelism(settings, logicalCores);
+ return basis with
+ {
+ FrameWindow = basis.FrameWindow with
+ {
+ MemoryBudget = MemoryBudget(settings, installedBytes),
+ SpillDirectory = spillDirectory,
+ Ahead = ReadAhead(settings.Quality),
+ MaxConcurrentLoads = int.Clamp(parallelism, 1, basis.FrameWindow.MaxConcurrentLoads),
+ },
+ Render = basis.Render with
+ {
+ AnalysisLongEdge = PreparationLongEdge(settings.Quality),
+ DefaultFlowQuality = FlowQuality(settings.Quality),
+ },
+ DeepAnalysis = settings.DeepAnalysis(basis.DeepAnalysis) with
+ {
+ MaxDegreeOfParallelism = int.Clamp(parallelism, 1, DeepAnalysisOptions.Default.MaxDegreeOfParallelism),
+ },
+ };
+ }
+}
diff --git a/src/Titano.App/Settings/SettingsRows.cs b/src/Titano.App/Settings/SettingsRows.cs
index 51ed12a5..33c22cd9 100644
--- a/src/Titano.App/Settings/SettingsRows.cs
+++ b/src/Titano.App/Settings/SettingsRows.cs
@@ -1,17 +1,23 @@
using System.Windows.Input;
using Titano.App.Infrastructure;
+using Titano.Core.Imaging;
using Titano.Core.Localization;
+using Titano.Core.Windows.Codecs;
+using Titano.Data;
using Titano.Ui.Controls;
using Titano.Ui.Mvvm;
namespace Titano.App.Settings;
-/// Sections of the Settings screen (BRIEF §12.8).
+/// Sections of the Settings screen (BRIEF §12.8), in the order of Settings.html.
public enum SettingsPage
{
General,
Archive,
+ Import,
+ Analysis,
Rendering,
+ Formats,
Storage,
Server,
Updates,
@@ -115,6 +121,86 @@ public sealed class EncoderRowViewModel(EncoderRow row) : ObservableObject
}
}
+/// One row of the Settings › Formats table: a format, the tier it decodes at on this PC and who decodes it.
+public sealed class FormatRowViewModel(FormatRow row) : ObservableObject
+{
+ public FormatRow Row { get; } = row;
+
+ /// "CR3", "JPEG XL": the format's technical name, the same in every language.
+ public string Name => FormatNames.Of(Row.Format.Format);
+
+ /// ".heic .heif .hif".
+ public string Extensions => string.Join(' ', Row.Format.Extensions.Select(e => "." + e));
+
+ public StatusKind TierKind => Row.Tier switch
+ {
+ DecodeTier.Native => StatusKind.Done,
+ DecodeTier.EmbeddedPreview => StatusKind.Warning,
+ _ => StatusKind.Failed,
+ };
+
+ /// "Full decode", "Preview only", "Not supported".
+ public string TierText => Loc.L("Settings.Formats.Tier." + Row.Tier);
+
+ public string TierToolTip => Loc.L("Tooltips.Settings.Tier." + Row.Tier);
+
+ /// "Windows", "Titano" or "—".
+ public string DecoderText => Row.Provider switch
+ {
+ "wic" => Loc.L("Settings.Formats.Decoder.Windows"),
+ "managed" => Loc.L("Settings.Formats.Decoder.BuiltIn"),
+ _ => "—",
+ };
+
+ /// The Store extensions that would decode it fully, or "—".
+ public string NeedsText => Row.Missing.Count == 0 ? "—" : string.Join(Loc.Separator, Row.Missing.Select(m => m.ProductName));
+
+ public bool HasNeeds => Row.Missing.Count > 0;
+
+ /// What a screen reader reads for the row: "CR3: Preview only".
+ public string Announcement => Loc.L("Settings.Formats.RowName", Name, TierText);
+
+ internal void Refresh() => OnAllPropertiesChanged();
+}
+
+/// A codec extension whose installation would widen the formats this PC decodes (BRIEF §8.1 notice).
+public sealed class MissingExtensionViewModel(StoreExtension extension, ICommand install) : ObservableObject
+{
+ public StoreExtension Extension { get; } = extension;
+
+ /// "HEIF Image Extensions missing".
+ public string Text => Loc.L("Settings.Formats.Missing", Extension.ProductName);
+
+ /// The Install button's name for screen readers: "Install HEIF Image Extensions".
+ public string InstallName => Loc.L("Settings.Formats.InstallName", Extension.ProductName);
+
+ public ICommand InstallCommand { get; } = install;
+
+ internal void Refresh() => OnAllPropertiesChanged();
+}
+
+/// A copy of the index offered by Settings › Advanced › Restore: "12/10/2026 03:00 · 48 MB".
+public sealed record BackupOption(DatabaseBackup Backup)
+{
+ public string Label => string.Join(Loc.Separator, $"{Formatting.Date(Backup.Created)} {Formatting.TimeOfDay(Backup.Created)}", Formatting.Bytes(Backup.Bytes));
+
+ public override string ToString() => Label;
+}
+
+/// Technical names of the image formats (Settings › Formats), identical in every language like codec names.
+public static class FormatNames
+{
+ public static string Of(ImageFileFormat format) => format switch
+ {
+ ImageFileFormat.Jpeg => "JPEG",
+ ImageFileFormat.WebP => "WebP",
+ ImageFileFormat.JpegXl => "JPEG XL",
+ ImageFileFormat.JpegXr => "JPEG XR",
+ ImageFileFormat.ThreeFr => "3FR",
+ _ => format.ToString().ToUpperInvariant(),
+ };
+}
+
/// A trusted server certificate in Settings › Server.
public sealed class TrustedCertificateRow(TrustedCertificate certificate, ICommand forget)
{
diff --git a/src/Titano.App/Shell/ScreenCapture.cs b/src/Titano.App/Shell/ScreenCapture.cs
index 2f4ad195..b9332acf 100644
--- a/src/Titano.App/Shell/ScreenCapture.cs
+++ b/src/Titano.App/Shell/ScreenCapture.cs
@@ -71,6 +71,7 @@ public static class ScreenCapture
shell.About.SetResult(null);
await shell.Settings.DetectEncodersAsync();
await shell.Settings.SelfTestAsync();
+ await shell.Settings.DetectFormatsAsync(refresh: false);
foreach (var theme in Themes)
{
diff --git a/src/Titano.Core.Windows/Wic/WicDecoderProvider.cs b/src/Titano.Core.Windows/Wic/WicDecoderProvider.cs
index 12034051..03301674 100644
--- a/src/Titano.Core.Windows/Wic/WicDecoderProvider.cs
+++ b/src/Titano.Core.Windows/Wic/WicDecoderProvider.cs
@@ -31,12 +31,18 @@ public sealed class WicDecoderProvider : IImageDecoderProvider
/// The photo-policy query covers every WIC container; the raw paths catch decoders without the policy.
private static readonly string[] OrientationQueries = ["System.Photo.Orientation", "/app1/ifd/{ushort=274}", "/ifd/{ushort=274}"];
+ private volatile CodecInventory _inventory;
+
/// Codec snapshot deciding ; detected now when omitted.
- public WicDecoderProvider(CodecInventory? inventory = null) => Inventory = inventory ?? CodecInventory.Detect();
+ public WicDecoderProvider(CodecInventory? inventory = null) => _inventory = inventory ?? CodecInventory.Detect();
public string Name => "wic";
- public CodecInventory Inventory { get; }
+ /// The codec snapshot in use; replaces it.
+ public CodecInventory Inventory => _inventory;
+
+ /// Detects the codecs again (after a Store extension was installed); decodes that start afterwards use them.
+ public CodecInventory Refresh() => _inventory = CodecInventory.Detect(refresh: true);
public DecodeTier? TierFor(ImageFileFormat format) => Inventory.IsNative(format) ? DecodeTier.Native : null;
diff --git a/src/Titano.Core/Archiving/ArchiveManifest.cs b/src/Titano.Core/Archiving/ArchiveManifest.cs
index 6918ff9f..7aaac660 100644
--- a/src/Titano.Core/Archiving/ArchiveManifest.cs
+++ b/src/Titano.Core/Archiving/ArchiveManifest.cs
@@ -19,8 +19,20 @@ public sealed record ArchiveManifest
public LayoutTemplates LayoutTemplates { get; init; } = new();
public ProxyPolicy ProxyPolicy { get; init; } = new();
+ ///
+ /// The default policy when absent: archives written before it existed have none, and the source-generated reader
+ /// sets an init-only property it does not find to null rather than keeping its initializer.
+ ///
+ public ThumbnailPolicy ThumbnailPolicy
+ {
+ get => _thumbnailPolicy;
+ init => _thumbnailPolicy = value ?? new ThumbnailPolicy();
+ }
+
[JsonExtensionData]
public Dictionary? Extra { get; set; }
+
+ private readonly ThumbnailPolicy _thumbnailPolicy = new();
}
/// Naming templates used when frames enter the archive (BRIEF §7.1).
@@ -46,4 +58,39 @@ public sealed record ProxyPolicy
[JsonExtensionData]
public Dictionary? Extra { get; set; }
+
+ /// True for the long edges an archive accepts: disabled, full size, or 256 to 8192 px.
+ public static bool IsValidLongEdge(int longEdge) => longEdge is Disabled or FullSize or (>= 256 and <= 8192);
+}
+
+/// Thumbnail policy (BRIEF §8.5): long edge and JPEG quality of the thumbnails packed per sequence.
+public sealed record ThumbnailPolicy
+{
+ public const int MinLongEdge = 160;
+ public const int MaxLongEdge = 1024;
+
+ ///
+ /// Long edge in pixels (320 by default); thumbnails built before a change keep their size until rebuilt. A value the
+ /// file lacks (read as 0) is the default.
+ ///
+ public int LongEdge
+ {
+ get => _longEdge;
+ init => _longEdge = value > 0 ? value : FrameImageRenderer.ThumbnailLongEdge;
+ }
+
+ /// JPEG quality (80 by default); a value the file lacks (read as 0) or out of 1–100 is the default.
+ public int Quality
+ {
+ get => _quality;
+ init => _quality = value is > 0 and <= 100 ? value : FrameImageRenderer.ThumbnailQuality;
+ }
+
+ [JsonExtensionData]
+ public Dictionary? Extra { get; set; }
+
+ private readonly int _longEdge = FrameImageRenderer.ThumbnailLongEdge;
+ private readonly int _quality = FrameImageRenderer.ThumbnailQuality;
+
+ public static bool IsValidLongEdge(int longEdge) => longEdge is >= MinLongEdge and <= MaxLongEdge;
}
diff --git a/src/Titano.Core/Archiving/FrameImageRenderer.cs b/src/Titano.Core/Archiving/FrameImageRenderer.cs
index 0cdbfff3..62b753cd 100644
--- a/src/Titano.Core/Archiving/FrameImageRenderer.cs
+++ b/src/Titano.Core/Archiving/FrameImageRenderer.cs
@@ -17,12 +17,16 @@ public sealed class FrameImageRenderer(ImageDecoder decoder)
public const int ThumbnailQuality = 80;
/// A 320 px q80 thumbnail, or null when no decoder can read the frame.
- public EncodedImage? Thumbnail(SequencePaths sequence, SidecarFrame frame, CancellationToken cancellationToken = default)
+ public EncodedImage? Thumbnail(SequencePaths sequence, SidecarFrame frame, CancellationToken cancellationToken = default) =>
+ Thumbnail(sequence, frame, new ThumbnailPolicy(), cancellationToken);
+
+ /// A thumbnail at the policy's long edge and quality (the archive's, BRIEF §8.5), or null when no decoder can read the frame.
+ public EncodedImage? Thumbnail(SequencePaths sequence, SidecarFrame frame, ThumbnailPolicy policy, CancellationToken cancellationToken = default)
{
- using var decoded = Decode(sequence.File(frame.File), frame, ThumbnailLongEdge, DecodePurpose.Thumbnail, preferPreview: true, cancellationToken);
+ using var decoded = Decode(sequence.File(frame.File), frame, policy.LongEdge, DecodePurpose.Thumbnail, preferPreview: true, cancellationToken);
if (decoded is null) return null;
- using var small = Resampler.Thumbnail(decoded.Pixels, ThumbnailLongEdge);
- return Encode(small, new JpegEncodeOptions { Quality = ThumbnailQuality }, decoded.Tier);
+ using var small = Resampler.Thumbnail(decoded.Pixels, policy.LongEdge);
+ return Encode(small, new JpegEncodeOptions { Quality = policy.Quality }, decoded.Tier);
}
/// A proxy at the policy's long edge and quality with capture time and camera in its Exif; null when undecodable.
diff --git a/src/Titano.Core/Render/RenderModels.cs b/src/Titano.Core/Render/RenderModels.cs
index 27f90c1c..5c4954d0 100644
--- a/src/Titano.Core/Render/RenderModels.cs
+++ b/src/Titano.Core/Render/RenderModels.cs
@@ -43,6 +43,9 @@ public sealed record RenderOptions
/// Prepared (exposure-corrected, warped) frames kept for flow and interpolation neighbours (at least 3).
public int CacheFrames { get; init; } = 4;
+ /// Optical-flow quality of a project that neither the user nor the advisor set (the host's quality profile).
+ public FlowQualitySetting DefaultFlowQuality { get; init; } = FlowQualitySetting.Balanced;
+
public RenderPlanOptions Plan { get; init; } = RenderPlanOptions.Default;
}
diff --git a/src/Titano.Core/Render/RenderPipeline.cs b/src/Titano.Core/Render/RenderPipeline.cs
index a984dcb1..c83468b2 100644
--- a/src/Titano.Core/Render/RenderPipeline.cs
+++ b/src/Titano.Core/Render/RenderPipeline.cs
@@ -139,7 +139,7 @@ internal sealed class RenderRun : IDisposable
}
var motion = input.Project.Motion;
_targetShutter = double.Clamp(motion.TargetShutterAngle.Resolve(180.0), 0, 360);
- _flowQuality = motion.FlowQuality.Resolve(FlowQualitySetting.Balanced) switch
+ _flowQuality = motion.FlowQuality.Resolve(options.DefaultFlowQuality) switch
{
FlowQualitySetting.Draft => FlowQuality.Draft,
FlowQualitySetting.Best => FlowQuality.Best,
diff --git a/src/Titano.Data/Archiving/ArchiveImages.cs b/src/Titano.Data/Archiving/ArchiveImages.cs
index e8ae63be..408e766c 100644
--- a/src/Titano.Data/Archiving/ArchiveImages.cs
+++ b/src/Titano.Data/Archiving/ArchiveImages.cs
@@ -39,6 +39,7 @@ public sealed class ArchiveImages
{
var paths = new ArchivePaths(archive.RootPath);
ArchiveVolume.EnsureWritable(paths);
+ var policy = ManifestStore.ReadArchive(paths.ManifestPath).ThumbnailPolicy;
var folder = paths.Sequence(sequence.Folder);
var manifest = ManifestStore.ReadSequence(folder.ManifestPath);
int built = 0, reused = 0, undecodable = 0;
@@ -58,7 +59,7 @@ public sealed class ArchiveImages
reused++;
continue;
}
- if (Render(() => _renderer.Thumbnail(folder, frame, cancellationToken)) is { } image)
+ if (Render(() => _renderer.Thumbnail(folder, frame, policy, cancellationToken)) is { } image)
{
pack.Append(frame.I, image.Width, image.Height, fingerprint, image.Jpeg);
built++;
diff --git a/src/Titano.Data/Archiving/ArchiveMaintenance.cs b/src/Titano.Data/Archiving/ArchiveMaintenance.cs
index 7e598f2d..74b1bf56 100644
--- a/src/Titano.Data/Archiving/ArchiveMaintenance.cs
+++ b/src/Titano.Data/Archiving/ArchiveMaintenance.cs
@@ -19,6 +19,9 @@ public sealed record OrphanReport(IReadOnlyList Sequences, IRea
}
/// What a maintenance run removed or changed (or would, in a dry run).
+/// Bytes of free pages in the SQLite index before the run; null on PostgreSQL (autovacuum) or
+/// when a resumed run had passed that step.
+/// Bytes the index vacuum gave back; 0 in a dry run or when too little was free to rewrite the file.
public sealed record MaintenanceReport(
bool DryRun,
IReadOnlyList StaleLeases,
@@ -27,7 +30,9 @@ public sealed record MaintenanceReport(
int DuplicateGroups,
int DuplicateFlagChanges,
int UnindexedFiles,
- int MissingFiles);
+ int MissingFiles,
+ long? IndexReclaimable = null,
+ long IndexReclaimed = 0);
/// Duplicates, orphans and housekeeping of an archive (BRIEF §12.5). Originals are never touched.
public sealed class ArchiveMaintenance
@@ -41,6 +46,10 @@ public sealed class ArchiveMaintenance
/// Packs with more reclaimable bytes than this share are compacted.
private const double CompactionRatio = 0.3;
+ /// The SQLite index is vacuumed when at least this share of it is free pages: rewriting a large index for a
+ /// few pages would hold its writers for nothing.
+ internal const double IndexVacuumRatio = 0.1;
+
private readonly TitanoDatabase _db;
private readonly SequenceWriter _writer;
private readonly ArchiveIndexer _indexer;
@@ -99,10 +108,10 @@ public sealed class ArchiveMaintenance
}
/// Number of maintenance steps (the job checkpoints after each).
- internal const int StepCount = 4;
+ internal const int StepCount = 5;
/// Runs the maintenance steps from : stale leases, leftover temporary files,
- /// thumbnail pack compaction, duplicate flags. A dry run only reports.
+ /// thumbnail pack compaction, duplicate flags, index vacuum (SQLite). A dry run only reports.
public async Task RunAsync(Archive archive, bool dryRun, int firstStep, Func stepDone,
CancellationToken cancellationToken = default)
{
@@ -111,6 +120,8 @@ public sealed class ArchiveMaintenance
var locations = await _db.Sequences.ListLocationsAsync(archive.Id, cancellationToken).ConfigureAwait(false);
IReadOnlyList leases = [], temps = [], packs = [];
int groups = 0, flagChanges = 0;
+ long? reclaimable = null;
+ long reclaimed = 0;
for (var step = firstStep; step < StepCount; step++)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -128,11 +139,27 @@ public sealed class ArchiveMaintenance
case 3:
(groups, flagChanges) = await FlagDuplicatesAsync(archive, paths, dryRun, cancellationToken).ConfigureAwait(false);
break;
+ case 4:
+ (reclaimable, reclaimed) = await VacuumIndexAsync(dryRun, cancellationToken).ConfigureAwait(false);
+ break;
}
await stepDone(step + 1).ConfigureAwait(false);
}
var orphans = await FindOrphansAsync(archive, cancellationToken).ConfigureAwait(false);
- return new MaintenanceReport(dryRun, leases, temps, packs, groups, flagChanges, orphans.UnindexedFiles, orphans.MissingFiles);
+ return new MaintenanceReport(dryRun, leases, temps, packs, groups, flagChanges, orphans.UnindexedFiles, orphans.MissingFiles, reclaimable, reclaimed);
+ }
+
+ ///
+ /// The SQLite index's free pages, given back by a vacuum when they are at least of the
+ /// file (BRIEF §12.5 "SQLite vacuum"); nothing on PostgreSQL, whose autovacuum does it.
+ ///
+ private async Task<(long? Reclaimable, long Reclaimed)> VacuumIndexAsync(bool dryRun, CancellationToken cancellationToken)
+ {
+ if (await _db.SpaceAsync(cancellationToken).ConfigureAwait(false) is not { } space) return (null, 0);
+ if (dryRun || space.ReclaimableBytes == 0 || space.ReclaimableBytes < space.FileBytes * IndexVacuumRatio) return (space.ReclaimableBytes, 0);
+ var (before, after) = await _db.VacuumAsync(cancellationToken).ConfigureAwait(false);
+ Log.Info("archive", $"Index vacuumed: {before.FileBytes} → {after.FileBytes} bytes");
+ return (space.ReclaimableBytes, long.Max(0, before.FileBytes - after.FileBytes));
}
/// Staging copies and atomic-write temporaries left behind by crashes (never originals).
diff --git a/src/Titano.Data/Archiving/ArchiveService.cs b/src/Titano.Data/Archiving/ArchiveService.cs
index 92aff0f9..d782fd3e 100644
--- a/src/Titano.Data/Archiving/ArchiveService.cs
+++ b/src/Titano.Data/Archiving/ArchiveService.cs
@@ -3,6 +3,7 @@ using Titano.Core.Archiving;
using Titano.Core.Diagnostics;
using Titano.Core.Import;
using Titano.Core.Model;
+using Titano.Core.Naming;
using Titano.Data.Archiving.Jobs;
using Titano.Data.Jobs;
@@ -10,12 +11,15 @@ namespace Titano.Data.Archiving;
///
/// What the desktop client and the server call to work with archives (BRIEF §7, §12.4, §12.5, §14.4): open, create
-/// or adopt an archive, plan and apply mass renames, plan imports and card erases, delete sequences into the trash and
-/// restore them, query duplicates and orphans, and
+/// or adopt an archive, read and change its settings, plan and apply mass renames, plan imports and card erases, delete
+/// sequences into the trash and restore them, query duplicates and orphans, and
/// the job handlers for the long operations (enqueue them with ).
///
public sealed class ArchiveService : IJobHandlerProvider
{
+ /// Lease serialising read-modify-write of archive.json between the processes sharing an archive.
+ private const string SettingsLease = "archive-settings";
+
private readonly TitanoDatabase _db;
private readonly SequenceWriter _writer;
@@ -61,19 +65,33 @@ public sealed class ArchiveService : IJobHandlerProvider
/// Makes a new, empty archive and indexes it.
/// The folder already is an archive (open it instead).
- public async Task CreateAsync(string root, string name, LayoutTemplates? templates = null, ProxyPolicy? proxies = null,
- CancellationToken cancellationToken = default)
+ public Task CreateAsync(string root, string name, LayoutTemplates? templates = null, ProxyPolicy? proxies = null,
+ CancellationToken cancellationToken = default) =>
+ CreateAsync(root, new ArchiveSettings(name, templates ?? new LayoutTemplates(), proxies ?? new ProxyPolicy(), new ThumbnailPolicy()), cancellationToken);
+
+ ///
+ /// Makes a new, empty archive with and indexes it. A blank name
+ /// becomes the folder's name; a longer one than is shortened.
+ ///
+ /// The folder already is an archive (open it instead).
+ /// A template or policy is invalid ( names it).
+ public async Task CreateAsync(string root, ArchiveSettings settings, CancellationToken cancellationToken = default)
{
+ ArgumentNullException.ThrowIfNull(settings);
var paths = new ArchivePaths(root);
+ var name = string.IsNullOrWhiteSpace(settings.Name) ? Path.GetFileName(paths.Root) is { Length: > 0 } folder ? folder : paths.Root : settings.Name.Trim();
+ settings = settings with { Name = name.Length > ArchiveSettings.MaxNameLength ? name[..ArchiveSettings.MaxNameLength] : name };
+ if (settings.Problem() is { } field) throw new ArgumentException($"The archive setting {field} is invalid.", field);
if (File.Exists(paths.ManifestPath)) throw new InvalidOperationException($"{paths.Root} already is a Titano archive.");
Directory.CreateDirectory(paths.MetaDirectory);
var manifest = new ArchiveManifest
{
Id = Guid.CreateVersion7(),
- Name = name,
+ Name = settings.Name.Trim(),
Created = DateTimeOffset.UtcNow,
- LayoutTemplates = templates ?? new LayoutTemplates(),
- ProxyPolicy = proxies ?? new ProxyPolicy(),
+ LayoutTemplates = settings.Templates,
+ ProxyPolicy = settings.Proxies,
+ ThumbnailPolicy = settings.Thumbnails,
};
ManifestStore.WriteArchive(paths.ManifestPath, manifest);
return await RegisterAsync(paths, manifest, cancellationToken).ConfigureAwait(false);
@@ -112,6 +130,73 @@ public sealed class ArchiveService : IJobHandlerProvider
: CreateAsync(root, name ?? Path.GetFileName(paths.Root), null, null, cancellationToken);
}
+ ///
+ /// for a folder that may become a new archive with
+ /// (templates and policies; the folder's name when its name is blank). An existing
+ /// archive keeps its own settings.
+ ///
+ public Task AdoptAsync(string root, ArchiveSettings defaults, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(defaults);
+ return File.Exists(new ArchivePaths(root).ManifestPath) ? OpenAsync(root, cancellationToken) : CreateAsync(root, defaults, cancellationToken);
+ }
+
+ ///
+ /// The settings in the archive's archive.json; those of the index (with the default thumbnail policy, which only
+ /// the file keeps) while the file cannot be read.
+ ///
+ public async Task GetSettingsAsync(Guid archiveId, CancellationToken cancellationToken = default)
+ {
+ var archive = await LoadArchiveAsync(archiveId, cancellationToken).ConfigureAwait(false);
+ var paths = new ArchivePaths(archive.RootPath);
+ try
+ {
+ if (File.Exists(paths.ManifestPath)) return ArchiveSettings.Of(ManifestStore.ReadArchive(paths.ManifestPath));
+ }
+ catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException)
+ {
+ Log.Warning("archive", $"The settings of {paths.Root} cannot be read; the index's are used", ex);
+ }
+ return new ArchiveSettings(archive.Name, new LayoutTemplates { Folder = archive.FolderTemplate, File = archive.FileTemplate },
+ new ProxyPolicy { LongEdge = archive.ProxyLongEdge }, new ThumbnailPolicy());
+ }
+
+ ///
+ /// Changes an archive's settings in its archive.json (the source of truth, BRIEF §7), then in the index.
+ /// receives the settings read from the file under the archive's settings lease, so a server and
+ /// a client sharing the archive never undo each other's change; the file is replaced atomically. Folders and files
+ /// already in the archive keep their names: templates and policies apply to the next imports, proxies and thumbnails.
+ ///
+ /// An edited setting is invalid ( names it).
+ /// The archive is offline or read-only.
+ /// Another process kept the archive's settings busy.
+ public async Task UpdateSettingsAsync(Guid archiveId, Func edit, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(edit);
+ var archive = await LoadArchiveAsync(archiveId, cancellationToken).ConfigureAwait(false);
+ var paths = new ArchivePaths(archive.RootPath);
+ ArchiveVolume.EnsureWritable(paths);
+ ArchiveManifest manifest;
+ using (await LeaseFile.AcquireAsync(paths.LocksDirectory, SettingsLease, _writer.Options.Owner, _writer.Options.LeaseWait, _writer.Options.LeaseDuration,
+ cancellationToken).ConfigureAwait(false))
+ {
+ var current = ManifestStore.ReadArchive(paths.ManifestPath);
+ if (current.Id != archive.Id) throw new InvalidDataException($"{paths.ManifestPath} belongs to archive {current.Id}, not {archive.Id}.");
+ var settings = edit(ArchiveSettings.Of(current));
+ if (settings.Problem() is { } field) throw new ArgumentException($"The archive setting {field} is invalid.", field);
+ manifest = current with
+ {
+ Name = settings.Name.Trim(),
+ LayoutTemplates = settings.Templates,
+ ProxyPolicy = settings.Proxies,
+ ThumbnailPolicy = settings.Thumbnails,
+ };
+ if (manifest != current) ManifestStore.WriteArchive(paths.ManifestPath, manifest);
+ }
+ Log.Info("archive", $"Settings of {paths.Root}: {manifest.LayoutTemplates.Folder} · {manifest.LayoutTemplates.File}, proxies {manifest.ProxyPolicy.LongEdge}, thumbnails {manifest.ThumbnailPolicy.LongEdge}");
+ return await RegisterAsync(paths, manifest, cancellationToken).ConfigureAwait(false);
+ }
+
public static ArchiveAvailability GetAvailability(Archive archive) => ArchiveVolume.Probe(new ArchivePaths(archive.RootPath));
/// Changes title, tags, rating and notes in the sidecar and the index together (settings version + 1).
@@ -242,11 +327,35 @@ public sealed class ArchiveService : IJobHandlerProvider
/// The fields of a sequence the user describes it with (sidecar and index).
public sealed record SequenceInfo(string? Title, IReadOnlyList Tags, int Rating, string? Notes);
+///
+/// The settings an archive keeps in archive.json (BRIEF §7, §8.5): its name, the naming templates of new imports
+/// and the policies of the proxies and thumbnails built from now on.
+///
+public sealed record ArchiveSettings(string Name, LayoutTemplates Templates, ProxyPolicy Proxies, ThumbnailPolicy Thumbnails)
+{
+ public const int MaxNameLength = 100;
+
+ public static ArchiveSettings Of(ArchiveManifest manifest) => new(manifest.Name, manifest.LayoutTemplates, manifest.ProxyPolicy, manifest.ThumbnailPolicy);
+
+ /// The first invalid field by its API name (name, folderTemplate, fileTemplate,
+ /// proxyLongEdge, thumbnailLongEdge); null when every field is valid.
+ public string? Problem()
+ {
+ if (string.IsNullOrWhiteSpace(Name) || Name.Trim().Length > MaxNameLength) return "name";
+ if (string.IsNullOrWhiteSpace(Templates.Folder) || !PathTemplate.Parse(Templates.Folder).IsValid) return "folderTemplate";
+ if (string.IsNullOrWhiteSpace(Templates.File) || !PathTemplate.Parse(Templates.File).IsValid) return "fileTemplate";
+ if (!ProxyPolicy.IsValidLongEdge(Proxies.LongEdge) || Proxies.Quality is < 1 or > 100) return "proxyLongEdge";
+ if (!ThumbnailPolicy.IsValidLongEdge(Thumbnails.LongEdge) || Thumbnails.Quality is < 1 or > 100) return "thumbnailLongEdge";
+ return null;
+ }
+}
+
/// Builds the archive jobs; enqueue with .
public static class ArchiveJobs
{
- public static ArchiveJobRequest Scan(Archive archive, bool full = false) =>
- new(JobKind.Scan, [archive.Id], archive.Name, Json(new ScanParameters(full), ArchiveJobJson.Default.ScanParameters), JobPriority.User);
+ /// Also queue a background deep analysis of the sequences the scan indexes (see ).
+ public static ArchiveJobRequest Scan(Archive archive, bool full = false, bool deepAnalysis = false) =>
+ new(JobKind.Scan, [archive.Id], archive.Name, Json(new ScanParameters(full, deepAnalysis), ArchiveJobJson.Default.ScanParameters), JobPriority.User);
public static ArchiveJobRequest Rebuild(Archive archive) => new(JobKind.Rebuild, [archive.Id], archive.Name, null, JobPriority.User);
diff --git a/src/Titano.Data/Archiving/Jobs/ArchiveJobParameters.cs b/src/Titano.Data/Archiving/Jobs/ArchiveJobParameters.cs
index f0224e17..0992daf0 100644
--- a/src/Titano.Data/Archiving/Jobs/ArchiveJobParameters.cs
+++ b/src/Titano.Data/Archiving/Jobs/ArchiveJobParameters.cs
@@ -6,7 +6,9 @@ using Titano.Core.Model;
namespace Titano.Data.Archiving.Jobs;
/// : target = the archive.
-public sealed record ScanParameters(bool Full);
+/// The sequences the scan brings into the index (or whose frames it changes) also get a deep
+/// analysis in the background, after their light one (Settings › Analysis on the desktop).
+public sealed record ScanParameters(bool Full, bool DeepAnalysis = false);
/// : target = the archive; null sequences = all of them.
public sealed record VerifyParameters(IReadOnlyList? SequenceIds);
diff --git a/src/Titano.Data/Archiving/Jobs/MaintenanceJobHandler.cs b/src/Titano.Data/Archiving/Jobs/MaintenanceJobHandler.cs
index 23503433..e56ea7ae 100644
--- a/src/Titano.Data/Archiving/Jobs/MaintenanceJobHandler.cs
+++ b/src/Titano.Data/Archiving/Jobs/MaintenanceJobHandler.cs
@@ -7,7 +7,8 @@ namespace Titano.Data.Archiving.Jobs;
///
/// : stale leases, leftover temporary files, thumbnail pack compaction, duplicate
-/// flags, then an orphan count. Checkpoint: the number of steps done.
+/// flags, the SQLite index vacuum (its reclaimable size in a dry run), then an orphan count. Checkpoint: the number of
+/// steps done.
///
internal sealed class MaintenanceJobHandler(TitanoDatabase db, ArchiveMaintenance maintenance) : IJobHandler
{
@@ -24,6 +25,11 @@ internal sealed class MaintenanceJobHandler(TitanoDatabase db, ArchiveMaintenanc
if (dryRun) context.Log(Loc.L("Archive.Log.DryRun"));
context.Log(Loc.L("Archive.Log.MaintenanceDone", report.StaleLeases.Count, report.TemporaryFiles.Count, report.CompactedPacks.Count,
report.DuplicateFlagChanges));
+ if (report.IndexReclaimed > 0) context.Log(Loc.L("Archive.Log.IndexVacuumed", Megabytes(report.IndexReclaimed)));
+ else if (report.IndexReclaimable is { } reclaimable) context.Log(Loc.L("Archive.Log.IndexReclaimable", Megabytes(reclaimable)));
context.Log(Loc.L("Archive.Log.Orphans", report.UnindexedFiles, report.MissingFiles));
}
+
+ /// "12.4 MB" in the language of the log.
+ private static string Megabytes(long bytes) => Loc.L("Common.Size.MB", (bytes / 1e6).ToString("0.#", Loc.Culture));
}
diff --git a/src/Titano.Data/Archiving/Jobs/ScanJobHandler.cs b/src/Titano.Data/Archiving/Jobs/ScanJobHandler.cs
index 7935157f..e0812277 100644
--- a/src/Titano.Data/Archiving/Jobs/ScanJobHandler.cs
+++ b/src/Titano.Data/Archiving/Jobs/ScanJobHandler.cs
@@ -18,7 +18,7 @@ internal static class JobArchive
/// (incremental, or full with ) and
/// . Checkpoint: after:<folder>, the last folder indexed. When anything was
/// indexed, the sequences without a current light analysis (adopted folders, new sidecars, photos added to a folder) are
-/// queued for it.
+/// queued for it, and for a background deep analysis too when asks.
///
internal sealed class ScanJobHandler(TitanoDatabase db, ArchiveIndexer indexer, JobKind kind) : IJobHandler
{
@@ -29,9 +29,8 @@ internal sealed class ScanJobHandler(TitanoDatabase db, ArchiveIndexer indexer,
public async Task RunAsync(JobContext context)
{
var archive = await JobArchive.LoadAsync(db, context.Job, context.Cancellation).ConfigureAwait(false);
- var mode = kind == JobKind.Rebuild ? ScanMode.Rebuild
- : ArchiveJobJson.Read(context.Job, ArchiveJobJson.Default.ScanParameters, new ScanParameters(false)).Full ? ScanMode.Full
- : ScanMode.Incremental;
+ var parameters = ArchiveJobJson.Read(context.Job, ArchiveJobJson.Default.ScanParameters, new ScanParameters(false));
+ var mode = kind == JobKind.Rebuild ? ScanMode.Rebuild : parameters.Full ? ScanMode.Full : ScanMode.Incremental;
var resume = context.Checkpoint is { } checkpoint && checkpoint.StartsWith(Prefix, StringComparison.Ordinal) ? checkpoint[Prefix.Length..] : null;
var summary = await indexer.ScanAsync(archive, mode, resume, async p =>
{
@@ -42,7 +41,10 @@ internal sealed class ScanJobHandler(TitanoDatabase db, ArchiveIndexer indexer,
context.Log(Loc.L("Archive.Log.ScanDone", summary.Folders, summary.Indexed, summary.Adopted, summary.Removed));
// A resumed scan may have indexed its folders before the interruption.
if (summary.Indexed > 0 || resume is not null)
- await AnalysisFollowUp.QueueAsync(db, context, await AnalysisFollowUp.UnanalysedAsync(db, archive.Id, context.Cancellation).ConfigureAwait(false))
- .ConfigureAwait(false);
+ {
+ var unanalysed = await AnalysisFollowUp.UnanalysedAsync(db, archive.Id, context.Cancellation).ConfigureAwait(false);
+ await AnalysisFollowUp.QueueAsync(db, context, unanalysed).ConfigureAwait(false);
+ if (kind == JobKind.Scan && parameters.DeepAnalysis) await AnalysisFollowUp.QueueDeepAsync(db, context, unanalysed).ConfigureAwait(false);
+ }
}
}
diff --git a/src/Titano.Data/DatabaseBackups.cs b/src/Titano.Data/DatabaseBackups.cs
new file mode 100644
index 00000000..25dd8c88
--- /dev/null
+++ b/src/Titano.Data/DatabaseBackups.cs
@@ -0,0 +1,203 @@
+using System.Globalization;
+using System.Text.RegularExpressions;
+using Titano.Core.Diagnostics;
+using Titano.Core.IO;
+using Titano.Data.Sqlite;
+
+namespace Titano.Data;
+
+/// A copy of the SQLite index made by : its file, when it was made and its size.
+public sealed record DatabaseBackup(string Path, DateTimeOffset Created, long Bytes);
+
+/// What an index holds, shown before a restore replaces one with another.
+public sealed record DatabaseSummary(int SchemaVersion, int Archives, int Sequences, long Photos);
+
+///
+/// Backups of the SQLite index (BRIEF §6.2): a VACUUM INTO copy made once a day while the host runs (at start
+/// when the newest copy is a day old, then checked every hour), the three newest kept; and their restore from
+/// Settings › Advanced. A restore never swaps the file under a running host: the chosen copy is staged next to the
+/// index and replaces it the next time the host opens it, before anything reads it and after a fresh copy of the index
+/// it replaces.
+///
+public static partial class DatabaseBackups
+{
+ /// Copies kept (BRIEF §6.2: ×3).
+ public const int Keep = 3;
+
+ /// Age of the newest copy from which the next one is due.
+ public static readonly TimeSpan Interval = TimeSpan.FromDays(1);
+
+ /// How often a running host checks whether a copy is due.
+ public static readonly TimeSpan CheckInterval = TimeSpan.FromHours(1);
+
+ ///
+ /// The copies of the index at in , newest first. Their
+ /// names are <index name>-yyyyMMdd-HHmmss-fff.db in UTC, as writes them.
+ ///
+ public static IReadOnlyList List(string directory, string databasePath)
+ {
+ if (!Directory.Exists(directory)) return [];
+ var stem = Path.GetFileNameWithoutExtension(databasePath);
+ var backups = new List();
+ foreach (var file in Directory.EnumerateFiles(directory, stem + "-*.db"))
+ {
+ var match = Stamp().Match(Path.GetFileName(file));
+ if (!match.Success || !string.Equals(match.Groups["stem"].Value, stem, StringComparison.Ordinal)) continue;
+ if (!DateTime.TryParseExact(match.Groups["at"].Value, "yyyyMMdd-HHmmss-fff", CultureInfo.InvariantCulture,
+ DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out var at)) continue;
+ try
+ {
+ backups.Add(new DatabaseBackup(file, new DateTimeOffset(at, TimeSpan.Zero), new FileInfo(file).Length));
+ }
+ catch (IOException)
+ {
+ // Deleted while listing (pruned by another copy).
+ }
+ }
+ backups.Sort((a, b) => b.Created.CompareTo(a.Created));
+ return backups;
+ }
+
+ /// True when there is no copy yet or the newest one is at least old.
+ public static bool IsDue(IReadOnlyList backups, DateTimeOffset now) => backups.Count == 0 || now - backups[0].Created >= Interval;
+
+ ///
+ /// Makes the daily copy of a SQLite index into until
+ /// is cancelled: now when one is due, then whenever an hourly check finds one due. A failed copy is logged and tried
+ /// again at the next check. Returns at once for PostgreSQL, which its own server tools back up.
+ ///
+ public static async Task RunDailyAsync(TitanoDatabase db, string directory, TimeProvider? time = null, CancellationToken cancellationToken = default)
+ {
+ if (db.Database is not SqliteDatabase { Path: { } path }) return;
+ var clock = time ?? TimeProvider.System;
+ using var timer = new PeriodicTimer(CheckInterval, clock);
+ try
+ {
+ do
+ {
+ try
+ {
+ if (IsDue(List(directory, path), clock.GetUtcNow())) await db.BackupAsync(directory, Keep, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or DatabaseException)
+ {
+ Log.Warning("backup", $"The daily index backup into {directory} failed; it is tried again within the hour", ex);
+ }
+ }
+ while (await timer.WaitForNextTickAsync(cancellationToken).ConfigureAwait(false));
+ }
+ catch (OperationCanceledException) when (cancellationToken.IsCancellationRequested)
+ {
+ }
+ }
+
+ /// Counts what the index holds (the current one, for the restore's comparison).
+ public static async Task SummarizeAsync(TitanoDatabase db, CancellationToken cancellationToken = default)
+ {
+ await using var session = await db.Database.OpenAsync(cancellationToken).ConfigureAwait(false);
+ var archives = await session.ScalarAsync("SELECT count(*) FROM archives", [], cancellationToken).ConfigureAwait(false);
+ var totals = await session.QuerySingleAsync("SELECT count(*), COALESCE(SUM(frame_count), 0) FROM sequences", [], cancellationToken).ConfigureAwait(false);
+ return new DatabaseSummary(db.SchemaVersion, (int)archives, (int)totals.GetInt64(0), totals.GetInt64(1));
+ }
+
+ ///
+ /// The restore's dry run: what holds, read from a scratch copy in
+ /// (opened and migrated there, so the backup itself is never written).
+ ///
+ /// The file is not a readable Titano index.
+ public static async Task SummarizeBackupAsync(string backupPath, string scratchDirectory, CancellationToken cancellationToken = default)
+ {
+ var folder = Path.Combine(scratchDirectory, "restore-check-" + Guid.NewGuid().ToString("N")[..8]);
+ Directory.CreateDirectory(folder);
+ try
+ {
+ var copy = Path.Combine(folder, "titano.db");
+ File.Copy(backupPath, copy);
+ try
+ {
+ await using var db = await TitanoDatabase.OpenAsync(DatabaseOptions.Sqlite(copy), cancellationToken).ConfigureAwait(false);
+ return await SummarizeAsync(db, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception ex) when (ex is DatabaseException or SchemaTooNewException)
+ {
+ throw new InvalidDataException("The backup is not a Titano index this build can open.", ex);
+ }
+ }
+ finally
+ {
+ try
+ {
+ Directory.Delete(folder, recursive: true);
+ }
+ catch (IOException ex)
+ {
+ Log.Warning("backup", $"The scratch copy in {folder} was not removed", ex);
+ }
+ }
+ }
+
+ /// Where a staged restore waits for the next start: next to the index, where pruning backups never reaches.
+ public static string StagedPath(string databasePath) => databasePath + ".restore";
+
+ public static bool HasStagedRestore(string databasePath) => File.Exists(StagedPath(databasePath));
+
+ /// Copies beside the index (atomically) to replace it at the next start.
+ public static async Task StageRestoreAsync(string backupPath, string databasePath, CancellationToken cancellationToken = default)
+ {
+ var staged = StagedPath(databasePath);
+ var temp = AtomicFile.TempPathFor(staged);
+ try
+ {
+ await using (var source = new FileStream(backupPath, FileMode.Open, FileAccess.Read, FileShare.Read, 1 << 16, FileOptions.Asynchronous))
+ await using (var target = new FileStream(temp, FileMode.CreateNew, FileAccess.Write, FileShare.None, 1 << 16, FileOptions.Asynchronous))
+ {
+ await source.CopyToAsync(target, cancellationToken).ConfigureAwait(false);
+ target.Flush(flushToDisk: true);
+ }
+ AtomicFile.Commit(temp, staged);
+ }
+ finally
+ {
+ if (File.Exists(temp)) File.Delete(temp);
+ }
+ Log.Info("backup", $"Restore of {backupPath} staged for the next start");
+ }
+
+ /// Drops a staged restore (the user changed their mind, or its preparation failed).
+ public static void CancelStagedRestore(string databasePath) => File.Delete(StagedPath(databasePath));
+
+ ///
+ /// Carries out a staged restore on the index the host has just opened, before anything else uses it: the staged copy
+ /// is checked (it opens in a scratch copy and passes quick_check), the index as it is now is copied into
+ /// , and only then is it replaced by the staged copy, migrated to this build's
+ /// schema. False when none was staged.
+ ///
+ /// The staged copy failed its checks; it is set aside as .failed and the index is unchanged.
+ /// The index could not be backed up or replaced (also ,
+ /// ): it is unchanged and the restore stays staged for the next start.
+ public static async Task RestoreStagedAsync(TitanoDatabase db, string backupDirectory, CancellationToken cancellationToken = default)
+ {
+ if (db.Database is not SqliteDatabase { Path: { } path }) return false;
+ var staged = StagedPath(path);
+ if (!File.Exists(staged)) return false;
+ try
+ {
+ // A copy this build cannot open (damaged, or made by a newer Titano) must never replace a working index.
+ await SummarizeBackupAsync(staged, Path.GetDirectoryName(path) ?? ".", cancellationToken).ConfigureAwait(false);
+ }
+ catch (InvalidDataException)
+ {
+ File.Move(staged, staged + ".failed", overwrite: true);
+ throw;
+ }
+ // What the index holds up to this start stays recoverable: no restore without a fresh copy first.
+ var before = await db.BackupAsync(backupDirectory, Keep, cancellationToken).ConfigureAwait(false);
+ await db.RestoreAsync(staged, cancellationToken).ConfigureAwait(false);
+ File.Delete(staged);
+ Log.Info("backup", $"Index restored from the staged copy; the index it replaced is {before}");
+ return true;
+ }
+
+ [GeneratedRegex(@"^(?.+)-(?\d{8}-\d{6}-\d{3})\.db$", RegexOptions.CultureInvariant)]
+ private static partial Regex Stamp();
+}
diff --git a/src/Titano.Data/Jobs/JobEngine.cs b/src/Titano.Data/Jobs/JobEngine.cs
index f9c2d250..09a84eb0 100644
--- a/src/Titano.Data/Jobs/JobEngine.cs
+++ b/src/Titano.Data/Jobs/JobEngine.cs
@@ -29,7 +29,8 @@ public sealed record JobEngineOptions
/// Persistent job queue runner (BRIEF §14.6): N workers claim queued jobs from the database by priority, run the
/// registered handler, checkpoint progress, and survive crashes (running jobs are requeued at start with their
/// checkpoints). Used by the desktop client (local mode) and the server. Jobs an
-/// declines stay queued for other claimers.
+/// declines stay queued for other claimers. The number of workers can change while the engine runs
+/// (, Settings › Rendering › Parallelism on the desktop).
///
public sealed class JobEngine : IAsyncDisposable
{
@@ -48,16 +49,30 @@ public sealed class JobEngine : IAsyncDisposable
private readonly Channel _wake = Channel.CreateBounded(new BoundedChannelOptions(1) { FullMode = BoundedChannelFullMode.DropWrite });
private readonly CancellationTokenSource _shutdown = new();
private readonly List _workers = [];
+ private readonly Lock _workerGate = new();
+ private readonly HashSet _activeWorkers = [];
+ private int _workerTarget;
+ private bool _workersStarted;
public JobEngine(TitanoDatabase db, IEnumerable handlers, JobEngineOptions? options = null)
{
_db = db;
Options = options ?? new JobEngineOptions();
_handlers = handlers.ToDictionary(h => h.Kind);
+ _workerTarget = Options.Workers;
}
public JobEngineOptions Options { get; }
+ /// Workers that claim jobs: until changes it.
+ public int Workers
+ {
+ get
+ {
+ lock (_workerGate) return _workerTarget;
+ }
+ }
+
/// A job changed state (queued, running, done, failed, cancelled, paused).
public event Action? JobChanged;
@@ -81,13 +96,33 @@ public sealed class JobEngine : IAsyncDisposable
Log.Info("jobs", "No job handlers; this engine claims nothing");
return;
}
- for (var i = 0; i < Options.Workers; i++)
+ lock (_workerGate)
{
- var id = Options.Workers == 1 ? Options.WorkerId : $"{Options.WorkerId}#{i}";
- _workers.Add(Task.Run(() => WorkerLoopAsync(id, _shutdown.Token), CancellationToken.None));
+ _workersStarted = true;
+ for (var i = 0; i < _workerTarget; i++) StartWorker(i);
}
}
+ ///
+ /// Changes the number of workers. More start claiming at once; the surplus ones finish the job they are running
+ /// (never interrupted) and then stop. Before it only sets how many start.
+ ///
+ public void SetWorkers(int count)
+ {
+ ArgumentOutOfRangeException.ThrowIfLessThan(count, 1);
+ lock (_workerGate)
+ {
+ if (_workerTarget == count) return;
+ _workerTarget = count;
+ if (_workersStarted)
+ {
+ for (var i = 0; i < count; i++) StartWorker(i);
+ }
+ }
+ Log.Info("jobs", $"Job engine set to {count} worker(s)");
+ Wake();
+ }
+
/// Queues a job and wakes a worker.
public async Task EnqueueAsync(JobKind kind, IReadOnlyList targets, string? targetLabel = null, string? parametersJson = null,
JobPriority priority = JobPriority.Normal, Guid? createdBy = null, CancellationToken cancellationToken = default)
@@ -129,10 +164,17 @@ public sealed class JobEngine : IAsyncDisposable
public async ValueTask DisposeAsync()
{
+ Task[] workers;
+ lock (_workerGate)
+ {
+ // No worker starts any more: the shutdown token is about to be disposed.
+ _workersStarted = false;
+ workers = [.. _workers];
+ }
await _shutdown.CancelAsync().ConfigureAwait(false);
try
{
- await Task.WhenAll(_workers).ConfigureAwait(false);
+ await Task.WhenAll(workers).ConfigureAwait(false);
}
catch (OperationCanceledException)
{
@@ -181,11 +223,34 @@ public sealed class JobEngine : IAsyncDisposable
if (await _db.Jobs.GetAsync(id, cancellationToken).ConfigureAwait(false) is { } job) JobChanged?.Invoke(job);
}
- /// Claims and runs jobs until shutdown. Nothing a job or a handler throws ends the worker.
- private async Task WorkerLoopAsync(string workerId, CancellationToken shutdown)
+ /// Starts worker unless it runs already; call under .
+ private void StartWorker(int index)
+ {
+ if (!_activeWorkers.Add(index)) return;
+ // A single worker keeps the plain id (as before workers could be added); numbered ones get "#n".
+ var id = index == 0 && Options.Workers == 1 ? Options.WorkerId : $"{Options.WorkerId}#{index}";
+ var shutdown = _shutdown.Token;
+ _workers.Add(Task.Run(() => WorkerLoopAsync(index, id, shutdown), CancellationToken.None));
+ }
+
+ /// True when worker is beyond the wanted count; it is then no longer active.
+ private bool Retires(int index)
+ {
+ lock (_workerGate)
+ {
+ if (index < _workerTarget) return false;
+ _activeWorkers.Remove(index);
+ return true;
+ }
+ }
+
+ /// Claims and runs jobs until shutdown, or until no longer wants this worker.
+ /// Nothing a job or a handler throws ends the worker.
+ private async Task WorkerLoopAsync(int index, string workerId, CancellationToken shutdown)
{
while (!shutdown.IsCancellationRequested)
{
+ if (Retires(index)) return;
Job? job;
try
{
diff --git a/src/Titano.Data/Processing/AnalysisFollowUp.cs b/src/Titano.Data/Processing/AnalysisFollowUp.cs
index 7af05474..07bb14ac 100644
--- a/src/Titano.Data/Processing/AnalysisFollowUp.cs
+++ b/src/Titano.Data/Processing/AnalysisFollowUp.cs
@@ -6,9 +6,10 @@ namespace Titano.Data.Processing;
///
/// Light analysis queued after work that brings sequences or frames into the index (card import, adoption, scan), so the
-/// advisor's Auto values and recommended preset exist without any user action (BRIEF §1.1, §4.3). Nothing is queued
-/// when the engine cannot run light analysis, and a sequence already waiting in a queued light analysis is not queued
-/// again (that job runs after the changes that led here).
+/// advisor's Auto values and recommended preset exist without any user action (BRIEF §1.1, §4.3); a background deep
+/// analysis too when the host asks for it. Nothing is queued when the engine cannot run the analysis, and a sequence
+/// already waiting in a queued analysis of the same kind is not queued again (that job runs after the changes that led
+/// here).
///
internal static class AnalysisFollowUp
{
@@ -24,6 +25,21 @@ internal static class AnalysisFollowUp
await context.EnqueueFollowUpAsync(request.Kind, request.Targets, request.Label, request.ParametersJson, request.Priority).ConfigureAwait(false);
}
+ ///
+ /// Queues one background deep analysis of (BRIEF §10.2: background, low priority),
+ /// leaving out the sequences a queued deep analysis already covers.
+ ///
+ public static async Task QueueDeepAsync(TitanoDatabase db, JobContext context, IReadOnlyCollection sequenceIds)
+ {
+ if (sequenceIds.Count == 0) return;
+ var waiting = (await db.Jobs.ListQueuedAsync([JobKind.DeepAnalyse], 1000, context.Cancellation).ConfigureAwait(false))
+ .SelectMany(j => j.TargetIds).ToHashSet();
+ var targets = sequenceIds.Where(id => !waiting.Contains(id)).Distinct().ToList();
+ if (targets.Count == 0) return;
+ var request = ProcessingJobs.DeepAnalysis(targets, context.Job.TargetLabel) with { Priority = JobPriority.Background };
+ await context.EnqueueFollowUpAsync(request.Kind, request.Targets, request.Label, request.ParametersJson, request.Priority).ConfigureAwait(false);
+ }
+
/// Sequences of without a current light analysis (new, adopted, or with frames a scan added).
public static async Task> UnanalysedAsync(TitanoDatabase db, Guid archiveId, CancellationToken cancellationToken)
{
diff --git a/src/Titano.Data/Processing/ProcessingOptions.cs b/src/Titano.Data/Processing/ProcessingOptions.cs
index e14efb8e..64d07a7d 100644
--- a/src/Titano.Data/Processing/ProcessingOptions.cs
+++ b/src/Titano.Data/Processing/ProcessingOptions.cs
@@ -62,6 +62,17 @@ public sealed record ProcessingOptions
public RenderOptions Render { get; init; } = RenderOptions.Default;
+ ///
+ /// The host's current tuning, asked at the start of every analysis and render: it returns these options with the
+ /// values the user may change at any time (on the desktop Settings › Rendering and Analysis: memory budget, quality
+ /// profile, parallelism, analysis width and thresholds), so a change applies to the next job. Null: these options as
+ /// they are.
+ ///
+ public Func? Tune { get; init; }
+
+ /// These options with the host's current tuning ().
+ internal ProcessingOptions Current => Tune?.Invoke(this) ?? this;
+
/// Tells ; a failure is logged, never passed on to the job.
internal async Task NotifyAsync(Guid sequenceId, string change, CancellationToken cancellationToken)
{
diff --git a/src/Titano.Data/Processing/SequenceAnalyser.cs b/src/Titano.Data/Processing/SequenceAnalyser.cs
index c99cd8c7..8ded6dad 100644
--- a/src/Titano.Data/Processing/SequenceAnalyser.cs
+++ b/src/Titano.Data/Processing/SequenceAnalyser.cs
@@ -104,10 +104,13 @@ internal sealed class SequenceAnalyser(TitanoDatabase db, ProcessingOptions opti
IProgress? progress, CancellationToken cancellationToken)
{
var file = new DeepAnalysisCheckpointFile(Path.Combine(folder.MetaDirectory, DeepAnalysisCheckpointFile.FileName));
+ // The host's analysis parameters as they are now (Settings › Analysis on the desktop). Those that change per-frame
+ // results are part of the checkpoint's fingerprint, so a partial run made with other values starts again.
+ var analysis = options.Current.DeepAnalysis;
DeepAnalysisReport report;
await using (var source = new SequenceFrameSource(frames, metadata, options.Archive.Decoder))
{
- report = await DeepAnalyzer.AnalyzeAsync(source, options.DeepAnalysis, new FramesCheckpoint(file, ContentKey(frames)), progress, cancellationToken)
+ report = await DeepAnalyzer.AnalyzeAsync(source, analysis, new FramesCheckpoint(file, ContentKey(frames)), progress, cancellationToken)
.ConfigureAwait(false);
}
report.Save(folder.AnalysisPath);
diff --git a/src/Titano.Data/Processing/SequenceRender.cs b/src/Titano.Data/Processing/SequenceRender.cs
index 2c5e8ca4..9b2e8c36 100644
--- a/src/Titano.Data/Processing/SequenceRender.cs
+++ b/src/Titano.Data/Processing/SequenceRender.cs
@@ -32,6 +32,8 @@ internal sealed class SequenceRender : IAsyncDisposable
/// The sequence's deep report, when current: its luminance spares the preparation a decode pass.
public SequenceRender(SequenceFrames frames, ProjectSettings project, DeepAnalysisReport? analysis, ProcessingOptions options)
{
+ // The host's tuning as it is now (memory budget, quality profile): a change applies from the next render.
+ options = options.Current;
var metadata = frames.LightFrames();
_source = new SequenceFrameSource(frames, metadata, options.Archive.Decoder, options.FrameWindow);
_processing = options;
diff --git a/src/Titano.Data/TitanoDatabase.cs b/src/Titano.Data/TitanoDatabase.cs
index 7913e13a..97598d7f 100644
--- a/src/Titano.Data/TitanoDatabase.cs
+++ b/src/Titano.Data/TitanoDatabase.cs
@@ -115,12 +115,43 @@ public sealed class TitanoDatabase : TitanoRepositories, IAsyncDisposable
SchemaVersion = await MigrationRunner.MigrateAsync(Database, cancellationToken).ConfigureAwait(false);
}
+ ///
+ /// SQLite only: the size of the database file and the bytes its free pages hold, which gives
+ /// back; null on PostgreSQL, whose autovacuum keeps the tables compact by itself.
+ ///
+ public async Task SpaceAsync(CancellationToken cancellationToken = default)
+ {
+ if (Dialect != Dialect.Sqlite) return null;
+ await using var session = await Database.OpenAsync(cancellationToken).ConfigureAwait(false);
+ var pageSize = await session.ScalarAsync("PRAGMA page_size", [], cancellationToken).ConfigureAwait(false);
+ var pages = await session.ScalarAsync("PRAGMA page_count", [], cancellationToken).ConfigureAwait(false);
+ var free = await session.ScalarAsync("PRAGMA freelist_count", [], cancellationToken).ConfigureAwait(false);
+ return new IndexSpace(pages * pageSize, free * pageSize);
+ }
+
+ ///
+ /// SQLite only: rewrites the database without its free pages (VACUUM, BRIEF §12.5 Maintenance). Writers wait
+ /// meanwhile; readers continue on the previous snapshot. Returns the space before and after.
+ ///
+ public async Task<(IndexSpace Before, IndexSpace After)> VacuumAsync(CancellationToken cancellationToken = default)
+ {
+ AsSqlite();
+ var before = (await SpaceAsync(cancellationToken).ConfigureAwait(false))!;
+ await using (var session = await Database.OpenAsync(cancellationToken).ConfigureAwait(false))
+ await session.ExecuteScriptAsync("VACUUM", cancellationToken).ConfigureAwait(false);
+ var after = (await SpaceAsync(cancellationToken).ConfigureAwait(false))!;
+ return (before, after);
+ }
+
public ValueTask DisposeAsync() => Database.DisposeAsync();
private SqliteDatabase AsSqlite() =>
Database as SqliteDatabase ?? throw new NotSupportedException("Backups of a PostgreSQL database are made with the server's own tools.");
}
+/// Size of an SQLite index file and the bytes of its free pages (reclaimable by a vacuum).
+public sealed record IndexSpace(long FileBytes, long ReclaimableBytes);
+
/// Repositories bound to one open transaction.
public sealed class TitanoTransaction : TitanoRepositories, IAsyncDisposable
{
diff --git a/src/Titano.Server/Api/ArchiveEndpoints.cs b/src/Titano.Server/Api/ArchiveEndpoints.cs
index 3a42f89d..c0b16b23 100644
--- a/src/Titano.Server/Api/ArchiveEndpoints.cs
+++ b/src/Titano.Server/Api/ArchiveEndpoints.cs
@@ -1,6 +1,9 @@
+using Microsoft.AspNetCore.Mvc;
+using Titano.Core.Archiving;
using Titano.Core.Model;
using Titano.Core.Naming;
using Titano.Data;
+using Titano.Data.Archiving;
using Titano.Data.Jobs;
using Titano.Data.Repositories;
using Titano.Protocol;
@@ -60,24 +63,42 @@ public static class ArchiveEndpoints
stats.Health.Unverified);
}
- private static async Task UpdateAsync(HttpContext context, Caller caller, ArchiveSettingsDto request, TitanoDatabase db, ServerArchive archive, AuditLog audit)
+ ///
+ /// Writes the name, templates and proxy policy into the archive's archive.json through the archive engine (so a
+ /// restart and the proxy jobs see them), then into the index. 503 archive_offline while the archive cannot be
+ /// written; 409 sequence_busy while another process holds its settings.
+ ///
+ private static async Task UpdateAsync(HttpContext context, Caller caller, ArchiveSettingsDto request, TitanoDatabase db, ServerArchive archive,
+ [FromServices] ArchiveService? archives, AuditLog audit)
{
var name = request.Name?.Trim();
- if (string.IsNullOrEmpty(name) || name.Length > 100) return ApiErrors.BadRequest(context, "bad_request", "name");
+ if (string.IsNullOrEmpty(name) || name.Length > ArchiveSettings.MaxNameLength) return ApiErrors.BadRequest(context, "bad_request", "name");
foreach (var (field, template) in new[] { ("folderTemplate", request.FolderTemplate), ("fileTemplate", request.FileTemplate) })
{
if (string.IsNullOrWhiteSpace(template) || !PathTemplate.Parse(template).IsValid) return ApiErrors.BadRequest(context, "invalid_template", field);
}
- if (request.ProxyLongEdge is not (-1 or 0) and (< 256 or > 8192)) return ApiErrors.BadRequest(context, "bad_request", "proxyLongEdge");
+ if (!ProxyPolicy.IsValidLongEdge(request.ProxyLongEdge)) return ApiErrors.BadRequest(context, "bad_request", "proxyLongEdge");
- var updated = archive.Current with
+ var engine = archives ?? new ArchiveService(db, new ArchiveServiceOptions { Owner = ArchiveModule.Owner });
+ Archive updated;
+ try
{
- Name = name,
- FolderTemplate = request.FolderTemplate,
- FileTemplate = request.FileTemplate,
- ProxyLongEdge = request.ProxyLongEdge,
- };
- await db.Archives.UpsertAsync(updated, context.RequestAborted);
+ updated = await engine.UpdateSettingsAsync(archive.Id, s => s with
+ {
+ Name = name,
+ Templates = s.Templates with { Folder = request.FolderTemplate, File = request.FileTemplate },
+ Proxies = s.Proxies with { LongEdge = request.ProxyLongEdge },
+ }, context.RequestAborted);
+ }
+ catch (LeaseUnavailableException)
+ {
+ return ApiErrors.Conflict(context, "sequence_busy");
+ }
+ catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
+ {
+ // ArchiveOfflineException included: nothing was written.
+ return ApiErrors.Result(context, StatusCodes.Status503ServiceUnavailable, "archive_offline");
+ }
archive.Current = updated;
await audit.WriteAsync(caller, context, "archive_settings", "archive", updated.Id.ToString(), $"{updated.FolderTemplate} · {updated.FileTemplate}");
return Results.Json(Settings(updated), ProtocolJson.Default.ArchiveSettingsDto);
diff --git a/src/Titano.Server/Storage/ArchiveModule.cs b/src/Titano.Server/Storage/ArchiveModule.cs
index 3002c9d4..bc58510a 100644
--- a/src/Titano.Server/Storage/ArchiveModule.cs
+++ b/src/Titano.Server/Storage/ArchiveModule.cs
@@ -8,7 +8,7 @@ namespace Titano.Server.Storage;
///
/// The archive engine behind the server (BRIEF §7, §14.4): ingest of verified uploads, lookup of proxies and
/// thumbnails, and its job handlers (scan, rebuild, verify, import, thumbnails, proxies, maintenance). Decoding is
-/// managed only (BRIEF §4.2).
+/// managed only (BRIEF §4.2). The daily backup of an SQLite index runs with it ().
///
public static class ArchiveModule
{
@@ -22,5 +22,6 @@ public static class ArchiveModule
services.AddSingleton(sp => sp.GetRequiredService().Ingest);
services.AddSingleton(sp => sp.GetRequiredService());
services.AddSingleton();
+ services.AddHostedService();
}
}
diff --git a/src/Titano.Server/Storage/DatabaseBackupService.cs b/src/Titano.Server/Storage/DatabaseBackupService.cs
new file mode 100644
index 00000000..028bf14c
--- /dev/null
+++ b/src/Titano.Server/Storage/DatabaseBackupService.cs
@@ -0,0 +1,21 @@
+using Titano.Data;
+using Titano.Server.Configuration;
+
+namespace Titano.Server.Storage;
+
+///
+/// The daily VACUUM INTO copy of the index of a Windows server on SQLite (BRIEF §6.2: nightly, kept ×3) into
+/// {DataPath}/backups. A server on PostgreSQL is backed up with PostgreSQL's own tools; this service then does nothing.
+///
+public sealed class DatabaseBackupService(TitanoDatabase db, ServerOptions options, TimeProvider time, ILogger logger) : BackgroundService
+{
+ /// Folder of the copies.
+ public string Directory => Path.Combine(options.DataPath, "backups");
+
+ protected override Task ExecuteAsync(CancellationToken stoppingToken)
+ {
+ if (db.Dialect != Dialect.Sqlite) return Task.CompletedTask;
+ logger.LogInformation("Daily index backups go to {Directory}", Directory);
+ return DatabaseBackups.RunDailyAsync(db, Directory, time, stoppingToken);
+ }
+}
diff --git a/tests/Titano.App.Tests/Settings/SettingsLogicTests.cs b/tests/Titano.App.Tests/Settings/SettingsLogicTests.cs
index 79fea520..cf623a4d 100644
--- a/tests/Titano.App.Tests/Settings/SettingsLogicTests.cs
+++ b/tests/Titano.App.Tests/Settings/SettingsLogicTests.cs
@@ -164,6 +164,125 @@ public sealed class SettingsLogicTests
Assert.Null(EncoderUse.Codecs([]));
}
+ [Test]
+ public void ThePreviewTitleSpeaksTheInterfaceLanguage()
+ {
+ // The sample's title is a catalog string read on every preview (so a language switch shows at once), not English text.
+ Assert.Equal("Harbour sunset", NamingPreview.FirstNames("{title}", "{n:0000}")[0].Split('/')[0]);
+ Assert.Equal("Harbour sunset", NamingPreview.SampleFrames[0].Title);
+ Assert.False(ReferenceEquals(NamingPreview.SampleFrames, NamingPreview.SampleFrames), "built on each call");
+ var italian = Loc.Get("Settings.Naming.SampleTitle", CultureInfo.GetCultureInfo("it"));
+ Assert.True(italian is { Length: > 0 } && italian != "Harbour sunset", italian);
+ }
+
+ [Test]
+ public void TheQualityProfileTunesTheJobs()
+ {
+ var settings = new Titano.App.Infrastructure.AppSettings { Quality = Titano.App.Infrastructure.QualityProfile.Best, Parallelism = 3, MemoryBudgetGb = 6 };
+ var basis = new Titano.Data.Processing.ProcessingOptions();
+
+ var best = ProcessingTuning.Apply(basis, settings, 64L << 30, 16, @"C:\cache");
+ Assert.Equal((6L << 30, @"C:\cache", 8, 2), (best.FrameWindow.MemoryBudget, best.FrameWindow.SpillDirectory, best.FrameWindow.Ahead, best.FrameWindow.MaxConcurrentLoads));
+ Assert.Equal((1024, Titano.Core.Project.FlowQualitySetting.Best), (best.Render.AnalysisLongEdge, best.Render.DefaultFlowQuality));
+ Assert.Equal(int.Min(3, Titano.Core.Analysis.Deep.DeepAnalysisOptions.Default.MaxDegreeOfParallelism), best.DeepAnalysis.MaxDegreeOfParallelism);
+
+ settings.Quality = Titano.App.Infrastructure.QualityProfile.Fast;
+ settings.MemoryBudgetGb = null;
+ settings.Parallelism = null;
+ var fast = ProcessingTuning.Apply(basis, settings, 32L << 30, 16, @"C:\cache");
+ Assert.Equal((8L << 30, 4), (fast.FrameWindow.MemoryBudget, fast.FrameWindow.Ahead));
+ Assert.Equal((256, Titano.Core.Project.FlowQualitySetting.Draft), (fast.Render.AnalysisLongEdge, fast.Render.DefaultFlowQuality));
+ Assert.Equal(512, ProcessingTuning.PreparationLongEdge(Titano.App.Infrastructure.QualityProfile.Balanced));
+ }
+
+ [Test]
+ public void ParallelismAutoLeavesFourCoresToTheInterface()
+ {
+ Assert.Equal(12, ProcessingTuning.ParallelismAuto(16));
+ Assert.Equal(1, ProcessingTuning.ParallelismAuto(4));
+ Assert.Equal(1, ProcessingTuning.ParallelismAuto(2));
+ Assert.Equal(12, ProcessingTuning.Parallelism(new Titano.App.Infrastructure.AppSettings(), 16));
+ Assert.Equal(5, ProcessingTuning.Parallelism(new Titano.App.Infrastructure.AppSettings { Parallelism = 5 }, 16));
+ }
+
+ [Test]
+ public void TheAnalysisSettingsBecomeTheDeepAnalysisParameters()
+ {
+ var defaults = new Titano.App.Infrastructure.AppSettings().DeepAnalysis(Titano.Core.Analysis.Deep.DeepAnalysisOptions.Default);
+ // The defaults of Settings › Analysis are the engine's own: nothing changes until the user does.
+ Assert.Equal(Titano.Core.Analysis.Deep.DeepAnalysisOptions.Default.Fingerprint(), defaults.Fingerprint());
+ Assert.Equal(Titano.Core.Analysis.Deep.DeepAnalysisOptions.Default.StarFieldDensity, defaults.StarFieldDensity);
+
+ var tuned = new Titano.App.Infrastructure.AppSettings { AnalysisLongEdge = 1024, NightBrightnessPercent = 12.5, StarFieldDensity = 60 }
+ .DeepAnalysis(Titano.Core.Analysis.Deep.DeepAnalysisOptions.Default);
+ Assert.Equal((1024, -3.0, 60.0), (tuned.MaxAnalysisLongEdge, tuned.DarkLogLuminance, tuned.StarFieldDensity));
+ }
+
+ [Test]
+ public void NewCardsStartFromSettingsImport()
+ {
+ var settings = new Titano.App.Infrastructure.AppSettings
+ {
+ ImportSessionGapMinutes = 90,
+ ImportMinimumFrames = 20,
+ ImportSubfolders = false,
+ ImportVerify = false,
+ ImportDuplicates = Titano.Core.Import.DuplicatePolicy.ImportAgain,
+ ImportAfter = Titano.Data.Archiving.AfterImport.DeleteImported,
+ ImportEject = false,
+ DeepAnalysisAfterImport = false,
+ };
+ var profile = settings.ImportProfile("{year}", "{name}");
+ Assert.Equal(("{year}", "{name}", 90, 20), (profile.FolderTemplate, profile.FileTemplate, profile.SessionGapMinutes, profile.MinimumSessionFrames));
+ Assert.Equal((false, false, false, false), (profile.IncludeSubfolders, profile.VerifyCopies, profile.Eject, profile.DeepAnalysis));
+ Assert.Equal((Titano.Core.Import.DuplicatePolicy.ImportAgain, Titano.Data.Archiving.AfterImport.DeleteImported), (profile.Duplicates, profile.AfterImport));
+ // Untouched settings give the brief's card defaults.
+ Assert.Equal(new Titano.Data.Archiving.CardProfile(), new Titano.App.Infrastructure.AppSettings().ImportProfile(TemplateDefaults.Folder, TemplateDefaults.File));
+ }
+
+ [Test]
+ public void NewArchivesTakeSettingsArchive()
+ {
+ var settings = new Titano.App.Infrastructure.AppSettings { FolderTemplate = "{year}", FileTemplate = "{name}", ProxyLongEdge = 2560, ThumbnailLongEdge = 480 };
+ var archive = settings.ArchiveDefaults();
+ Assert.Equal(("{year}", "{name}", 2560, 480), (archive.Templates.Folder, archive.Templates.File, archive.Proxies.LongEdge, archive.Thumbnails.LongEdge));
+ Assert.Null((new Titano.App.Infrastructure.AppSettings().ArchiveDefaults() with { Name = "Archive" }).Problem());
+ }
+
+ [Test]
+ public void SettingsSurviveARoundTripWithTheNewSections()
+ {
+ var settings = new Titano.App.Infrastructure.AppSettings { ThumbnailLongEdge = 640, ScanIntervalMinutes = 30, NightBrightnessPercent = 3.5, DeepAnalysisAfterScan = true };
+ var copy = Titano.App.Infrastructure.AppSettings.Parse(settings.ToJson())!;
+ Assert.Equal((640, 30, 3.5, true), (copy.ThumbnailLongEdge, copy.ScanIntervalMinutes, copy.NightBrightnessPercent, copy.DeepAnalysisAfterScan));
+ }
+
+ [Test]
+ public void BackgroundPriorityRaisesTheInterfaceOnlyInFront()
+ {
+ Assert.Equal(ThreadPriority.AboveNormal, InterfacePriority.For(enabled: true, active: true));
+ Assert.Equal(ThreadPriority.Normal, InterfacePriority.For(enabled: true, active: false));
+ Assert.Equal(ThreadPriority.Normal, InterfacePriority.For(enabled: false, active: true));
+ }
+
+ [Test]
+ public void FormatsShowTheirTierAndWhatToInstall()
+ {
+ Assert.Equal(("JPEG XL", "CR3", "3FR"), (FormatNames.Of(Titano.Core.Imaging.ImageFileFormat.JpegXl), FormatNames.Of(Titano.Core.Imaging.ImageFileFormat.Cr3),
+ FormatNames.Of(Titano.Core.Imaging.ImageFileFormat.ThreeFr)));
+ var heif = Titano.Core.Windows.Codecs.StoreExtension.Get(Titano.Core.Windows.Codecs.StoreExtensionKind.HeifImage);
+ var format = Titano.Core.Imaging.Decoders.DecoderFactory.DescribeFormats(Titano.Core.Imaging.Decoders.DecoderFactory.CreateClient(null))
+ .First(f => f.Format.Format == Titano.Core.Imaging.ImageFileFormat.Heif).Format;
+ var row = new FormatRowViewModel(new FormatRow(format, Titano.Core.Imaging.DecodeTier.EmbeddedPreview, "managed", [heif]));
+ Assert.Equal(("Preview only", "Titano", heif.ProductName), (row.TierText, row.DecoderText, row.NeedsText));
+ Assert.Equal(Titano.Ui.Controls.StatusKind.Warning, row.TierKind);
+ Assert.Equal("HEIF: Preview only", row.Announcement);
+ var missing = new MissingExtensionViewModel(heif, new Titano.Ui.Mvvm.RelayCommand(() => { }));
+ Assert.Equal(heif.ProductName + " missing", missing.Text);
+ var none = new FormatRowViewModel(new FormatRow(format, Titano.Core.Imaging.DecodeTier.Unavailable, null, []));
+ Assert.Equal(("Not supported", "—", "—", false), (none.TierText, none.DecoderText, none.NeedsText, none.HasNeeds));
+ }
+
[Test]
public void EnumDrivenKeysExistInEveryRequiredLanguage()
{
diff --git a/tests/Titano.App.Tests/Settings/SettingsScreenSmokeTests.cs b/tests/Titano.App.Tests/Settings/SettingsScreenSmokeTests.cs
index 2e3459b0..84575297 100644
--- a/tests/Titano.App.Tests/Settings/SettingsScreenSmokeTests.cs
+++ b/tests/Titano.App.Tests/Settings/SettingsScreenSmokeTests.cs
@@ -96,6 +96,61 @@ public sealed class SettingsScreenSmokeTests
Assert.True(ServerSession.ForgetRequest(certificate.FullFingerprint).IsDestructive);
});
+ [Test]
+ public Task ImportAnalysisAndFormatsAreRealSettings() => ScreenHost.RunAsync(async () =>
+ {
+ await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
+ var shell = app.Shell;
+ await app.Sample.FillAsync();
+ var settings = shell.Settings;
+ // The open archive's own thumbnail size (archive.json) is what Settings › Archive shows.
+ var archive = Assert.NotNull(await Titano.App.Archiving.CurrentArchive.FindAsync(shell.Services.Database!, shell.Services.Settings.LastArchivePath));
+ var manifestPath = new Titano.Core.Archiving.ArchivePaths(archive.RootPath).ManifestPath;
+ var manifest = Titano.Core.Archiving.ManifestStore.ReadArchive(manifestPath);
+ Titano.Core.Archiving.ManifestStore.WriteArchive(manifestPath, manifest with { ThumbnailPolicy = new Titano.Core.Archiving.ThumbnailPolicy { LongEdge = 240 } });
+
+ shell.Navigate(SectionKey.Settings);
+ settings.Page = SettingsPage.Archive;
+ await WaitAsync(() => settings.SelectedThumbnailSize.Value == 240, "the archive's thumbnail size is shown");
+ await app.ExpectAsync("settings-archive");
+ settings.SelectedThumbnailSize = settings.ThumbnailSizes.Single(s => s.Value == 480);
+ await WaitAsync(() => Titano.Core.Archiving.ManifestStore.ReadArchive(manifestPath).ThumbnailPolicy.LongEdge == 480, "written into archive.json");
+ Assert.Equal(480, shell.Services.Settings.ThumbnailLongEdge);
+
+ // Import: the defaults of new cards.
+ settings.Page = SettingsPage.Import;
+ await app.ExpectAsync("settings-import");
+ settings.SessionGap.Text = "90";
+ Assert.True(settings.SessionGap.Commit());
+ settings.IsFormatCard = true;
+ Assert.Equal((90, Titano.Data.Archiving.AfterImport.FormatCard), (shell.Services.Settings.ImportSessionGapMinutes, shell.Services.Settings.ImportAfter));
+ Assert.True(settings.CanResetSection);
+ settings.ResetSectionCommand.Execute(null);
+ Assert.Equal(("45", true), (settings.SessionGap.Text, settings.IsKeepCard));
+
+ // Analysis: thresholds in the language's own decimals, checked against their range.
+ settings.Page = SettingsPage.Analysis;
+ await app.ExpectAsync("settings-analysis");
+ Assert.Equal(6.25.ToString("0.##", System.Globalization.CultureInfo.CurrentCulture), settings.NightBrightness.Text);
+ settings.NightBrightness.Text = "80";
+ Assert.True(settings.NightBrightness.HasErrors, "beyond 50 %");
+ settings.NightBrightness.Revert();
+ settings.DeepAnalysisAfterScan = true;
+ Assert.True(shell.Services.Settings.DeepAnalysisAfterScan);
+
+ // Formats: the tier of every format and a notice with Install per missing extension.
+ settings.Page = SettingsPage.Formats;
+ await WaitAsync(() => settings.Formats.Count > 0 && !settings.IsDetectingFormats, "formats listed");
+ await app.ExpectAsync("settings-formats");
+ Assert.Count(3, settings.MissingExtensions);
+ var installs = app.FindAll