Files
ohm_streaming/app/routers/AGENTS.md
T
root 3dc5dd8fe9
CI / Test (Python 3.11) (push) Has been cancelled
CI / Test (Python 3.12) (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Type Check (push) Has been cancelled
CI / Summary (push) Has been cancelled
feat: fix auth, provider health checks, search, and redesign UI
- Fix register/login: dict-style access on UserTable ORM objects
- Fix HTMX auth: inject JWT token in all HTMX request headers
- Fix FS7 search: use DLE AJAX endpoint /engine/ajax/search.php
- Fix ZT search: use ?p=series&search=QUERY (not DLE format)
- Fix provider health: load hardcoded providers + domain manager
- Add self.id to all anime/series providers
- Redesign homepage: Netflix-style horizontal scroll cards (.hc)
- Redesign search results: grouped by title, poster + synopsis + 3 buttons
- Add Télécharger dropdown: season download + episode picker
- Fix navbar CSS: restore .tabs flex layout, remove orphan rules
- Fix HTMX spinner: remove inline display:none, use CSS indicator
- Add AGENTS.md files across project for developer documentation
2026-03-28 00:14:31 +00:00

2.1 KiB

Routers (app/routers/)

OVERVIEW

11 FastAPI APIRouter modules, each owning a URL prefix. All registered in main.py:118-144.

WHERE TO LOOK

Router File Prefix Purpose
root_router router_root.py /, /web Index page, web UI
auth_router router_auth.py /api/auth Register, login, JWT tokens
downloads_router router_downloads.py /api/download Task CRUD, pause/resume, file serve
anime_router router_anime.py /api/anime, /api/series Search, metadata, episodes, season download
favorites_router router_favorites.py /api/favorites Favorites toggle, list
recommendations_router router_recommendations.py /api/recommendations, /api/releases Personalized + latest releases
watchlist_router router_watchlist.py /api/watchlist Watchlist CRUD, scheduler, auto-download
sonarr_router router_sonarr.py /api/sonarr, /api/webhook/sonarr Webhook receiver, mappings
player_router router_player.py /player, /watch Video player pages
static_router router_static.py /static, /video Static files, video streaming (Range)
settings_router router_settings.py /api/settings User app settings

CONVENTIONS

Adding endpoints: Identify the correct router by URL prefix → add to that file → import in app/routers/__init__.py (if new router) → register in main.py.

Shared dependencies (via FastAPI Depends):

  • download_manager: DownloadManager = Depends(lambda: download_manager) — singleton from main.py
  • current_user: User = Depends(get_current_user_from_token) — JWT auth
  • templates: Jinja2Templates = Depends(lambda: templates) — Jinja2 renderer

Router registration in main.py uses app.include_router(router). Tags set per-router for OpenAPI.

ANTI-PATTERNS

  • Do NOT create a new router for a single endpoint — add to existing matching router
  • Do NOT use Depends() with direct module imports that create circular references
  • Do NOT duplicate URL prefixes across routers