Quality Size Doubled

Sonarr version (exact version): 2.0.0.5344
Mono version (if Sonarr is not running on Windows): 5.20.1.34
OS: Xpenology DSM 6.2-23739
Debug logs:
Description of issue:

When searching for the last episode of a season, manually or automatically, the quality size limit is doubled. This results in getting a 3.8GB file for a 45min episode, even when the limit is 2GB for 60min. I have tried adjusting the maximum file size setting, it adjusts but is still doubled for the last episode of each season.

Debug Log: https://drive.google.com/file/d/1fEFhJUBh91mQD8hmPLIu6plO233gcF5R/view?usp=sharing

My current Quality settings:
Annotation 2020-05-02 190011

First and last episodes in a season are allowed to be double the size, since plenty of shows have longer season openings/finales or a kind of double episode.

I understand that episodes can be longer in length. But doesn’t Sonarr use the length of the episode and proportionately scale the allowable size based on that?

Even though TVDB has finally added this, it’s not something they expose in the UI, Sonarr still relies on the runtime of the series.

What do you mean “Run time of the series”?
Below is an example that Sonarr is using the runtime of the episode:
Rejected
Also the log file I included in my first post includes the runtime of the episode. So Sonarr is definitely pulling that information from TheTVDB and using it.

PS: That 45min changes based on the show and episode and matches what TheTVDB lists.

It’s from the series, just because most episodes happen to be that length doesn’t mean it’s using the runtime of the episode; that’s not exposed anywhere for Sonarr to use it.

How do you figure that the episode runtime is not exposed to Sonarr? The correcct runtime is listed in the log file. Sonarr isn’t just making up a number. Below are two episodes from two different shows.

First is an episode at the end of the season where the “double size bug” has happened.
Sonarr giving me a rejection stating the size is larger than the 3.1gb (for 45min):
Rejected
Listing from TheTVDB for the exat episode. Please note the runtime is listed:

Second show I picked an episode that is NOT at the end of the season so this “bug” has not happened.
Sonarr rejecting because the size is larger than 2gb (for 60min):

Again the listing from TheTVDB showing this episodes runtime, matching what Sonarr says:

Here’s the entire XML dump from TheTVDB response that Skyhook (Sonarr’s TVDB proxy) would fetch:

And here is the JSON response that Skyhook sends to Sonarr:

In both you’ll note there is a runtime on the series, not the episode.

Then here is the code that reads the runtime from Skyhook’s response and sets it on the series which Sonarr will store in it’s database:

https://github.com/Sonarr/Sonarr/blob/phantom-develop/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs#L163-L166

And again, just before it’s saved to the DB:

https://github.com/Sonarr/Sonarr/blob/phantom-develop/src/NzbDrone.Core/Tv/RefreshSeriesService.cs#L92

Is that enough figuring?

If not, how do you figure it is stored per episode? Because the same number exists on TheTVDB and in Sonarr for the search rejection?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.