1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-09-16 09:26:36 +02:00

Fixed: UI does not always reflect series being refreshed

This commit is contained in:
Mark McDowall
2025-03-08 13:07:03 -08:00
parent 6f451b2206
commit 8acd154206
5 changed files with 15 additions and 12 deletions

View File

@@ -191,19 +191,21 @@ function SeriesDetails({ seriesId }: SeriesDetailsProps) {
const isSaving = useSelector((state: AppState) => state.series.isSaving);
const { isRefreshing, isRenaming, isSearching } = useMemo(() => {
const isSeriesRefreshing = isCommandExecuting(
findCommand(commands, {
name: commandNames.REFRESH_SERIES,
seriesId,
})
);
const seriesRefreshingCommand = findCommand(commands, {
name: commandNames.REFRESH_SERIES,
});
const isSeriesRefreshingCommandExecuting = isCommandExecuting(
seriesRefreshingCommand
);
const allSeriesRefreshing =
isCommandExecuting(seriesRefreshingCommand) &&
!seriesRefreshingCommand?.body.seriesId;
isSeriesRefreshingCommandExecuting &&
!seriesRefreshingCommand?.body.seriesIds?.length;
const isSeriesRefreshing =
isSeriesRefreshingCommandExecuting &&
seriesRefreshingCommand?.body.seriesIds?.includes(seriesId);
const isSearchingExecuting = isCommandExecuting(
findCommand(commands, {

View File

@@ -92,7 +92,7 @@ function SeriesIndexOverview(props: SeriesIndexOverviewProps) {
dispatch(
executeCommand({
name: REFRESH_SERIES,
seriesId,
seriesIds: [seriesId],
})
);
}, [seriesId, dispatch]);

View File

@@ -83,7 +83,7 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) {
dispatch(
executeCommand({
name: REFRESH_SERIES,
seriesId,
seriesIds: [seriesId],
})
);
}, [seriesId, dispatch]);

View File

@@ -97,7 +97,7 @@ function SeriesIndexRow(props: SeriesIndexRowProps) {
dispatch(
executeCommand({
name: REFRESH_SERIES,
seriesId,
seriesIds: [seriesId],
})
);
}, [seriesId, dispatch]);

View File

@@ -15,7 +15,8 @@ function createSeriesIndexItemSelector(seriesId: number) {
(series: Series, qualityProfile, executingCommands: Command[]) => {
const isRefreshingSeries = executingCommands.some((command) => {
return (
command.name === REFRESH_SERIES && command.body.seriesId === seriesId
command.name === REFRESH_SERIES &&
command.body.seriesIds?.includes(series.id)
);
});