Custom Format detected on "Test Parsing" but not on real file #8130

Open
opened 2026-02-20 00:00:48 -05:00 by deekerman · 8 comments
Owner

Originally created by @rubasace on GitHub (Jan 3, 2024).

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Current Behavior

I have a TrueHD Atmos Custom format (from Trashguides):

{
  "trash_id": "496f355514737f7d83bf7aa4d24f8169",
  "trash_scores": {
    "default": 5000,
    "sqp-1-1080p": -10000,
    "sqp-1-2160p": -10000
  },
  "name": "TrueHD ATMOS",
  "includeCustomFormatWhenRenaming": false,
  "specifications": [
    {
      "name": "TrueHD",
      "implementation": "ReleaseTitleSpecification",
      "negate": false,
      "required": true,
      "fields": {
        "value": "True[ .-]?HD|W4NK3R|HQMUX"
      }
    },
    {
      "name": "ATMOS",
      "implementation": "ReleaseTitleSpecification",
      "negate": false,
      "required": true,
      "fields": {
        "value": "\\b(ATMOS|CtrlHD|W4NK3R|DON)(\\b|\\d)"
      }
    },
    {
      "name": "Not Basic Dolby Digital",
      "implementation": "ReleaseTitleSpecification",
      "negate": true,
      "required": true,
      "fields": {
        "value": "\\bDD[^a-z+]|(?<!e)ac3"
      }
    },
    {
      "name": "Not Dolby Digital Plus ",
      "implementation": "ReleaseTitleSpecification",
      "negate": true,
      "required": true,
      "fields": {
        "value": "\\bDD[P+]|\\b(e[-_. ]?ac3)\\b"
      }
    },
    {
      "name": "Not DTS",
      "implementation": "ReleaseTitleSpecification",
      "negate": true,
      "required": true,
      "fields": {
        "value": "\\bDTS(\\b|\\d)"
      }
    },
    {
      "name": "Not DTS X",
      "implementation": "ReleaseTitleSpecification",
      "negate": true,
      "required": true,
      "fields": {
        "value": "\\b(dts[-_. ]?x)\\b(?!\\d)"
      }
    },
    {
      "name": "Not FLAC",
      "implementation": "ReleaseTitleSpecification",
      "negate": true,
      "required": true,
      "fields": {
        "value": "\\bFLAC(\\b|\\d)"
      }
    }
  ]
}

When testing my custom formats against the file The Lord of the Rings The Two Towers (2002) {imdb-tt0167261} [Remux-2160p][HDR10][TrueHD Atmos 7.1][HEVC][EN+ES].mkv it reports TrueHD Atmos Custom Format but when checking the Movie file directly it doesn't.

This causes the movie to potentially be downloaded despite being already on the highest score expected.

Expected Behavior

The movie file should report TrueHD Atmos Custom format when such custom format matches on the "Test Parsing" functionality.

Steps To Reproduce

No response

Environment

- OS: Ubuntu 20.04
- Radarr: 5.2.6.8376
- Docker Install: Yes (Kubernetes via K3s)
- Using Reverse Proxy: Yes
- Browser: Google Chrome/Firefox/Safari

What branch are you running?

Master

Trace Logs? Not Optional

Screenshot 2024-01-03 at 16 43 27 Screenshot 2024-01-03 at 16 46 13

Trace Logs have been provided as applicable. Reports will be closed if the required logs are not provided.

  • I have read and followed the steps in the wiki link above and provided the required trace logs - the logs contain trace - that are relevant and show this issue.
