mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-20 21:17:02 +00:00
Fix episodes are not updated after subtitle action
This commit is contained in:
parent
967795e1a6
commit
1520d6614b
2 changed files with 11 additions and 3 deletions
|
@ -12,8 +12,16 @@ export function useSubtitleAction() {
|
|||
[QueryKeys.Subtitles],
|
||||
(param: Param) => api.subtitles.modify(param.action, param.form),
|
||||
{
|
||||
onSuccess: () => {
|
||||
onSuccess: (_, param) => {
|
||||
client.invalidateQueries([QueryKeys.History]);
|
||||
|
||||
// TODO: Query less
|
||||
const { type, id } = param.form;
|
||||
if (type === "episode") {
|
||||
client.invalidateQueries([QueryKeys.Series, id]);
|
||||
} else {
|
||||
client.invalidateQueries([QueryKeys.Movies, id]);
|
||||
}
|
||||
},
|
||||
}
|
||||
);
|
||||
|
|
4
frontend/src/types/form.d.ts
vendored
4
frontend/src/types/form.d.ts
vendored
|
@ -4,7 +4,7 @@ declare namespace FormType {
|
|||
profileid: (number | null)[];
|
||||
}
|
||||
|
||||
type SeriesAction = OneSerieAction | SearchWantedAction;
|
||||
type SeriesAction = OneSeriesAction | SearchWantedAction;
|
||||
|
||||
type MoviesAction = OneMovieAction | SearchWantedAction;
|
||||
|
||||
|
@ -13,7 +13,7 @@ declare namespace FormType {
|
|||
radarrid: number;
|
||||
}
|
||||
|
||||
interface OneSerieAction {
|
||||
interface OneSeriesAction {
|
||||
action: "search-missing" | "scan-disk";
|
||||
seriesid: number;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue