# Test Dashboard — NexStream Scraper

A minimal test dashboard is served at `/test` on the nexstream-scraper (`:3091`).

## What it does
- Search by movie title or IMDB ID (resolves via TMDB proxy)
- Fetches streams from the scraper pipeline
- Checks each unique hash against RD cache (add magnet → check status → delete)
- Shows green "⚡ CACHED" or red "UNCACHED" per source
- Click "▶ Play" on cached sources → adds to RD → selects files → unrestricts → plays

## Components
- **HTML page**: `src/routes/test.html` — single file, inline CSS/JS
- **RD proxy**: `src/routes/rdproxy.js` — GET/POST proxy for RD API (handles CORS, auth)
- **Routes**: added in `src/index.js`

## RD Proxy Endpoints
- `GET /api/rd/*` — proxy any GET to `https://api.real-debrid.com/rest/1.0/*`
- `POST /api/rd/*` — proxy any POST to `https://api.real-debrid.com/rest/1.0/*`

## Layout
```
┌──────────────────────────────────┐
│  Search bar + button             │
├──────────────────────────────────┤
│  Status: "12 sources, 4 cached"  │
├──────────────────────────────────┤
│  Source: 2160p 71GB  ⚡ CACHED  ▶│
│  Source: 1080p 3.5GB  ❌         │
│  Source: 2160p 45GB  ⚡ CACHED  ▶│
├──────────────────────────────────┤
│  <video> player (hidden for MKV) │
└──────────────────────────────────┘
```

## Browser Limitations
RD streams are MKV containers (BluRay REMUX). Browsers can't play MKV natively. Clicking "▶ Play" will show a VLC link fallback for MKV files. Only MP4/WEB-DL files play directly in-browser.
