mirror of
https://github.com/sct/overseerr.git
synced 2025-09-30 05:54:03 +02:00
fix(plex): sync libraries after saving settings (#1592)
This commit is contained in:
@@ -311,7 +311,8 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
|||||||
webAppUrl: values.webAppUrl,
|
webAppUrl: values.webAppUrl,
|
||||||
} as PlexSettings);
|
} as PlexSettings);
|
||||||
|
|
||||||
revalidate();
|
syncLibraries();
|
||||||
|
|
||||||
if (toastId) {
|
if (toastId) {
|
||||||
removeToast(toastId);
|
removeToast(toastId);
|
||||||
}
|
}
|
||||||
@@ -319,6 +320,7 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
|||||||
autoDismiss: true,
|
autoDismiss: true,
|
||||||
appearance: 'success',
|
appearance: 'success',
|
||||||
});
|
});
|
||||||
|
|
||||||
if (onComplete) {
|
if (onComplete) {
|
||||||
onComplete();
|
onComplete();
|
||||||
}
|
}
|
||||||
@@ -339,7 +341,6 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
|||||||
values,
|
values,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
setFieldValue,
|
setFieldValue,
|
||||||
setFieldTouched,
|
|
||||||
isSubmitting,
|
isSubmitting,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
@@ -359,14 +360,12 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
|||||||
onChange={async (e) => {
|
onChange={async (e) => {
|
||||||
const targPreset =
|
const targPreset =
|
||||||
availablePresets[Number(e.target.value)];
|
availablePresets[Number(e.target.value)];
|
||||||
|
|
||||||
if (targPreset) {
|
if (targPreset) {
|
||||||
setFieldValue('hostname', targPreset.address);
|
setFieldValue('hostname', targPreset.address);
|
||||||
setFieldValue('port', targPreset.port);
|
setFieldValue('port', targPreset.port);
|
||||||
setFieldValue('useSsl', targPreset.ssl);
|
setFieldValue('useSsl', targPreset.ssl);
|
||||||
}
|
}
|
||||||
setFieldTouched('hostname');
|
|
||||||
setFieldTouched('port');
|
|
||||||
setFieldTouched('useSsl');
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<option value="manual">
|
<option value="manual">
|
||||||
|
Reference in New Issue
Block a user