bugfix/roku-regex (#50)

- Check for releases with 1080p and roku together as it is a "common japanese word"

* Added ROKU automated tests
      - match with dot, underscore, hyphen or space between them
      - check if same on radarr AND sonarr

---------

Co-authored-by: wheat4714.usedwhensimpleloginisbanned@gmail.com <wheat4714.usedwhensimpleloginisbanned@gmail.com>
Co-authored-by: santiagosayshey <sayheysantiago@proton.me>
This commit is contained in:
wheat4714
2024-05-09 12:41:25 +01:00
committed by GitHub
parent dfae1bad12
commit 5096994b62
3 changed files with 27118 additions and 27105 deletions

View File

@@ -11,6 +11,16 @@ def roku(debug_level=0):
roku_value_radarr = get_regex(roku_radarr, "roku", debug_level)
roku_value_sonarr = get_regex(roku_sonarr, "roku", debug_level)
if debug_level == 0:
print(f"Testing with regex: {roku_value_radarr}")
# Compare Radarr and Sonarr Roku regex values
if roku_value_radarr != roku_value_sonarr:
print("Test Failed: regex value not same.")
print(f"Radarr regex: {roku_value_radarr}")
print(f"Sonarr regex: {roku_value_sonarr}")
sys.exit(1)
radarr_good_matches = [
"Weird The Al Yankovic Story 2022 1080p ROKU WEB-DL DD5.1 H.264-SMURF",
"The.Spiderwick.Chronicles.2024.S01E06.1028.Teeth.1080p.ROKU.WEB-DL.DD5.1.H.264-playWEB",
@@ -74,4 +84,7 @@ if __name__ == "__main__":
print("\nThe following terms should have matched:")
for platform, term in failed_good_matches:
print(f"- {platform}: {term}")
sys.exit(1)
sys.exit(1)