Originally created by @rubasace on GitHub (Jan 3, 2024). ### Is there an existing issue for this? - [X] I have searched the existing open and closed issues ### Current Behavior I have a TrueHD Atmos Custom format (from Trashguides): ```json { "trash_id": "496f355514737f7d83bf7aa4d24f8169", "trash_scores": { "default": 5000, "sqp-1-1080p": -10000, "sqp-1-2160p": -10000 }, "name": "TrueHD ATMOS", "includeCustomFormatWhenRenaming": false, "specifications": [ { "name": "TrueHD", "implementation": "ReleaseTitleSpecification", "negate": false, "required": true, "fields": { "value": "True[ .-]?HD|W4NK3R|HQMUX" } }, { "name": "ATMOS", "implementation": "ReleaseTitleSpecification", "negate": false, "required": true, "fields": { "value": "\\b(ATMOS|CtrlHD|W4NK3R|DON)(\\b|\\d)" } }, { "name": "Not Basic Dolby Digital", "implementation": "ReleaseTitleSpecification", "negate": true, "required": true, "fields": { "value": "\\bDD[^a-z+]|(?<!e)ac3" } }, { "name": "Not Dolby Digital Plus ", "implementation": "ReleaseTitleSpecification", "negate": true, "required": true, "fields": { "value": "\\bDD[P+]|\\b(e[-_. ]?ac3)\\b" } }, { "name": "Not DTS", "implementation": "ReleaseTitleSpecification", "negate": true, "required": true, "fields": { "value": "\\bDTS(\\b|\\d)" } }, { "name": "Not DTS X", "implementation": "ReleaseTitleSpecification", "negate": true, "required": true, "fields": { "value": "\\b(dts[-_. ]?x)\\b(?!\\d)" } }, { "name": "Not FLAC", "implementation": "ReleaseTitleSpecification", "negate": true, "required": true, "fields": { "value": "\\bFLAC(\\b|\\d)" } } ] } ``` When testing my custom formats against the file `The Lord of the Rings The Two Towers (2002) {imdb-tt0167261} [Remux-2160p][HDR10][TrueHD Atmos 7.1][HEVC][EN+ES].mkv` it reports `TrueHD Atmos` Custom Format but when checking the Movie file directly it doesn't. This causes the movie to potentially be downloaded despite being already on the highest score expected. ### Expected Behavior The movie file should report `TrueHD Atmos` Custom format when such custom format matches on the "Test Parsing" functionality. ### Steps To Reproduce _No response_ ### Environment ```markdown - OS: Ubuntu 20.04 - Radarr: 5.2.6.8376 - Docker Install: Yes (Kubernetes via K3s) - Using Reverse Proxy: Yes - Browser: Google Chrome/Firefox/Safari ``` ### What branch are you running? Master ### Trace Logs? **Not Optional** <img width="1098" alt="Screenshot 2024-01-03 at 16 43 27" src="https://github.com/Radarr/Radarr/assets/9888880/36a56a68-5835-4e2d-93bf-41bbb1a84129"> <img width="2783" alt="Screenshot 2024-01-03 at 16 46 13" src="https://github.com/Radarr/Radarr/assets/9888880/11a72973-2aea-49e9-b020-167db711986d"> ### Trace Logs have been provided as applicable. Reports will be closed if the required logs are not provided. - [X] I have read and followed the steps in the wiki link above and provided the required trace logs - the logs contain `trace` - that are relevant and show this issue.
Author
Owner

@bakerboy448 commented on GitHub (Jan 3, 2024):

What's the original file name from the import event? Most likely it's a poorly named original file that has terms the custom format ignores

@bakerboy448 commented on GitHub (Jan 3, 2024): What's the original file name from the import event? Most likely it's a poorly named original file that has terms the custom format ignores
Author
Owner

@rubasace commented on GitHub (Jan 3, 2024):

That was actually the case, I removed all the "not" clauses from the Custom Format and it just works. Still weird why the test parsing reports the custom format when I'm pasting the exact same filename. Not sure if that's something you still would like to investigate. Otherwise, feel free to close this issue.

Thanks for the help

@rubasace commented on GitHub (Jan 3, 2024): That was actually the case, I removed all the "not" clauses from the Custom Format and it just works. Still weird why the test parsing reports the custom format when I'm pasting the exact same filename. Not sure if that's something you still would like to investigate. Otherwise, feel free to close this issue. Thanks for the help
Author
Owner

@bakerboy448 commented on GitHub (Jan 3, 2024):

Not weird at all. The parser operates off the text. The on disk logic uses scenetitle (original file name) and on disk name.

can't find an existing issue for this, but can you rename it accordingly

@bakerboy448 commented on GitHub (Jan 3, 2024): Not weird at all. The parser operates off the text. The on disk logic uses scenetitle (original file name) and on disk name. can't find an existing issue for this, but can you rename it accordingly
Author
Owner

