@ -62,6 +62,9 @@ const messages = defineMessages({
syncEnabled : 'Enable Scan' ,
syncEnabled : 'Enable Scan' ,
externalUrl : 'External URL' ,
externalUrl : 'External URL' ,
enableSearch : 'Enable Automatic Search' ,
enableSearch : 'Enable Automatic Search' ,
tagRequests : 'Tag Requests' ,
tagRequestsInfo :
"Automatically add an additional tag with the requester's user ID & display name" ,
validationApplicationUrl : 'You must provide a valid URL' ,
validationApplicationUrl : 'You must provide a valid URL' ,
validationApplicationUrlTrailingSlash : 'URL must not end in a trailing slash' ,
validationApplicationUrlTrailingSlash : 'URL must not end in a trailing slash' ,
validationBaseUrlLeadingSlash : 'Base URL must have a leading slash' ,
validationBaseUrlLeadingSlash : 'Base URL must have a leading slash' ,
@ -252,6 +255,7 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
externalUrl : sonarr?.externalUrl ,
externalUrl : sonarr?.externalUrl ,
syncEnabled : sonarr?.syncEnabled ? ? false ,
syncEnabled : sonarr?.syncEnabled ? ? false ,
enableSearch : ! sonarr ? . preventSearch ,
enableSearch : ! sonarr ? . preventSearch ,
tagRequests : sonarr?.tagRequests ? ? false ,
} }
} }
validationSchema = { SonarrSettingsSchema }
validationSchema = { SonarrSettingsSchema }
onSubmit = { async ( values ) = > {
onSubmit = { async ( values ) = > {
@ -292,6 +296,7 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
externalUrl : values.externalUrl ,
externalUrl : values.externalUrl ,
syncEnabled : values.syncEnabled ,
syncEnabled : values.syncEnabled ,
preventSearch : ! values . enableSearch ,
preventSearch : ! values . enableSearch ,
tagRequests : values.tagRequests ,
} ;
} ;
if ( ! sonarr ) {
if ( ! sonarr ) {
await axios . post ( '/api/v1/settings/sonarr' , submission ) ;
await axios . post ( '/api/v1/settings/sonarr' , submission ) ;
@ -960,6 +965,21 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
/ >
/ >
< / div >
< / div >
< / div >
< / div >
< div className = "form-row" >
< label htmlFor = "tagRequests" className = "checkbox-label" >
{ intl . formatMessage ( messages . tagRequests ) }
< span className = "label-tip" >
{ intl . formatMessage ( messages . tagRequestsInfo ) }
< / span >
< / label >
< div className = "form-input-area" >
< Field
type = "checkbox"
id = "tagRequests"
name = "tagRequests"
/ >
< / div >
< / div >
< / div >
< / div >
< / Modal >
< / Modal >
) ;
) ;