feat: select default seriesType for anime (#3627)

* feat: select default seriesType for anime

Added flexibility to set default anime series type in service settings. Now you can choose
'standard' for anime if you prefer it, making it easier to use features like searching for season
packs on Sonarr.

fix #3626

* feat: extracted translations
pull/3628/head
Fallenbagel 1 year ago committed by GitHub
parent 92507359b4
commit f6286359cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -984,7 +984,7 @@ export class MediaRequest {
(keyword) => keyword.id === ANIME_KEYWORD_ID
)
) {
seriesType = 'anime';
seriesType = sonarrSettings.seriesType;
}
let rootFolder =

@ -69,6 +69,7 @@ export interface RadarrSettings extends DVRSettings {
}
export interface SonarrSettings extends DVRSettings {
seriesType: 'standard' | 'daily' | 'anime';
activeAnimeProfileId?: number;
activeAnimeProfileName?: string;
activeAnimeDirectory?: string;

@ -43,6 +43,7 @@ const messages = defineMessages({
qualityprofile: 'Quality Profile',
languageprofile: 'Language Profile',
rootfolder: 'Root Folder',
seriesType: 'Anime Series Type',
animequalityprofile: 'Anime Quality Profile',
animelanguageprofile: 'Anime Language Profile',
animerootfolder: 'Anime Root Folder',
@ -244,6 +245,7 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
activeProfileId: sonarr?.activeProfileId,
activeLanguageProfileId: sonarr?.activeLanguageProfileId,
rootFolder: sonarr?.activeDirectory,
seriesType: sonarr?.seriesType,
activeAnimeProfileId: sonarr?.activeAnimeProfileId,
activeAnimeLanguageProfileId: sonarr?.activeAnimeLanguageProfileId,
activeAnimeRootFolder: sonarr?.activeAnimeDirectory,
@ -280,6 +282,7 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
: undefined,
activeProfileName: profileName,
activeDirectory: values.rootFolder,
seriesType: values.seriesType,
activeAnimeProfileId: values.activeAnimeProfileId
? Number(values.activeAnimeProfileId)
: undefined,
@ -723,6 +726,27 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
/>
</div>
</div>
<div className="form-row">
<label htmlFor="seriesType" className="text-label">
{intl.formatMessage(messages.seriesType)}
</label>
<div className="form-input-area">
<div className="form-input-field">
<Field
as="select"
id="seriesType"
name="seriesType"
disabled={!isValidated || isTesting}
>
<option value="standard">Standard</option>
<option value="anime">Anime</option>
</Field>
</div>
</div>
{errors.seriesType && touched.seriesType && (
<div className="error">{errors.seriesType}</div>
)}
</div>
<div className="form-row">
<label htmlFor="activeAnimeProfileId" className="text-label">
{intl.formatMessage(messages.animequalityprofile)}

@ -860,6 +860,7 @@
"components.Settings.SonarrModal.selectQualityProfile": "Select quality profile",
"components.Settings.SonarrModal.selectRootFolder": "Select root folder",
"components.Settings.SonarrModal.selecttags": "Select tags",
"components.Settings.SonarrModal.seriesType": "Anime Series Type",
"components.Settings.SonarrModal.server4k": "4K Server",
"components.Settings.SonarrModal.servername": "Server Name",
"components.Settings.SonarrModal.ssl": "Use SSL",

Loading…
Cancel
Save