diff --git a/main.py b/main.py index 27ad9f0..b244771 100644 --- a/main.py +++ b/main.py @@ -214,6 +214,14 @@ async def delete_book_api(book_id: int): return {"ok": ok, "message": message} +@app.get("/api/debug/calibre_books") +async def debug_calibre_books(): + """Return raw listbooks sample so we can verify field names and structure.""" + cfg = config.load() + books = fetch_all_books(cfg.calibre) + return {"total": len(books), "sample": books[:5]} + + # --- Data reset --- @app.post("/settings/reset-sync-data")