Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(starr): Moved webdl and webrip into Amazon regex to prevent incorrect matches #1950

Conversation

wheat4714
Copy link
Contributor

@wheat4714 wheat4714 commented May 22, 2024

Pull Request

Purpose

I created this pull request because I noticed that Amazon CF was applying to certain TV shows and TV episodes. I noticed that the regex is simply looking for "Amazon" in a word boundary. As this is a dictionary word, it's going to match stuff it shouldn't.

Approach

Instead of matching just "Amazon", it requires additional text either side of, which always comes with these releases. Either the resolution or web-rip / web-dl.

https://regex101.com/r/IR8Qbx/6

Requirements

@github-actions github-actions bot added Area: Sonarr Sonarr Related Area: Backend Backend Changes, not related to a specific section Area: Starr Custom Formats Issue is related to custom formats labels May 22, 2024
@github-actions github-actions bot added the Area: Radarr Radarr Related label May 22, 2024
@wheat4714 wheat4714 changed the title Moved webdl and webrip into Amazon regex to prevent incorrect matches feat(maintenance): Moved webdl and webrip into Amazon regex to prevent incorrect matches May 22, 2024
@wheat4714 wheat4714 changed the title feat(maintenance): Moved webdl and webrip into Amazon regex to prevent incorrect matches fix(starr): Moved webdl and webrip into Amazon regex to prevent incorrect matches May 23, 2024
@TRaSH-
Copy link
Contributor

TRaSH- commented May 23, 2024

Did a little check what i could find with amazon in the title and added it to your regex test case
https://regex101.com/r/IR8Qbx/7

@wheat4714
Copy link
Contributor Author

@TRaSH- Better now https://regex101.com/r/IR8Qbx/8

I added a negative lookbehind for "the.amazon" as that seems to be a common pattern, but no sane person would label a streaming service "the streaming service".

I've left all the resolutions in the regex. Removing them would have fixed the incorrect matches as well. Whilst I was not able to find any releases where the resolution is present and WEB-DL/Web-Rip is not, I have only been scrolling through prowlarr results, so cannot be certain that there are none.

@TRaSH- TRaSH- requested a review from nuxencs May 23, 2024 17:38
@nuxencs
Copy link
Contributor

nuxencs commented May 24, 2024

@wheat4714 this is a way simpler version and it still catches 90% of those cases. the last 10% are just horribly named releases.

https://regex101.com/r/kBRsQW/1

@github-actions github-actions bot removed the Area: Radarr Radarr Related label May 24, 2024
Copy link
Contributor

@nuxencs nuxencs left a comment

Choose a reason for hiding this comment

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

please make the same adjustment for the radarr cf

@github-actions github-actions bot added the Area: Radarr Radarr Related label May 26, 2024
@nuxencs nuxencs force-pushed the fix/Amazon-CF-should-not-match-episode-names branch from 7440b22 to 6d7d9f5 Compare May 27, 2024 14:02
Copy link
Contributor

@nuxencs nuxencs left a comment

Choose a reason for hiding this comment

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

please also add back the removed WEBDL and WEBRIP conditions

@nuxencs nuxencs requested a review from a team June 3, 2024 14:27
@FonduemangVI FonduemangVI merged commit 13780d7 into TRaSH-Guides:master Jun 28, 2024
10 checks passed
@bakerboy448
Copy link
Contributor

bakerboy448 commented Jul 1, 2024

Reverting this. Breaking change that materially breaks sonarr rename functionality for existing episodes.

This was not actually tested in sonarr and only has blind regex performed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Backend Backend Changes, not related to a specific section Area: Radarr Radarr Related Area: Sonarr Sonarr Related Area: Starr Custom Formats Issue is related to custom formats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants