mirror of
https://github.com/Radarr/Radarr
synced 2025-02-24 15:21:28 +00:00
Fixed: Status on search showing queue status instead of missing (#5854)
Fix status on search to show a downloading status when it is in queue Fix for monitor not being set to true when adding from search
This commit is contained in:
parent
a0d2af54e8
commit
6d7fb3de25
2 changed files with 10 additions and 3 deletions
|
@ -11,9 +11,9 @@ function createMapStateToProps() {
|
|||
createExclusionMovieSelector(),
|
||||
createDimensionsSelector(),
|
||||
(state) => state.queue.details.items,
|
||||
(state) => state.tmdbId,
|
||||
(isExistingMovie, isExclusionMovie, dimensions, queueItems, tmdbId) => {
|
||||
const firstQueueItem = queueItems.find((q) => q.tmdbId === tmdbId);
|
||||
(state, { internalId }) => internalId,
|
||||
(isExistingMovie, isExclusionMovie, dimensions, queueItems, internalId) => {
|
||||
const firstQueueItem = queueItems.find((q) => q.movieId === internalId && internalId > 0);
|
||||
|
||||
return {
|
||||
isExistingMovie,
|
||||
|
|
|
@ -88,6 +88,8 @@ export const actionHandlers = handleThunks({
|
|||
abortCurrentRequest = abortRequest;
|
||||
|
||||
request.done((data) => {
|
||||
data = data.map((movie) => ({ ...movie, internalId: movie.id, id: movie.tmdbId }));
|
||||
|
||||
dispatch(batchActions([
|
||||
update({ section, data }),
|
||||
|
||||
|
@ -116,6 +118,7 @@ export const actionHandlers = handleThunks({
|
|||
const tmdbId = payload.tmdbId;
|
||||
const items = getState().addMovie.items;
|
||||
const newMovie = getNewMovie(_.cloneDeep(_.find(items, { tmdbId })), payload);
|
||||
newMovie.id = 0;
|
||||
|
||||
const promise = createAjaxRequest({
|
||||
url: '/movie',
|
||||
|
@ -125,8 +128,12 @@ export const actionHandlers = handleThunks({
|
|||
}).request;
|
||||
|
||||
promise.done((data) => {
|
||||
const updatedItem = _.cloneDeep(data);
|
||||
updatedItem.id = updatedItem.tmdbId;
|
||||
|
||||
dispatch(batchActions([
|
||||
updateItem({ section: 'movies', ...data }),
|
||||
updateItem({ section: 'addMovie', ...updatedItem }),
|
||||
|
||||
set({
|
||||
section,
|
||||
|
|
Loading…
Reference in a new issue