Implement full media crawler workflow with Flask backend and Vue frontend.

Add TMDB search and media detail pages, HDHive resource ingestion flow, unified error handling, Docker single-container runtime, and project docs/config updates for local deployment.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
renjue
2026-05-09 16:16:18 +08:00
parent d3550bf79b
commit 82581d2949
49 changed files with 4959 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
from config import Config
from http_client import request_json
def _headers():
headers = {"Content-Type": "application/json"}
if Config.EMBY_TOKEN:
headers["X-Emby-Token"] = Config.EMBY_TOKEN
return headers
def exists_by_tmdb_id(tmdb_id):
url = f"{Config.EMBY_BASE_URL}/Items?AnyProviderIdEquals=Tmdb.{tmdb_id}&Recursive=true&Limit=1"
result = request_json(
url,
headers=_headers(),
max_retry=Config.MAX_RETRY,
retry_delay_ms=Config.RETRY_DELAY_MS,
provider="emby",
)
total = ((result.get("data") or {}).get("TotalRecordCount")) or 0
result["exists"] = total > 0
return result