Handle invalid random photos before device writes and trace selections

This commit is contained in:
Pigway
2026-10-06 08:47:03 +08:00
parent 59345f12a7
commit 0a5b859ca0
8 changed files with 231 additions and 21 deletions
+10
View File
@@ -151,3 +151,13 @@ This optional integration reads the existing shared-space People catalog. It doe
已有数据源 `orientation=null` 保持原来的全部方向,编辑器显示“不筛方向(原有设置)”;新建数据源默认自动。尺寸缓存持久化在 SQLite `photo_dimensions`,按路径、修改时间和大小失效。首次扫描读取本地图片尺寸和 EXIF,不批量生成全图库预览;后续刷新复用缓存。仅 NAS 本地源支持,WebDAV 不批量下载原图测尺寸。自动模式读取统一 Device Model,不依赖 KoKonna 私有字段;90°/270° 交换宽高。
Orientation options: landscape, portrait, auto. Auto follows the target device dimensions and rotation (90°/270° swap width and height). Manual direction controls both selection and rendering. Photo and caption layouts support landscape and portrait. Classification honors EXIF orientation; square photos are excluded from directional matches. Existing sources remain unfiltered (`null`) until changed. Dimensions persist in SQLite and refresh when the file changes. Local NAS sources only; no bulk original downloads from WebDAV. Empty matches fail closed. This controls selection, not photo rotation or stretching.
### Invalid photos and selection tracing
Local catalogs share the renderer's 25-million-pixel limit. Oversized originals
use an existing Synology XL preview when enabled and available; otherwise they
are excluded. Header-only catalog inspection does not guarantee full decoding.
Random rendering tries at most five distinct candidates before any device write,
skipping only invalid or unavailable images. Explicit selections never fall back.
Operation `result.photo_attempts` records source-relative item IDs, names, status
and stable error codes, including failures. This does not retry upload or switch.
+10
View File
@@ -10734,6 +10734,16 @@
},
"OperationResult": {
"properties": {
"photo_attempts": {
"items": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"type": "array",
"title": "Photo Attempts"
},
"image_id": {
"anyOf": [
{