mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-08 23:18:31 +01:00
fix: fixing seerr intergration
added an alert if seerr if configured via settings, but not authed Added an alert if the auth for seerr expires it should fire cleaned up a little Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
This commit is contained in:
@@ -247,12 +247,6 @@ export const JellyfinProvider: React.FC<{ children: ReactNode }> = ({
|
||||
}
|
||||
}, [api, secret, headers, jellyfin]);
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
await refreshStreamyfinPluginSettings();
|
||||
})();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
store.set(apiAtom, api);
|
||||
}, [api]);
|
||||
@@ -553,7 +547,20 @@ export const JellyfinProvider: React.FC<{ children: ReactNode }> = ({
|
||||
);
|
||||
|
||||
// Refresh plugin settings
|
||||
await refreshStreamyfinPluginSettings();
|
||||
const recentPluginSettings = await refreshStreamyfinPluginSettings();
|
||||
if (recentPluginSettings?.jellyseerrServerUrl?.value) {
|
||||
const jellyseerrApi = new JellyseerrApi(
|
||||
recentPluginSettings.jellyseerrServerUrl.value,
|
||||
);
|
||||
await jellyseerrApi.test().then((result) => {
|
||||
if (result.isValid && result.requiresPass) {
|
||||
jellyseerrApi
|
||||
.login(username, password)
|
||||
.then(setJellyseerrUser)
|
||||
.catch(console.error);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
onError: (error) => {
|
||||
|
||||
Reference in New Issue
Block a user