mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02: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
@ -11,9 +11,9 @@ function createMapStateToProps() {
|
|||||||
createExclusionMovieSelector(),
|
createExclusionMovieSelector(),
|
||||||
createDimensionsSelector(),
|
createDimensionsSelector(),
|
||||||
(state) => state.queue.details.items,
|
(state) => state.queue.details.items,
|
||||||
(state) => state.tmdbId,
|
(state, { internalId }) => internalId,
|
||||||
(isExistingMovie, isExclusionMovie, dimensions, queueItems, tmdbId) => {
|
(isExistingMovie, isExclusionMovie, dimensions, queueItems, internalId) => {
|
||||||
const firstQueueItem = queueItems.find((q) => q.tmdbId === tmdbId);
|
const firstQueueItem = queueItems.find((q) => q.movieId === internalId && internalId > 0);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isExistingMovie,
|
isExistingMovie,
|
||||||
|
@ -88,6 +88,8 @@ export const actionHandlers = handleThunks({
|
|||||||
abortCurrentRequest = abortRequest;
|
abortCurrentRequest = abortRequest;
|
||||||
|
|
||||||
request.done((data) => {
|
request.done((data) => {
|
||||||
|
data = data.map((movie) => ({ ...movie, internalId: movie.id, id: movie.tmdbId }));
|
||||||
|
|
||||||
dispatch(batchActions([
|
dispatch(batchActions([
|
||||||
update({ section, data }),
|
update({ section, data }),
|
||||||
|
|
||||||
@ -116,6 +118,7 @@ export const actionHandlers = handleThunks({
|
|||||||
const tmdbId = payload.tmdbId;
|
const tmdbId = payload.tmdbId;
|
||||||
const items = getState().addMovie.items;
|
const items = getState().addMovie.items;
|
||||||
const newMovie = getNewMovie(_.cloneDeep(_.find(items, { tmdbId })), payload);
|
const newMovie = getNewMovie(_.cloneDeep(_.find(items, { tmdbId })), payload);
|
||||||
|
newMovie.id = 0;
|
||||||
|
|
||||||
const promise = createAjaxRequest({
|
const promise = createAjaxRequest({
|
||||||
url: '/movie',
|
url: '/movie',
|
||||||
@ -125,8 +128,12 @@ export const actionHandlers = handleThunks({
|
|||||||
}).request;
|
}).request;
|
||||||
|
|
||||||
promise.done((data) => {
|
promise.done((data) => {
|
||||||
|
const updatedItem = _.cloneDeep(data);
|
||||||
|
updatedItem.id = updatedItem.tmdbId;
|
||||||
|
|
||||||
dispatch(batchActions([
|
dispatch(batchActions([
|
||||||
updateItem({ section: 'movies', ...data }),
|
updateItem({ section: 'movies', ...data }),
|
||||||
|
updateItem({ section: 'addMovie', ...updatedItem }),
|
||||||
|
|
||||||
set({
|
set({
|
||||||
section,
|
section,
|
||||||
|
Loading…
Reference in New Issue
Block a user