- Node.js + TypeScript + Express backend using built-in node:sqlite - React + Vite frontend with dark-themed UI - Nyaa.si RSS polling via fast-xml-parser - Watch list with show/episode CRUD and status tracking - Auto-download scheduler with node-cron (configurable interval) - .torrent file downloader with batch-release filtering - Settings page for poll interval and quality defaults - Dockerfile and docker-compose for Unraid deployment - SQLite DB with migrations (shows, episodes, settings tables) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
76 lines
2.2 KiB
Markdown
76 lines
2.2 KiB
Markdown
# nyaa-crawler
|
|
|
|
A dockerized torrent crawler and downloader for [Nyaa.si](https://nyaa.si). Track anime shows, poll for new episodes via RSS, and automatically download `.torrent` files to a host-mounted directory.
|
|
|
|
## Features
|
|
|
|
- Search Nyaa.si and add shows to a watch list
|
|
- Automatic polling for new episodes (configurable interval, default 15 min)
|
|
- Auto-downloads `.torrent` files to a mapped host directory
|
|
- Track episode status: pending, auto-downloaded, or manually marked
|
|
- Bulk-mark episodes as already downloaded
|
|
- Minimal dark-themed web UI
|
|
- SQLite persistence — easy to back up and migrate
|
|
- Unraid-friendly Docker container
|
|
|
|
## Stack
|
|
|
|
- **Backend**: Node.js + TypeScript + Express
|
|
- **Frontend**: React + Vite
|
|
- **Database**: SQLite (`better-sqlite3`)
|
|
- **Scheduler**: `node-cron`
|
|
- **Nyaa integration**: RSS via `fast-xml-parser`
|
|
|
|
## Quick Start (Docker)
|
|
|
|
```bash
|
|
docker compose up -d
|
|
```
|
|
|
|
Open `http://localhost:8082` in your browser.
|
|
|
|
## Quick Start (Development)
|
|
|
|
```bash
|
|
npm install
|
|
npm run dev
|
|
```
|
|
|
|
- Client dev server: `http://localhost:5173` (proxies `/api` to `:3000`)
|
|
- API server: `http://localhost:3000`
|
|
|
|
## Environment Variables
|
|
|
|
| Variable | Default | Description |
|
|
|---|---|---|
|
|
| `PORT` | `3000` | HTTP port |
|
|
| `POLL_INTERVAL_SECONDS` | `900` | Polling frequency (min 60) |
|
|
| `TORRENT_OUTPUT_DIR` | `./data/torrents` | Where `.torrent` files are saved |
|
|
| `DATABASE_PATH` | `./data/db.sqlite` | SQLite database path |
|
|
|
|
## Unraid Deployment
|
|
|
|
```yaml
|
|
services:
|
|
nyaa-watcher:
|
|
image: your-registry/nyaa-watcher:latest
|
|
container_name: nyaa-watcher
|
|
restart: unless-stopped
|
|
environment:
|
|
- PORT=3000
|
|
- POLL_INTERVAL_SECONDS=900
|
|
- TORRENT_OUTPUT_DIR=/data/torrents
|
|
- DATABASE_PATH=/data/db.sqlite
|
|
volumes:
|
|
- /mnt/user/appdata/nyaa-watcher:/data
|
|
- /mnt/user/downloads/torrents/nyaa:/data/torrents
|
|
ports:
|
|
- "8082:3000"
|
|
```
|
|
|
|
## Notes
|
|
|
|
- Only `.torrent` files are downloaded — media is handled by your existing torrent client watching the output directory.
|
|
- Batch releases (titles containing "Batch", "Complete", "Vol.", or episode ranges) are automatically skipped.
|
|
- Removing a show marks it inactive (no further polling) but preserves episode history.
|