Skip to content
This repository was archived by the owner on Jun 14, 2026. It is now read-only.

feat(tracker}: add Zenith (ZNTH) - #1389

Closed
znth-dev wants to merge 5 commits into
Audionut:masterfrom
znth-dev:add-znth
Closed

feat(tracker}: add Zenith (ZNTH)#1389
znth-dev wants to merge 5 commits into
Audionut:masterfrom
znth-dev:add-znth

Conversation

@znth-dev

@znth-dev znth-dev commented Jun 9, 2026

Copy link
Copy Markdown

Sorry we're aware UA is on a dev freeze, but users wanted a better way to add the tracker.
Adds ZNTH a UNIT3D tracker: tracker class, registration, qB URL mapping, and example config. Banned-group endpoint returns plain strings, handled in write_banned_groups_to_file.

Summary by CodeRabbit

  • New Features

    • Added support for the ZNTH tracker, including upload helpers: smarter torrent naming, adult-content checks, media-type mapping, and automated form data population.
    • Tracker detection now recognizes ZNTH announce URLs.
  • Documentation

    • Tracker configuration docs updated to include ZNTH and its configuration options.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 37c97a23-4fd2-4e3e-82aa-273724ca09b6

📥 Commits

Reviewing files that changed from the base of the PR and between bcacefd and 5b29afe.

📒 Files selected for processing (1)
  • src/trackers/ZNTH.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/trackers/ZNTH.py

📝 Walkthrough

Walkthrough

Adds ZNTH tracker support: new ZNTH UNIT3D subclass with name/type/mod-queue logic and adult-content checks; registers ZNTH in tracker setup and API sets; adds announce URL pattern; updates example config; and makes banned-groups writing accept mixed JSON/string formats.

Changes

ZNTH Tracker Integration

Layer / File(s) Summary
ZNTH Tracker Class Implementation
src/trackers/ZNTH.py
New ZNTH tracker class extending UNIT3D with endpoint URLs, async get_name() for TV/year normalization, get_additional_checks() for adult-keyword detection and optional user prompt, get_type_id() for media type↔ID mapping, and get_additional_data() fetching mod-queue flag.
Tracker System Registration
src/trackersetup.py
Imports and registers ZNTH in tracker_class_map and api_trackers; includes ZNTH in the banned-groups whitelist used by check_banned_group.
URL Pattern Recognition
src/torrent_clients/qbittorrent.py
Adds znthhttps://znth.cx to tracker_url_patterns for announce URL matching.
Example Configuration
data/example-config.py
Lists ZNTH in available trackers and adds TRACKERS['ZNTH'] default config with link_dir_name, api_key, anon, and modq.
Banned Groups Data Handling
src/trackersetup.py
write_banned_groups_to_file now accepts list[Any] and extracts banned group names from dicts with name or from plain strings, then writes last_updated, CSV names, and raw_data.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A floppy-eared rabbit gives a cheer,
New ZNTH hops in, brave and near,
Types and names and checks aligned,
Banned groups sorted, URLs assigned,
Hoppity uploads, mod-queue in sight — hooray! 🎉

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title has a syntax error: 'feat(tracker}' is missing a closing parenthesis and should be 'feat(tracker)'. While the intent to add ZNTH tracker support is clear, the malformed conventional commit format fails basic syntax validation. Correct the title to 'feat(tracker): add Zenith (ZNTH)' to fix the conventional commit syntax error.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Thanks for taking the time to contribute to this project. Upload Assistant is currently in a complete rewrite, and no new development is being conducted on this python source at this time.

If you have come this far, please feel free to leave open, any pull requests regarding new sites being added to the source, as these can serve as the baseline for later conversion.

If your pull request relates to a critical bug, this will be addressed in this code base, and a new release published as needed.

If your pull request only addresses a quite minor bug, it is not likely to be addressed in this code base.

Details for the new code base will follow at a later date.

@znth-dev
znth-dev marked this pull request as ready for review June 9, 2026 20:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/trackers/ZNTH.py`:
- Around line 54-75: The parameter name `type` in async def get_type_id should
be renamed (e.g., to `content_type` or `torrent_type`) to avoid shadowing the
built-in; update the function signature and all internal references (`type` ->
`content_type`) and preserve the default value and existing logic (mapping_only,
reverse, and meta handling using meta.get('type')). Also search for and update
any external call sites that pass the keyword argument `type=` to use the new
parameter name to avoid breaking callers.
- Around line 40-42: The concatenation of meta.get('keywords') and
meta.get('combined_genres') into genres inserts a space not a CSV separator, so
the CSV-style regex in the adult detection can miss matches; update the genres
construction in src/trackers/ZNTH.py (where genres is set) to join only
non-empty parts with a comma (e.g., build a list [meta.get('keywords',''),
meta.get('combined_genres','')] filtered for truthy values and join with ', ')
so the existing regex and adult_keywords check work correctly; alternatively, if
you prefer to keep the current string join, adjust the regex left-boundary to
allow whitespace between lists, but prefer the comma-join fix for clarity.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3da56868-20da-4696-812f-8db0cb448cfb

📥 Commits

Reviewing files that changed from the base of the PR and between 1a5242a and bcacefd.

📒 Files selected for processing (4)
  • data/example-config.py
  • src/torrent_clients/qbittorrent.py
  • src/trackers/ZNTH.py
  • src/trackersetup.py

Comment thread src/trackers/ZNTH.py Outdated
Comment thread src/trackers/ZNTH.py
@Audionut

Copy link
Copy Markdown
Owner

Thanks for your pr. The re-write is now live at https://github.com/autobrr/upbrr

Your pr will be merged into upbrr with priority should it not be undertaken in the meantime.

Thanks again.

@Audionut Audionut closed this Jun 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants