Verlege die Paperless-Suchparameter und das Vorschaubild in das Modul und korrigiere das Handy-Layout der großen Auswahl.
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 5m50s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 22s

Die gemeinsame Suchroute kennt keine Filternamen mehr; das Modul deklariert sie und unbekannte Parameter werden abgewiesen. Unvollständige Zusatzfeld-Zeilen werden gemeldet statt weggelassen. Vorschaubilder nur als Rastergrafik. Abschlussmatrix und API-Referenz nachgeführt.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
StommerandClaude Sonnet 5.5 committed 2026-10-24 22:10:54 +02:00
1 parent f580fb282d
commit 5e32ba547d
9 files changed
+127 -99

No files matched your search

+25 -1
View File
@@ -478,6 +478,27 @@ def paperless_facets(conn, owner_id: UUID, connector_id: UUID) -> dict:
}
_THUMBNAIL_MEDIA = frozenset({"image/png", "image/jpeg", "image/webp", "image/gif"})
PAPERLESS_SEARCH_PARAMS = {
"mode": "mode",
"title": "title",
"correspondent": "correspondent",
"document_type": "document_type",
"storage_path": "storage_path",
"tag": "tags",
"tag_mode": "tag_mode",
"document_from": "document_range",
"document_to": "document_range",
"added_from": "added_range",
"added_to": "added_range",
"asn": "asn",
"custom": "custom_fields",
"sort": "sort",
"cursor": "continuation",
}
def paperless_thumbnail(conn, owner_id: UUID, document_id: str, connector_id: UUID) -> tuple[bytes, str]:
if not document_id.isdigit() or len(document_id) > 12:
raise unprocessable("Die Paperless-Nummer ist ungültig.")
@@ -489,7 +510,8 @@ def paperless_thumbnail(conn, owner_id: UUID, document_id: str, connector_id: UU
if fetched is None:
raise not_found()
data, media, _name = fetched
if not media.startswith("image/"):
# Raster pictures only. A vector file could carry markup.
if media not in _THUMBNAIL_MEDIA:
raise unprocessable("Paperless hat kein Vorschaubild geliefert.")
return data, media
@@ -2086,6 +2108,8 @@ def _install_sources() -> None:
navigate=None,
preview=None,
facets=paperless.facets,
search_params=PAPERLESS_SEARCH_PARAMS,
thumbnail=lambda conn, owner, connector_id, item: paperless_thumbnail(conn, owner, str(item), connector_id),
))
register_source(SourceModule(
kind="imap",