Added exclusion settings for season 0 to prevent automatic downloading of extras subtitles.

This commit is contained in:
morpheus65535 2021-12-26 13:52:30 -05:00
parent 896239b34c
commit bd7b2eb471
3 changed files with 19 additions and 4 deletions

View File

@ -94,7 +94,8 @@ defaults = {
'episodes_sync': '60',
'excluded_tags': '[]',
'excluded_series_types': '[]',
'use_ffprobe_cache': 'True'
'use_ffprobe_cache': 'True',
'exclude_season_zero': 'False'
},
'radarr': {
'ip': '127.0.0.1',
@ -395,12 +396,12 @@ def save_settings(settings_items):
configure_proxy = True
if key in ['settings-sonarr-excluded_tags', 'settings-sonarr-only_monitored',
'settings-sonarr-excluded_series_types', 'settings.radarr.excluded_tags',
'settings-radarr-only_monitored']:
'settings-sonarr-excluded_series_types', 'settings-sonarr-exclude_season_zero',
'settings.radarr.excluded_tags', 'settings-radarr-only_monitored']:
exclusion_updated = True
if key in ['settings-sonarr-excluded_tags', 'settings-sonarr-only_monitored',
'settings-sonarr-excluded_series_types']:
'settings-sonarr-excluded_series_types', 'settings-sonarr-exclude_season_zero']:
sonarr_exclusion_updated = True
if key in ['settings.radarr.excluded_tags', 'settings-radarr-only_monitored']:

View File

@ -390,6 +390,10 @@ def get_exclusion_clause(exclusion_type):
for item in typesList:
where_clause.append((TableShows.seriesType != item))
exclude_season_zero = settings.sonarr.getboolean('exclude_season_zero')
if exclude_season_zero:
where_clause.append((TableEpisodes.season != 0))
return where_clause

View File

@ -97,6 +97,16 @@ const SettingsSonarrView: FunctionComponent<Props> = () => {
episodes in Sonarr.
</Message>
</Input>
<Input>
<Check
label="Exclude season zero (extras)"
settingKey="settings-sonarr-exclude_season_zero"
></Check>
<Message>
Episodes from season zero (extras) from automatic download of
subtitles.
</Message>
</Input>
</Group>
<Group header="Path Mappings">
<PathMappingTable type="sonarr"></PathMappingTable>