Commit Graph

5 Commits

Author SHA1 Message Date
jason
96e7c6e8e5 fix: correct RSS parsing for guid/link/title fields
fast-xml-parser returns elements with attributes (like <guid isPermaLink>)
as { "@_isPermaLink": "true", "#text": "url" } — calling String() on that
gives "[object Object]", making every torrent_id identical and causing the
UNIQUE constraint to drop all but the first episode insert.

Fixes:
- Add textOf() helper that extracts #text from attribute-bearing nodes
- Apply textOf() to guid, link, title, category, size, pubDate fields
- Add isArray config so a single-result feed still returns an array
- Use <link> directly as torrent_url (Nyaa provides the .torrent URL there)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 15:02:49 -05:00
jason
2872ae8c01 feat: auto-download from episode 1 on show add
When a show is added, ingest the Nyaa feed, sort episodes oldest→newest
(ep 1 first), and auto-download them all in order rather than leaving
them as pending. Ongoing polls continue downloading new episodes the
same way.

Extracted a shared downloadItems() helper from the scheduler so both
the initial ingest and the cron poll use identical insert→download→
status-update logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 14:54:22 -05:00
jason
89fb18e3cc fix: bump Dockerfile to node:22-alpine for node:sqlite support
node:sqlite built-in module requires Node >= 22.5.0; the previous
node:20-alpine image threw ERR_UNKNOWN_BUILTIN_MODULE at startup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 14:41:57 -05:00
jason
ded0875e72 feat: initial full-stack nyaa-crawler implementation
- 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>
2026-03-17 14:00:09 -05:00
jason
8294e8d95f Initial commit: add README for nyaa-crawler
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 13:36:43 -05:00