Skip to content

feat(trackers): detect and skip renamed/modified releases#157

Open
nitrobass24 wants to merge 2 commits into
mainfrom
feat/detect-renamed-release
Open

feat(trackers): detect and skip renamed/modified releases#157
nitrobass24 wants to merge 2 commits into
mainfrom
feat/detect-renamed-release

Conversation

@nitrobass24

Copy link
Copy Markdown
Collaborator

Problem

Uploads are being rejected by trackers (e.g. LST) with [Modified Release] Renamed: ... when the source file on disk is a renamed copy of the original P2P release — dots replaced with spaces (Fury.2014.2160p.MA.WEB-DL.DDP5.1.HDR.H.265-HHWEB.mkvFury 2014 ... H 265-HHWEB.mkv), typically done upstream by a library manager/renamer. upbrr faithfully uploads the renamed file and the tracker rejects/H&Rs it.

Change

Detect renamed sources before upload and skip the affected trackers, reusing the existing rule-failure skip + per-tracker override machinery so it applies across all tracker families (UNIT3D and non-UNIT3D), not just LST.

  • New isRenamedRelease (internal/trackers/modified_release.go): flags a grouped, non-personal, non-disc source whose on-disk name (source path or primary video file) contains whitespace and ends in a -GROUP tag.
  • Wired at the top of EvaluateRules so every tracker family is covered (MANUAL exempt via skipsModifiedReleaseCheck).
  • Enabled for all trackers by default; overridable per-tracker via the existing IgnoreTrackerRuleFailuresFor path. Surfaces in the upload review.

False-positive / regression guards

  • Excludes parenthesis/bracket/brace names so Plex/Radarr library folders (Fury (2014) {imdb-tt2713180}) are not flagged, even when the parser mis-extracts an id token as the group.
  • Requires the parsed group to be the actual trailing -GROUP suffix.
  • Preserves EvaluateRules' nil return contract so pre-existing failures (e.g. audio_bloat on MTV/BHD) are not silently cleared.

Tests

  • Detector unit tests: clean vs renamed, folder vs file, Plex/Radarr id-folder, group-not-trailing-tag, personal/disc exemptions, source-vs-video precedence.
  • Cross-family rule tests (LST/PTP/PHD/HDB) asserting the failure + reason; MANUAL exemption; nil-contract regression guard; end-to-end filterTrackersByRuleFailures skip + override.
  • go test ./internal/trackers/... ./internal/metadata/..., make lint, make backend all clean.

Out of scope

Detecting remux/altered files that keep a clean name (the [Modified Release] Altered file ... mediainfo rejection) — needs parsing the MediaInfo Complete name/Writing library, which isn't structured today.

Trackers reject uploads whose source file was renamed away from its
original scene/P2P release name (e.g. a library manager rewriting
Fury.2014...H.265-HHWEB to spaces). Detect this before upload and skip
the affected trackers, reusing the existing rule-failure skip + override
machinery so it applies across all tracker families, not just UNIT3D.

isRenamedRelease flags a grouped, non-personal, non-disc source whose
on-disk name (source path or primary video file) has whitespace and a
trailing -GROUP tag, excluding parenthesis/bracket library names so
Plex/Radarr folders are not false-positived. The check runs at the top of
EvaluateRules for every tracker (MANUAL exempt) and preserves the nil
return contract so pre-existing failures (e.g. audio_bloat) are kept.

Detecting remux/altered files that keep a clean name is out of scope.
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Audionut, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 18 minutes and 4 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cd7522c1-ef2c-4e50-8a64-18b130f37eab

📥 Commits

Reviewing files that changed from the base of the PR and between 88f671d and 1de9a1a.

📒 Files selected for processing (6)
  • internal/trackers/catalog.go
  • internal/trackers/modified_release.go
  • internal/trackers/modified_release_test.go
  • internal/trackers/rules.go
  • internal/trackers/rules_test.go
  • internal/trackers/service_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/detect-renamed-release

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.

…elease

# Conflicts:
#	internal/trackers/rules.go
@Audionut

Copy link
Copy Markdown
Contributor

In UA, I had a catch like this. if any(tag in file for tag in ['{tmdb-', '{imdb-', '{tvdb-']): which seemed to work, without complaint, to catch *arr renames. If I understand this code correctly, it's ignoring anything with ()[]{}. Could probably add a quick true return for the UA equivalent though.

We could brute force some scene detection, which would not only find filename modifications, but also catch scene status for scene releases that have filenames that do not match releasenames.

I can't recall the exact details, but there's something with https://api.srrdb.com/v1/search/r: that doesn't catch releases, even when the filename is correct.

But when having the imdb, https://api.srrdb.com/v1/search/imdb: can be used, which returns a list like this:

{
  "results": [
    {
      "release": "Lego.Scooby-Doo.Blowout.Beach.Bash.2017.COMPLETE.BLURAY-KEBABRULLE",
      "date": "2017-07-19 13:20:27",
      "hasNFO": "yes",
      "hasSRS": "yes",
      "isForeign": "no",
      "imdbId": "6946580",
      "size": 16979068198
    },
    {
      "release": "Lego.Scooby-Doo.Blowout.Beach.Bash.2017.DANiSH.1080p.BluRay.X264-iNVANDRAREN",
      "date": "2022-01-14 09:12:41",
      "hasNFO": "yes",
      "hasSRS": "yes",
      "isForeign": "yes",
      "imdbId": "6946580",
      "size": 3565588135
    },
    {
      "release": "Lego.Scooby.Doo.Blowout.Beach.Bash.2017.1080p.BluRay.x264-ROVERS",
      "date": "2017-07-19 06:28:30",
      "hasNFO": "yes",
      "hasSRS": "yes",
      "isForeign": "no",
      "imdbId": "6946580",
      "size": 4770020134
    },

And then the pre-existing details url (with pre-matching to catch the correct release), can be used to fetch the actual filename of the release:

{
  "name": "Lego.Scooby.Doo.Blowout.Beach.Bash.2017.1080p.BluRay.x264-ROVERS",
  "files": [
    {
      "name": "lego.scooby.doo.blowout.beach.bash.2017.1080p.bluray.x264-rovers.nfo",
      "size": 5561,
      "crc": "9E1D3021"
    },
    {
      "name": "Proof/lego.scooby.doo.blowout.beach.bash.2017.1080p.bluray.x264-rovers.proof.jpg",
      "size": 1344126,
      "crc": "0D14074E"
    },
.........
    {
      "name": "lego.scooby.doo.blowout.beach.bash.2017.1080p.bluray.x264-rovers.r92",
      "size": 45044348,
      "crc": "8780D179"
    }
  ],
  "archived-files": [
    {
      "name": "lego.scooby.doo.blowout.beach.bash.2017.1080p.bluray.x264-rovers.mkv",
      "size": 4695029966,
      "crc": "9CDDBFCD"
    }
  ],
  "adds": []
}

Anyway, the scene stuff is just an idea, but the specific *arr handling should be included here imo. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants