Zsolt Alföldi 469e5b0678 init
2026-05-07 00:14:02 +02:00
2026-05-07 00:14:02 +02:00
2026-05-07 00:14:02 +02:00
2026-05-07 00:14:02 +02:00
2026-05-07 00:14:02 +02:00
2026-05-07 00:14:02 +02:00
2026-05-07 00:14:02 +02:00
2026-05-07 00:14:02 +02:00
2026-05-07 00:14:02 +02:00
2026-05-07 00:14:02 +02:00
2026-05-07 00:14:02 +02:00

ncore-hnr

Go app for checking nCore hit'n'run-risk torrents, force-starting matching qBittorrent torrents, and tracking state in SQLite.

Configuration

Put local config in .env:

NCORE_USERNAME='your-ncore-username'
NCORE_PASSWORD='your-ncore-password'

QBITTORRENT_URL='http://localhost:8080'
QBITTORRENT_USERNAME='admin'
QBITTORRENT_PASSWORD='your-qbit-password'

APP_DB_PATH='data/ncore-hnr.sqlite'
DRY_RUN='false'
ALERT_AFTER='48h'

# Optional notifications: set NOTIFICATION_TYPE to 'ntfy' or 'smtp'.
NOTIFICATION_TYPE=''

NOTIFICATION_NTFY_URL=''

NOTIFICATION_SMTP_HOST=''
NOTIFICATION_SMTP_PORT='587'
NOTIFICATION_SMTP_USERNAME=''
NOTIFICATION_SMTP_PASSWORD=''
NOTIFICATION_SMTP_FROM=''
NOTIFICATION_SMTP_TO=''

DRY_RUN=false is the default and will call qBittorrent setForceStart and reannounce. Use --dry-run=true when you only want to preview matches.

Set NOTIFICATION_TYPE=ntfy and NOTIFICATION_NTFY_URL='https://ntfy.sh/your-secret-topic' to send manual-needed alerts through ntfy. For compatibility, old NOTIFY_URL values still work as the ntfy URL.

Set NOTIFICATION_TYPE=smtp to send manual-needed alerts by email. For Gmail, use:

NOTIFICATION_SMTP_HOST='smtp.gmail.com'
NOTIFICATION_SMTP_PORT='587'
NOTIFICATION_SMTP_USERNAME='youraddress@gmail.com'
NOTIFICATION_SMTP_PASSWORD='your-gmail-app-password'
NOTIFICATION_SMTP_FROM='ncore <youraddress@gmail.com>'
NOTIFICATION_SMTP_TO='target@example.com'

Run

go run ./cmd/ncore-hnr

Preview without qBittorrent actions:

go run ./cmd/ncore-hnr --dry-run=true

JSON output:

go run ./cmd/ncore-hnr --json

SQLite Views

Show aggregate statistics and the latest run:

go run ./cmd/ncore-hnr stats

Show tracked torrent status rows:

go run ./cmd/ncore-hnr status

Both read-only commands support JSON and a custom DB path:

go run ./cmd/ncore-hnr status --json
go run ./cmd/ncore-hnr stats --db data/ncore-hnr.sqlite

Docker

docker build -t ncore-hnr:local .
docker run --rm --env-file .env -v "$PWD/data:/data" ncore-hnr:local

Kubernetes

The k8s/ folder contains a CronJob, PVC, and example Secret. Store real secrets out of git.

Description
Ncore hit n run handler
Readme 77 KiB
Languages
Go 97.8%
Makefile 1.4%
Dockerfile 0.8%