Sonarr: Option to disable import delay when "Episode has a TBA title and recently aired"

Created on 29 Apr 2019  路  11Comments  路  Source: Sonarr/Sonarr

Describe the problem
Sometimes TVDB has episode titles listed as TBA. Because of this, Sonarr doesn't import the files and instead I have to go in an do it manually. Personally I don't care about episode titles but I do care about having new episodes imported immediately.

Describe any solutions you think might work
Have an option in settings to disable this check.

suboptimal

Most helpful comment

I don't think an option to disable the check should be the solution as per original comment but change logic slightly so that instead of not importing when title is TBA and checking again in 24hrs, we should do import as TBA and then still queue the 24hr check for an updated title and if there is an update, rename already existing file, just like how higher quality downloads are handled and updated silently. This would give us same outcome as existing but also cater for people who want import immediately. Doing the rename would also mean our connections (e.g. kodi) would get the update as well.

All 11 comments

This is happening a lot now with GoT, would be nice to have option to bypass. I noticed the following commit was recently added which added the check of episode name is TBA.

https://github.com/Sonarr/Sonarr/commit/a023732c1c96141baa0e91ad05f91757ee4f23c7

I noticed the code does the following checks, based on series type, would changing the series to daily bypass the check? I'm not sure on what the pattern check is for daily but just making assumption daily episodes don't have titles, thinking of temp solution if option is not added:

var namingConfig = _namingConfigService.GetConfig();
            var pattern = namingConfig.StandardEpisodeFormat;

            if (series.SeriesType == SeriesTypes.Daily)
            {
                pattern = namingConfig.DailyEpisodeFormat;
            }

            if (series.SeriesType == SeriesTypes.Anime && episodes.All(e => e.AbsoluteEpisodeNumber.HasValue))
            {
                pattern = namingConfig.AnimeEpisodeFormat;
            }

I noticed the following commit was recently added which added the check of episode name is TBA.

That's not really recent, it's from January 2018...

would changing the series to daily bypass the check

Only if it doesn't require an episode title in that pattern.

I'm not sure on what the pattern check is for daily but just making assumption daily episodes don't have titles

They absolutely have titles.

That's not really recent, it's from January 2018...

My bad for some reason I was thinking Jan this year.

Only if it doesn't require an episode title in that pattern.

Yeah that is what I was trying to figure out, what is the pattern check for daily? I tried searching code and noticed some defined patterns but it was in regex and I never understand regex patterns. And wasn't even sure if it was correct pattern definition.

Personally I don't care about episode titles

Then don't use them in your rename options in sonarr, and all will be well? 馃槃

The pattern check is the same for everything, if the episode title is in the renaming format (Standard, Daily or Anime) and the title is TBA Sonarr won't import the episode until the title is available or it aired more than 24 hours ago.

I don't think an option to disable the check should be the solution as per original comment but change logic slightly so that instead of not importing when title is TBA and checking again in 24hrs, we should do import as TBA and then still queue the 24hr check for an updated title and if there is an update, rename already existing file, just like how higher quality downloads are handled and updated silently. This would give us same outcome as existing but also cater for people who want import immediately. Doing the rename would also mean our connections (e.g. kodi) would get the update as well.

Renaming on a schedule is a completely different beast. It's not a short term win and has a lot to consider. Overall the change to not import TBA releases hasn't been an issue, since most bigger shows have titles released ahead of the episode airing and are updated on TheTVDB.

This change specifically was to avoid having to rename after import as well.

We're going to add an option to require the episode title (when it's in the renaming format) with 3 options:

  • Always - Same as it is now
  • Bulk Season Releases - Netflix-style releases of full seasons at the same time
  • Never - Disable completely

Thanks very much!

Would it not be much easier to just allow a simple switch in settings to ignore the delay code that was added in January 2018? I would much rather let it import instantly with TBA and run a global rename whenever I want to get the real titles.

A solution until v3.0 is here (which could take, years?):

Create file: refresh.sh
Add it in Sonarr under Settings > Connect > Custom Script
Only check "On Grab"
Add as tag: "refresh".
Edit Game of Thrones or any other show with a similar issue in Sonarr, add "refresh" to tags

refresh.sh (add your API key and also make the file executable with chmod +x refresh.sh):

#!/bin/bash

cd $(dirname "$BASH_SOURCE") #if this doesnt work for you, just use the absolute path

./refresh_bg.sh "$@" >&- 2>&- &

refresh_bg.sh (add your API key and also make the file executable with chmod +x refresh_bg.sh as well as point the URL to your Sonarr instance):

#!/bin/bash

curl 'http://192.168.1.71:8989/api/v3/command' -d "{\"name\":\"RefreshSeries\",\"seriesId\":$sonarr_series_id}" --header "X-Api-Key: YOUR_API_KEY_HERE"

sleep 5m

curl 'http://192.168.1.71:8989/api/v3/command' -d "{\"name\":\"RefreshSeries\",\"seriesId\":$sonarr_series_id}" --header "X-Api-Key: YOUR_API_KEY_HERE"

sleep 20m

curl 'http://192.168.1.71:8989/api/v3/command' -d "{\"name\":\"RefreshSeries\",\"seriesId\":$sonarr_series_id}" --header "X-Api-Key: YOUR_API_KEY_HERE"

sleep 40m

curl 'http://192.168.1.71:8989/api/v3/command' -d "{\"name\":\"RefreshSeries\",\"seriesId\":$sonarr_series_id}" --header "X-Api-Key: YOUR_API_KEY_HERE"

sleep 60m

curl 'http://192.168.1.71:8989/api/v3/command' -d "{\"name\":\"RefreshSeries\",\"seriesId\":$sonarr_series_id}" --header "X-Api-Key: YOUR_API_KEY_HERE"

sleep 120m

curl 'http://192.168.1.71:8989/api/v3/command' -d "{\"name\":\"RefreshSeries\",\"seriesId\":$sonarr_series_id}" --header "X-Api-Key: YOUR_API_KEY_HERE"

sleep 120m

curl 'http://192.168.1.71:8989/api/v3/command' -d "{\"name\":\"RefreshSeries\",\"seriesId\":$sonarr_series_id}" --header "X-Api-Key: YOUR_API_KEY_HERE"

sleep 240m

curl 'http://192.168.1.71:8989/api/v3/command' -d "{\"name\":\"RefreshSeries\",\"seriesId\":$sonarr_series_id}" --header "X-Api-Key: YOUR_API_KEY_HERE"

sleep 480m

curl 'http://192.168.1.71:8989/api/v3/command' -d "{\"name\":\"RefreshSeries\",\"seriesId\":$sonarr_series_id}" --header "X-Api-Key: YOUR_API_KEY_HERE"

If you get error 255 when testing the scripts via Sonarr's test function, then your scripts are not in Unix format. Run sed -i -e 's/\r$//' refresh.sh and sed -i -e 's/\r$//' refresh_bg.sh

Source

In terms of issue linked about Game of Thrones, and solution above, you shouldn't need to do that right since under System > Tasks there is a "Refresh Series" task scheduled for 12 every hours, shouldn't this be doing the title updates?

Or for Game of Thrones is this just a timing issue, in terms GoT release names really late, TVDB takes while to update and thus "Refresh Series" task doesn't update in time. Tbh i've only had this issue for GoT.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markus101 picture markus101  路  4Comments

markus101 picture markus101  路  3Comments

PiscisSwimeatus picture PiscisSwimeatus  路  3Comments

Taloth picture Taloth  路  4Comments

antigravity83 picture antigravity83  路  3Comments