mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: Backend Updates from Sonarr
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com> Co-Authored-By: taloth <taloth@users.noreply.github.com>
This commit is contained in:
@@ -4,7 +4,6 @@ import * as blacklist from './blacklistActions';
|
||||
import * as calendar from './calendarActions';
|
||||
import * as captcha from './captchaActions';
|
||||
import * as customFilters from './customFilterActions';
|
||||
import * as devices from './deviceActions';
|
||||
import * as commands from './commandActions';
|
||||
import * as movieFiles from './movieFileActions';
|
||||
import * as history from './historyActions';
|
||||
@@ -13,6 +12,7 @@ import * as interactiveImportActions from './interactiveImportActions';
|
||||
import * as oAuth from './oAuthActions';
|
||||
import * as organizePreview from './organizePreviewActions';
|
||||
import * as paths from './pathActions';
|
||||
import * as providerOptions from './providerOptionActions';
|
||||
import * as queue from './queueActions';
|
||||
import * as releases from './releaseActions';
|
||||
import * as rootFolders from './rootFolderActions';
|
||||
@@ -32,7 +32,6 @@ export default [
|
||||
captcha,
|
||||
commands,
|
||||
customFilters,
|
||||
devices,
|
||||
movieFiles,
|
||||
history,
|
||||
importMovie,
|
||||
@@ -40,6 +39,7 @@ export default [
|
||||
oAuth,
|
||||
organizePreview,
|
||||
paths,
|
||||
providerOptions,
|
||||
queue,
|
||||
releases,
|
||||
rootFolders,
|
||||
|
@@ -8,7 +8,7 @@ import { set } from './baseActions';
|
||||
//
|
||||
// Variables
|
||||
|
||||
export const section = 'devices';
|
||||
export const section = 'providerOptions';
|
||||
|
||||
//
|
||||
// State
|
||||
@@ -23,32 +23,27 @@ export const defaultState = {
|
||||
//
|
||||
// Actions Types
|
||||
|
||||
export const FETCH_DEVICES = 'devices/fetchDevices';
|
||||
export const CLEAR_DEVICES = 'devices/clearDevices';
|
||||
export const FETCH_OPTIONS = 'devices/fetchOptions';
|
||||
export const CLEAR_OPTIONS = 'devices/clearOptions';
|
||||
|
||||
//
|
||||
// Action Creators
|
||||
|
||||
export const fetchDevices = createThunk(FETCH_DEVICES);
|
||||
export const clearDevices = createAction(CLEAR_DEVICES);
|
||||
export const fetchOptions = createThunk(FETCH_OPTIONS);
|
||||
export const clearOptions = createAction(CLEAR_OPTIONS);
|
||||
|
||||
//
|
||||
// Action Handlers
|
||||
|
||||
export const actionHandlers = handleThunks({
|
||||
|
||||
[FETCH_DEVICES]: function(getState, payload, dispatch) {
|
||||
const actionPayload = {
|
||||
action: 'getDevices',
|
||||
...payload
|
||||
};
|
||||
|
||||
[FETCH_OPTIONS]: function(getState, payload, dispatch) {
|
||||
dispatch(set({
|
||||
section,
|
||||
isFetching: true
|
||||
}));
|
||||
|
||||
const promise = requestAction(actionPayload);
|
||||
const promise = requestAction(payload);
|
||||
|
||||
promise.done((data) => {
|
||||
dispatch(set({
|
||||
@@ -56,7 +51,7 @@ export const actionHandlers = handleThunks({
|
||||
isFetching: false,
|
||||
isPopulated: true,
|
||||
error: null,
|
||||
items: data.devices || []
|
||||
items: data.options || []
|
||||
}));
|
||||
});
|
||||
|
||||
@@ -76,7 +71,7 @@ export const actionHandlers = handleThunks({
|
||||
|
||||
export const reducers = createHandleActions({
|
||||
|
||||
[CLEAR_DEVICES]: function(state) {
|
||||
[CLEAR_OPTIONS]: function(state) {
|
||||
return updateSectionState(state, section, defaultState);
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ function createMovieQualityProfileSelector() {
|
||||
return createSelector(
|
||||
(state) => state.settings.qualityProfiles.items,
|
||||
createMovieSelector(),
|
||||
(qualityProfiles, movie) => {
|
||||
(qualityProfiles, movie = {}) => {
|
||||
return qualityProfiles.find((profile) => {
|
||||
return profile.id === movie.qualityProfileId;
|
||||
});
|
||||
|
Reference in New Issue
Block a user