|
|
@ -5,13 +5,11 @@ import {
|
|
|
|
episodeDeleteItems,
|
|
|
|
episodeDeleteItems,
|
|
|
|
episodeUpdateBy,
|
|
|
|
episodeUpdateBy,
|
|
|
|
episodeUpdateById,
|
|
|
|
episodeUpdateById,
|
|
|
|
movieDeleteWantedItems,
|
|
|
|
|
|
|
|
movieUpdateBlacklist,
|
|
|
|
movieUpdateBlacklist,
|
|
|
|
movieUpdateHistoryList,
|
|
|
|
movieUpdateHistoryList,
|
|
|
|
movieUpdateList,
|
|
|
|
movieUpdateList,
|
|
|
|
movieUpdateWantedList,
|
|
|
|
movieUpdateWantedList,
|
|
|
|
providerUpdateList,
|
|
|
|
providerUpdateList,
|
|
|
|
seriesDeleteWantedItems,
|
|
|
|
|
|
|
|
seriesUpdateBlacklist,
|
|
|
|
seriesUpdateBlacklist,
|
|
|
|
seriesUpdateHistoryList,
|
|
|
|
seriesUpdateHistoryList,
|
|
|
|
seriesUpdateList,
|
|
|
|
seriesUpdateList,
|
|
|
@ -324,18 +322,6 @@ export function useWantedSeries() {
|
|
|
|
const update = useReduxAction(seriesUpdateWantedList);
|
|
|
|
const update = useReduxAction(seriesUpdateWantedList);
|
|
|
|
const items = useReduxStore((d) => d.series.wantedEpisodesList);
|
|
|
|
const items = useReduxStore((d) => d.series.wantedEpisodesList);
|
|
|
|
|
|
|
|
|
|
|
|
const updateAction = useWrapToOptionalId(update);
|
|
|
|
|
|
|
|
const deleteAction = useReduxAction(seriesDeleteWantedItems);
|
|
|
|
|
|
|
|
const reducer = useMemo<SocketIO.Reducer>(
|
|
|
|
|
|
|
|
() => ({
|
|
|
|
|
|
|
|
key: "episode-wanted",
|
|
|
|
|
|
|
|
update: updateAction,
|
|
|
|
|
|
|
|
delete: deleteAction,
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
[updateAction, deleteAction]
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
useSocketIOReducer(reducer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return stateBuilder(items, update);
|
|
|
|
return stateBuilder(items, update);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -343,18 +329,6 @@ export function useWantedMovies() {
|
|
|
|
const update = useReduxAction(movieUpdateWantedList);
|
|
|
|
const update = useReduxAction(movieUpdateWantedList);
|
|
|
|
const items = useReduxStore((d) => d.movie.wantedMovieList);
|
|
|
|
const items = useReduxStore((d) => d.movie.wantedMovieList);
|
|
|
|
|
|
|
|
|
|
|
|
const updateAction = useWrapToOptionalId(update);
|
|
|
|
|
|
|
|
const deleteAction = useReduxAction(movieDeleteWantedItems);
|
|
|
|
|
|
|
|
const reducer = useMemo<SocketIO.Reducer>(
|
|
|
|
|
|
|
|
() => ({
|
|
|
|
|
|
|
|
key: "movie-wanted",
|
|
|
|
|
|
|
|
update: updateAction,
|
|
|
|
|
|
|
|
delete: deleteAction,
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
[updateAction, deleteAction]
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
useSocketIOReducer(reducer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return stateBuilder(items, update);
|
|
|
|
return stateBuilder(items, update);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|