Quality is not reading correctly when adding existing series

I am testing out Sonarr (currently using SickRage). I am adding a new series from disk and of course the quality of the episodes is an issue. I used SR to rename the files, adding the quality at the end. However, when I add the series to Sonarr is misinterprets HDTV for SDTV for some reason. Most all the episodes are HDTV, but a few of them are WEBDL-720P and those are actually reading fine. Here’s an example of both:

“Parks and Recreation - S01E02 - Canvassing - 720p WEB-DL.mkv” correctly sets the quality to “WEBDL-720P”
“Parks and Recreation - S07E02 - Ron and Jammy - HDTV.mkv” incorrectly sets the quality to “SDTV”

Any idea why this is happening?

Thanks.

My experience has been that HDTV also needs 720p or 1080p at the end. Often times releases that are just listed as HDTV are 480p HDTV rips, and really just SDTV.

Sonarr doesn’t have a plain HDTV quality.

I just now noticed that the quality in Sonarr is that way…so I figured that might be the case.

That pretty much makes the upgrade from SickRage a no go. SickRage does not have an option to output it like HDTV-720p that I can find…and many of the thousands of episodes are HDTV so fixing them one by one is out.

Any ideas on how to proceed?

As a follow up. Even though Sonarr does not have the HDTV setting…I would think that is would fall back to the extension and pick HDTV-720p based on .mkv and not pick SDTV. I could deal with that, since all of my episodes that say HDTV are .mkv files and they are 720p.

Thanks.

This might be helpful? I’m sorry I moved from SickBeard, and not SickRage.

Also, there are many groups that release SDTV in .mkv as well.

Thanks for the link. It is basically the problem for sure…SR only has HDTV and does not differentiate between 720p and 1080p I guess.

Still though…seems like if Sonarr does not recognize it, it should fall back to the extension…not just assume SDTV.

Thanks.

I think it’s in the works: https://github.com/Sonarr/Sonarr/issues/448

Sounds like maybe…but not sure it is getting a steam from the sounds of it. It did give me an idea though, if Mediainfo is being used to set quality perhaps I can import into Sonarr…rename then files, remove it from Sonarr and then import again. It will take a long time and screwing around though! :slight_smile:

EDIT - Nope that doesn’t work. Mediainfo is not the quality name.

The issue is release names that contain HDTV without 720p/1080p are considered 480p. If Sonarr didn’t detect the quality in the filename it would fallback to the extension, which would be HDTV-720p for .mkv.

Once files are imported you can alter the detected quality type at the series and season level (from the series details page).

That’s a real bummer…not sure why HDTV means 480p, seems kind of odd. Is there a Scene rule book somewhere that I could read that explains filename structure? :smile: Actually, it would be good to read if there is…if I have to rename all my files I might as well do it once and get it right.

HDTV is being treated as the source, not the resolution. There really isn’t a document of rules to determine how Sonarr parses quality, but I will point you at the tests we use to ensure Sonarr is behaving as we expect:

The TestCase lines are the input and all the tests are executed against a method that is named similar to this: should_parse_sdtv_quality, so in all the test cases above that method it will expect the result to be SDTV.

For HDTV 720 there is a test for [HDTV] that passes as that was the naming style in version 1 of Sonarr (NzbDrone), we kept that there to ensure it would continue to match, but made it strict (it must be in square brackets).

I’m a bit confused…if HDTV is being treated as the source, then there wouldn’t be a quality parsed and therefore it would revert to the extension, which is MKV and so it should set the quality to HDTV720p right? Unless I am missing something…

I meant in the release names its the source, if HDTV on its own wasn’t treated as SDTV all those releases would have an unknown quality.

Wouldn’t enabling Analyse Video Files result in the treatment ulrick65 wants?

HDTV in name and MediaInfo 1080p -> HDTV1080p
HDTV in name and MediaInfo 720p -> HDTV720p
HDTV in name and MediaInfo other quality -> SDTV

No, that isn’t currently used to determine the quality when importing.

OK. I also saw it was already in a github discussion. https://github.com/Sonarr/Sonarr/issues/448 to utilize the mediainfo directly in the parser. But what if you are also renaming the files?

At what time is the quality parsed?

  1. File is downloaded
  2. Quality is determined
  3. File is renamed and quality is added to name by “Analyse video files”

or

  1. File is downloaded
  2. File is renamed and quality is added to name by “Analyse video files”
  3. Quality is determined

Because in scenario 2 I would expect the parser to detect the MediaInfo information that was added to the filename.

Its more of case one, but “Analyse video files” is only used to get metadata information (audio/video codecs, subtitles), quality is decided when the file is first parsed.

I am confused with this markus…can you explain in a little detail please?

My thought is:

The file is named “Parks and Recreation - S01E01 - Make My Pit a Park - HDTV.mkv”

When I import it, it gets the quality of SDTV. If Sonarr is treating HDTV as the source then it should revert to the .mkv extension and set the quality to HDTV720p, which would be perfect.

What am I missing here?

Thanks.

Hi, that post on reddit was actually mine and the ability to customize quality naming was one of the reasons I switched to Sonarr. The problem with both SickRage and Sonarr is that they try to assign video quality based on the HDTV tag - which however doesn’t refer to quality but video source. IMO it’d be best to replace the [quality] tag in naming settings with [source] and [resolution].

Anyway, to help with your transition, here’s what I did. If you are absolutely certain that all you Parks and Rec in in 720p, just add it to SickRage naming pattern and force rename it. Someting like this “%S.N.S%0SE%0E.%E.N.%Q.N.720p” should force SickRage to add 720p to the ending of all your Parks and Rec (an whatever other show you choose to rename). Sonarr will then correctly recognize it as 720p HDTV and catalog/rename it according to your settings.

Thanks for the reply. All the episodes are not HDTV720p, some are WEBDL720p. Other shows vary greatly.

You mean creating custom quality settings for new episodes added or ? I don’t think the parser can add an already downloaded file to the database and set a custum quality for it based on what is parsed…unless I am mistaken?

Thanks.