@glassbase commented on GitHub (Jan 3, 2024):

I am in same boat having Trash Guides CFs. Thought I was going crazy when it was not parsing TrueHD Atmos custom format on movie details page, but test parsing says it has it. Copy and pasting the same filename in test parsing.

@glassbase commented on GitHub (Jan 3, 2024): I am in same boat having Trash Guides CFs. Thought I was going crazy when it was **not** parsing TrueHD Atmos custom format on movie details page, but test parsing says it has it. Copy and pasting the same filename in test parsing.
Author
Owner

@rubasace commented on GitHub (Jan 3, 2024):

@glassbase I've created an issue on Trash Guides to suggest a fix. Please feel free to add any extra information if you believe I'm missing something.

@bakerboy448 Not sure how to rename it. Maybe just rename it as you believe is best or even close it if not relevant.

@rubasace commented on GitHub (Jan 3, 2024): @glassbase I've created an issue on Trash Guides to suggest a fix. Please feel free to add any extra information if you believe I'm missing something. @bakerboy448 Not sure how to rename it. Maybe just rename it as you believe is best or even close it if not relevant.
Author
Owner

@bakerboy448 commented on GitHub (Jan 3, 2024):

Ref https://github.com/Sonarr/Sonarr/issues/5598

Ref https://github.com/Sonarr/Sonarr/pull/5575

@bakerboy448 commented on GitHub (Jan 3, 2024): Ref https://github.com/Sonarr/Sonarr/issues/5598 Ref https://github.com/Sonarr/Sonarr/pull/5575
Author
Owner

@glassbase commented on GitHub (Jan 3, 2024):

I did not realize CF also used the download title. I thought it only used the file name.

My download was Top.Gun.1986.2160p.UHD.BluRay.x265.10bit.HDR.DTS-HD.MA.TrueHD.7.1.Atmos-SWTYBLZ with TrueHD Atmos being the primary audio in the file.

This download does in fact have both TrueHD Atmos and DTS-HD MA.

Trash Guides use of "NOT" caused it to not apply TrueHD Atmos CF as it found DTS in the download file name. And also vice versa, not apply DTS-HD MA because it found TrueHD
TrueHD Atmos

@glassbase commented on GitHub (Jan 3, 2024): I did not realize CF also used the download title. I thought it only used the file name. My download was `Top.Gun.1986.2160p.UHD.BluRay.x265.10bit.HDR.DTS-HD.MA.TrueHD.7.1.Atmos-SWTYBLZ` with TrueHD Atmos being the primary audio in the file. This download does in fact have both TrueHD Atmos and DTS-HD MA. Trash Guides use of "NOT" caused it to not apply `TrueHD Atmos` CF as it found DTS in the download file name. And also vice versa, not apply `DTS-HD MA` because it found TrueHD [TrueHD Atmos](https://trash-guides.info/Radarr/Radarr-collection-of-custom-formats/#truehd-atmos)
Author
Owner

@bakerboy448 commented on GitHub (Jan 3, 2024):

github.com/Radarr/Radarr@74cfc94b4c/src/NzbDrone.Core/CustomFormats/CustomFormatCalculationService.cs (L172-L183) is likely the problematic code.

SceneTitle is only populated if the original pre-import title matches the scene check github.com/Radarr/Radarr@74cfc94b4c/src/NzbDrone.Core/Parser/SceneChecker.cs (L7-L22)

Root cause is poorly named / renamed files that do not accurately reflect the media info of the files.

@bakerboy448 commented on GitHub (Jan 3, 2024): https://github.com/Radarr/Radarr/blob/74cfc94b4ce61e516eaff6b477e7636aa01cee87/src/NzbDrone.Core/CustomFormats/CustomFormatCalculationService.cs#L172-L183 is likely the problematic code. SceneTitle is only populated if the original pre-import title matches the scene check https://github.com/Radarr/Radarr/blob/74cfc94b4ce61e516eaff6b477e7636aa01cee87/src/NzbDrone.Core/Parser/SceneChecker.cs#L7-L22 Root cause is poorly named / renamed files that do not accurately reflect the media info of the files.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Radarr#8130
No description provided.