{# ============================================================ File: templates/debug/inspect_state.html Purpose: Inspect SQLite vs Redis state per book_idx - Initial render via Jinja - Live updates via inspect_state.js - BookCard is server-rendered and NEVER replaced - Only the right-side state table is updated dynamically ============================================================ #} {% extends "layout.html" %} {% block content %}

State Inspection (SQL vs Redis)

{% for entry in results %}
{% if entry.card %} {% with b = entry.card %} {% include "components/bookcard.html" %} {% endwith %} {% else %} {{ entry.book_idx }} {% endif %}
{% set sql = entry.sqlite %} {% set redis = entry.redis %} {% set merged = entry.would_merge_to %} {% for field in [ "status", "chapters_total", "downloaded", "chapters_download_done", "chapters_download_skipped", "parsed", "chapters_parsed_done", "audio_done", "audio_skipped", "last_update" ] %} {% endfor %}
Field SQLite Redis Merged
{{ field }} {{ sql.get(field, "") }} {{ redis.get(field, "") }} {{ merged.get(field, "") }}
{% endfor %}
{% endblock %} {% block scripts %} {% endblock %}