You've already forked Sonarr
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:
@@ -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, {
|
||||
|
@@ -92,7 +92,7 @@ function SeriesIndexOverview(props: SeriesIndexOverviewProps) {
|
||||
dispatch(
|
||||
executeCommand({
|
||||
name: REFRESH_SERIES,
|
||||
seriesId,
|
||||
seriesIds: [seriesId],
|
||||
})
|
||||
);
|
||||
}, [seriesId, dispatch]);
|
||||
|
@@ -83,7 +83,7 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) {
|
||||
dispatch(
|
||||
executeCommand({
|
||||
name: REFRESH_SERIES,
|
||||
seriesId,
|
||||
seriesIds: [seriesId],
|
||||
})
|
||||
);
|
||||
}, [seriesId, dispatch]);
|
||||
|
@@ -97,7 +97,7 @@ function SeriesIndexRow(props: SeriesIndexRowProps) {
|
||||
dispatch(
|
||||
executeCommand({
|
||||
name: REFRESH_SERIES,
|
||||
seriesId,
|
||||
seriesIds: [seriesId],
|
||||
})
|
||||
);
|
||||
}, [seriesId, dispatch]);
|
||||
|
@@ -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)
|
||||
);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user