diff --git a/backend/app/admin_ui.py b/backend/app/admin_ui.py index e108d3d..f276b8c 100644 --- a/backend/app/admin_ui.py +++ b/backend/app/admin_ui.py @@ -335,6 +335,7 @@ def admin_article_detail(request: Request, article_id: int): if not article.get("press_contact") and isinstance(extraction.get("press_contact"), str): article["press_contact"] = extraction.get("press_contact") article["extraction"] = extraction + article["image_selection"] = extraction.get("image_selection") if isinstance(extraction.get("image_selection"), dict) else {} article["image_entries"] = _build_image_entries(article, extraction, meta) image_review = meta.get("image_review") if isinstance(meta.get("image_review"), dict) else {} article["selected_image_url"] = image_review.get("selected_url") if isinstance(image_review.get("selected_url"), str) else None diff --git a/backend/templates/admin_article_detail.html b/backend/templates/admin_article_detail.html index 29c054b..86fb7af 100644 --- a/backend/templates/admin_article_detail.html +++ b/backend/templates/admin_article_detail.html @@ -75,6 +75,29 @@ {% endif %} {% endif %} {% if article.image_entries %} + {% if article.image_selection %} +
+ Automatische Bildauswahl (Score + Gründe) +
Primärbild (Auto): {{ article.image_selection.primary or "-" }}
+
Ausgewählt: {{ article.image_selection.selected_count or 0 }} / Kandidaten: {{ article.image_selection.total_candidates or 0 }}
+ {% if article.image_selection.ranked %} + + + + + + {% for r in article.image_selection.ranked %} + + + + + + {% endfor %} + +
BildScoreGründe
{{ r.url }}{{ r.score }}{{ r.reasons|join(", ") if r.reasons else "-" }}
+ {% endif %} +
+ {% endif %}
{% for image in article.image_entries %}