diff --git a/server/api/servarr/sonarr.ts b/server/api/servarr/sonarr.ts index 01b429ba..76f1416d 100644 --- a/server/api/servarr/sonarr.ts +++ b/server/api/servarr/sonarr.ts @@ -49,6 +49,7 @@ export interface SonarrSeries { languageProfileId: number; seasonFolder: boolean; monitored: boolean; + monitorNewItems: 'all' | 'none'; useSceneNumbering: boolean; runtime: number; tvdbId: number; @@ -98,6 +99,7 @@ export interface AddSeriesOptions { tags?: number[]; seriesType: SonarrSeries['seriesType']; monitored?: boolean; + monitorNewItems?: SonarrSeries['monitorNewItems']; searchNow?: boolean; } @@ -269,6 +271,7 @@ class SonarrAPI extends ServarrBase<{ tags: options.tags, seasonFolder: options.seasonFolder, monitored: options.monitored, + monitorNewItems: options.monitorNewItems, rootFolderPath: options.rootFolderPath, seriesType: options.seriesType, addOptions: { diff --git a/server/lib/settings/index.ts b/server/lib/settings/index.ts index 1e659cd2..670d36b2 100644 --- a/server/lib/settings/index.ts +++ b/server/lib/settings/index.ts @@ -93,6 +93,7 @@ export interface SonarrSettings extends DVRSettings { activeLanguageProfileId?: number; animeTags?: number[]; enableSeasonFolders: boolean; + monitorNewItems: 'all' | 'none'; } interface Quota { diff --git a/server/subscriber/MediaRequestSubscriber.ts b/server/subscriber/MediaRequestSubscriber.ts index c54ee339..b0744227 100644 --- a/server/subscriber/MediaRequestSubscriber.ts +++ b/server/subscriber/MediaRequestSubscriber.ts @@ -693,6 +693,7 @@ export class MediaRequestSubscriber implements EntitySubscriberInterface { syncEnabled: sonarr?.syncEnabled ?? false, enableSearch: !sonarr?.preventSearch, tagRequests: sonarr?.tagRequests ?? false, + monitorNewItems: sonarr?.monitorNewItems ?? 'all', }} validationSchema={SonarrSettingsSchema} onSubmit={async (values) => { @@ -290,6 +292,7 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => { syncEnabled: values.syncEnabled, preventSearch: !values.enableSearch, tagRequests: values.tagRequests, + monitorNewItems: values.monitorNewItems, }; if (!sonarr) { await axios.post('/api/v1/settings/sonarr', submission); @@ -972,6 +975,27 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => { /> +
+ +
+
+ + + + +
+
+ {errors.monitorNewItems && touched.monitorNewItems && ( +
{errors.monitorNewItems}
+ )} +