Sonarr / Sonarr

Smart PVR for newsgroup and bittorrent users.
https://sonarr.tv
GNU General Public License v3.0
10.61k stars 1.34k forks source link

Custom Formats Original Language Negate False Matches #5240

Closed bakerboy448 closed 1 year ago

bakerboy448 commented 1 year ago

Is there an existing issue for this?

Current Behavior

Given a custom format of

{
  "name": "Not Original",
  "includeCustomFormatWhenRenaming": false,
  "specifications": [
    {
      "name": "Not Original",
      "implementation": "LanguageSpecification",
      "negate": true,
      "required": false,
      "fields": {
        "value": -2
      }
    }
  ]
}

given the fallback logic of Sonarr assumes the series original language is English.

An episode that is English via name (unspecified - fallback to original) or the file has audio of english and the series original language is English.

The custom format incorrectly matches on grab, on delete, and on import (history). But correctly does not match once the file is imported.

Expected Behavior

Negated Original Language should function as designed and only match files/releases if the release/file is NOT the original series language.

Steps To Reproduce

N/A - Custom Formats are live/dynamic

Environment

- OS: agnostic
- Sonarr: 4.0.0.178
- Docker Install: agnostic
- Using Reverse Proxy: agnostic
- Browser: agnostic

What branch are you running?

develop (v4)

Trace Logs?

release: The.Kardashians.S02E10.720p.DSNP.WEB-DL.DDP5.1.H.264-NTb

https://gist.github.com/bakerboy448/c2a01dc0f47da26e69303057f0374fea

Anything else?

image

import entry details

Name
The.Kardashians.S02E10.Heres.to.Paris.720p.DSNP.WEB-DL.DDP5.1.H.264-NTb
Source
/data/media/torrents/tv/The.Kardashians.S02E10.Heres.to.Paris.720p.DSNP.WEB-DL.DDP5.1.H.264-NTb.mkv
Imported To
/data/media/media/tv/The Kardashians (2022) {imdb-tt15791630}/Season 02/The Kardashians (2022) - S02E10 - Here’s to Paris [DSNP WEBDL-720p][EAC3 5.1][h264]-NTb.mkv

grab entry details

Name
The.Kardashians.S02E10.Heres.to.Paris.720p.DSNP.WEB-DL.DDP5.1.H.264-NTb
Indexer
btn
Release Group
NTb
Custom Format Score
+1965
Series Match Type
Title
Download Client
Qbit
Age (when grabbed)
0 minutes
Published Date
2022-11-24 16:52:27

On Disk File is OK

image

bakerboy448 commented 1 year ago

on search appears to be fine; seems possibly isolated to history

image

markus101 commented 1 year ago

Providing trace logs is not optional, please post trace logs and link them here. They will allow us to see this that may not be represented in the UI.

bakerboy448 commented 1 year ago

OP Edited with trace logs of the search, grab, download tracking, import & delete.

image

unrelated note - episode title appears to possibly be oddly formatted for custom scripts 2022-11-25 21:03:41.6|Trace|ProcessProvider|Setting environment variable 'sonarr_episodefile_episodetitles' to 'Here’s to Paris' for Here’s to Paris


Edit:

Confirmed this NOT an issue downstream in Radarr. image

{
  "name": "Not Original",
  "includeCustomFormatWhenRenaming": false,
  "specifications": [
    {
      "name": "Not Original",
      "implementation": "LanguageSpecification",
      "negate": true,
      "required": false,
      "fields": {
        "value": -2
      }
    }
  ]
}