Sign inSign up

ntwritecode/ncore-notifier

By ntwritecode

•Updated 8 months ago

A lightweight nCore recommended torrent tracker with Telegram notifications.

Image
0

1.4K

ntwritecode/ncore-notifier repository overview

⁠ncore-tracker

A lightweight, self-hosted Python application that monitors nCore for recommended torrents and sends instant Telegram notifications when new ones appear.

⁠Why use it?

If you often check the "Recommended" (Ajánlott) section on nCore but don't want to manually refresh the page, this tool does it for you. It remembers which torrents you've already seen and only alerts you about the brand new additions.

⁠How to use it

⁠1. Prerequisites
  • An active nCore account (2FA must be disabled).
  • A Telegram Bot (see below).
  • Docker and Docker Compose installed.
⁠2. Manual Setup (Clone Repo)
  1. Clone/Download this repository.
  2. Configure: Open docker-compose.yml and fill in your credentials.
  3. Run: docker compose up -d
⁠3. Quick Start (Portainer / Docker Compose)

If you don't want to clone the repository, just copy this content into a docker-compose.yml file or a Portainer stack:

services:
  ncore-tracker:
    image: ntwritecode/ncore-notifier:latest
    container_name: ncore-tracker
    restart: unless-stopped
    environment:
      - NCORE_USER=your_username
      - NCORE_PASS=your_password
      - NCORE_TYPES=HD_HUN,HDSER_HUN
      - CRON_INTERVAL=60
      - TELEGRAM_TOKEN=your_bot_token
      - TELEGRAM_CHAT_ID=your_chat_id
      - SILENT_FIRST_RUN=True
      - ONLY_RECENT_YEARS=True
      - NOTIFICATION_LINK_TYPE=both
    volumes:
      - ./data:/app/data
⁠4. Configuration Details

Fill in your credentials as follows:

  • NCORE_USER: Your nCore username.
  • NCORE_PASS: Your nCore password.
  • NCORE_TYPES: What you are interested in (e.g., HD_HUN,HDSER_HUN).
  • TELEGRAM_TOKEN: Your bot's token from @BotFather⁠.
  • TELEGRAM_CHAT_ID: Your chat ID (you can get it from @userinfobot⁠).
  • SILENT_FIRST_RUN: (Optional) True to skip notifications for existing torrents on first start.
  • ONLY_RECENT_YEARS: (Optional) True to only notify about torrents from this or the previous year.
  • NOTIFICATION_LINK_TYPE: (Optional) both, url (details), or download.
  1. Run: Choose one of the methods below:

    Method B: Local Execution (for testing) If you want to run it without Docker using uv:

    1. Copy the example config: cp .env.example .env
    2. Edit .env with your real data.
    3. Run:
      uv pip install -r requirements.txt
      uv run python main.py
      

If you are looking for something specific (e.g. a specific movie that isn't currently "recommended"), you can create a wishlist.json file in your ./data directory. The app will search for these patterns on every run.

wishlist.json Example:

[
  {
    "pattern": "Forrest Gump",
    "type": ["HD_HUN", "HD"],
    "sort_by": "SEEDERS",
    "sort_order": "DECREASING"
  },
  {
    "pattern": "Inception",
    "type": "HD_HUN"
  }
]

When an item is found and notified, the app will automatically add "notified": true to that item in the JSON so it doesn't alert you again.

⁠6. Category & Parameter Reference

These values apply to both the global NCORE_TYPES configuration and the wishlist.json fields.

⁠Available Categories (type)
TypeDescriptionTypeDescription
HD_HUNHD Movies (HU)HDHD Movies (EN)
HDSER_HUNHD Series (HU)HDSERHD Series (EN)
SD_HUNSD Movies (HU)SDSD Movies (EN)
SDSER_HUNSD Series (HU)SDSERSD Series (EN)
DVD_HUNDVD (HU)DVDDVD (EN)
DVD9_HUNDVD9 (HU)DVD9DVD9 (EN)
DVDSER_HUNDVD Series (HU)DVDSERDVD Series (EN)
GAME_ISOPC Games (ISO)GAME_RIPPC Games (RIP)
CONSOLEConsole GamesISOOther ISO
EBOOK_HUNE-book (HU)EBOOKE-book (EN)
MP3_HUNMP3 (HU)MP3MP3 (EN)
LOSSLESS_HUNLossless (HU)LOSSLESSLossless (EN)
CLIPMusic VideoMOBILMobile
MISCMiscISOOther ISO
XXX_HDAdult HDXXX_DVDAdult DVD
XXX_SDAdult SDXXX_IMGAdult Image
ALL_OWNAll (Own)
⁠Sorting Options (sort_by)
ValueDescription
NAMESort by title
UPLOADSort by upload date
SIZESort by file size
TIMES_COMPLETEDSort by download count
SEEDERSSort by active seeders
LEECHERSSort by active leechers
⁠Sort Order (sort_order)
ValueDescription
INCREASINGAscending order (A-Z, oldest first)
DECREASINGDescending order (Z-A, newest first)

⁠Technical Info

  • Environment Variables:
    • CRON_INTERVAL: Frequency of checks in minutes (default is 60).
    • TELEGRAM_TOKEN: Your bot's token.
    • TELEGRAM_CHAT_ID: Your Telegram chat ID.
    • SILENT_FIRST_RUN: True to skip notifications for existing torrents on first start.
    • ONLY_RECENT_YEARS: True to only notify about torrents from this or the previous year.
    • NOTIFICATION_LINK_TYPE: both, url (details), or download.
    • RETENTION_MONTHS: How many months to keep seen torrents in the database (default: 6).
  • Persistence:
    • In Docker: Data is stored in the mounted volume (typically ./data).
    • Locally: The app automatically detects it's not in a container and uses ./data in your current folder.
⁠Tips & Tricks
  • Testing without notifications: If you leave TELEGRAM_TOKEN empty, the app will just print the new torrents to your terminal.
  • Immediate Check: The app always runs a check immediately when it starts, then waits for the CRON_INTERVAL.
  • Session Reuse: If you see "Reusing existing session cookies" in the logs, it means the app is successfully avoiding unnecessary logins.

Built with ❤️ by NtWriteCode⁠

Tag summary

Content type

Image

Digest

sha256:43ade1747…

Size

46.6 MB

Last updated

8 months ago

docker pull ntwritecode/ncore-notifier