mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: Edit RlsGroup, Flags, and Edition for Movie Files (#5183)
* New: Edit RlsGroup and Edition for Movie Files * fixup! remove console log * fixup! translation
This commit is contained in:
48
frontend/src/Store/Actions/Settings/indexerFlags.js
Normal file
48
frontend/src/Store/Actions/Settings/indexerFlags.js
Normal file
@@ -0,0 +1,48 @@
|
||||
import createFetchHandler from 'Store/Actions/Creators/createFetchHandler';
|
||||
import { createThunk } from 'Store/thunks';
|
||||
|
||||
//
|
||||
// Variables
|
||||
|
||||
const section = 'settings.indexerFlags';
|
||||
|
||||
//
|
||||
// Actions Types
|
||||
|
||||
export const FETCH_INDEXER_FLAGS = 'settings/indexerFlags/fetchIndexerFlags';
|
||||
|
||||
//
|
||||
// Action Creators
|
||||
|
||||
export const fetchIndexerFlags = createThunk(FETCH_INDEXER_FLAGS);
|
||||
|
||||
//
|
||||
// Details
|
||||
|
||||
export default {
|
||||
|
||||
//
|
||||
// State
|
||||
|
||||
defaultState: {
|
||||
isFetching: false,
|
||||
isPopulated: false,
|
||||
error: null,
|
||||
items: []
|
||||
},
|
||||
|
||||
//
|
||||
// Action Handlers
|
||||
|
||||
actionHandlers: {
|
||||
[FETCH_INDEXER_FLAGS]: createFetchHandler(section, '/indexerFlag')
|
||||
},
|
||||
|
||||
//
|
||||
// Reducers
|
||||
|
||||
reducers: {
|
||||
|
||||
}
|
||||
|
||||
};
|
@@ -141,7 +141,10 @@ export const actionHandlers = handleThunks({
|
||||
const {
|
||||
movieFileIds,
|
||||
languages,
|
||||
quality
|
||||
indexerFlags,
|
||||
quality,
|
||||
edition,
|
||||
releaseGroup
|
||||
} = payload;
|
||||
|
||||
dispatch(set({ section, isSaving: true }));
|
||||
@@ -154,10 +157,22 @@ export const actionHandlers = handleThunks({
|
||||
data.languages = languages;
|
||||
}
|
||||
|
||||
if (indexerFlags !== undefined) {
|
||||
data.indexerFlags = indexerFlags;
|
||||
}
|
||||
|
||||
if (quality) {
|
||||
data.quality = quality;
|
||||
}
|
||||
|
||||
if (releaseGroup) {
|
||||
data.releaseGroup = releaseGroup;
|
||||
}
|
||||
|
||||
if (edition) {
|
||||
data.edition = edition;
|
||||
}
|
||||
|
||||
const promise = createAjaxRequest({
|
||||
url: '/movieFile/editor',
|
||||
method: 'PUT',
|
||||
@@ -174,10 +189,22 @@ export const actionHandlers = handleThunks({
|
||||
props.languages = languages;
|
||||
}
|
||||
|
||||
if (indexerFlags) {
|
||||
props.indexerFlags = indexerFlags;
|
||||
}
|
||||
|
||||
if (quality) {
|
||||
props.quality = quality;
|
||||
}
|
||||
|
||||
if (edition) {
|
||||
props.edition = edition;
|
||||
}
|
||||
|
||||
if (releaseGroup) {
|
||||
props.releaseGroup = releaseGroup;
|
||||
}
|
||||
|
||||
return updateItem({ section, id, ...props });
|
||||
}),
|
||||
|
||||
|
@@ -10,6 +10,7 @@ import general from './Settings/general';
|
||||
import importExclusions from './Settings/importExclusions';
|
||||
import importListOptions from './Settings/importListOptions';
|
||||
import importLists from './Settings/importLists';
|
||||
import indexerFlags from './Settings/indexerFlags';
|
||||
import indexerOptions from './Settings/indexerOptions';
|
||||
import indexers from './Settings/indexers';
|
||||
import languages from './Settings/languages';
|
||||
@@ -31,6 +32,7 @@ export * from './Settings/delayProfiles';
|
||||
export * from './Settings/downloadClients';
|
||||
export * from './Settings/downloadClientOptions';
|
||||
export * from './Settings/general';
|
||||
export * from './Settings/indexerFlags';
|
||||
export * from './Settings/indexerOptions';
|
||||
export * from './Settings/indexers';
|
||||
export * from './Settings/languages';
|
||||
@@ -66,6 +68,7 @@ export const defaultState = {
|
||||
downloadClients: downloadClients.defaultState,
|
||||
downloadClientOptions: downloadClientOptions.defaultState,
|
||||
general: general.defaultState,
|
||||
indexerFlags: indexerFlags.defaultState,
|
||||
indexerOptions: indexerOptions.defaultState,
|
||||
indexers: indexers.defaultState,
|
||||
languages: languages.defaultState,
|
||||
@@ -109,6 +112,7 @@ export const actionHandlers = handleThunks({
|
||||
...downloadClients.actionHandlers,
|
||||
...downloadClientOptions.actionHandlers,
|
||||
...general.actionHandlers,
|
||||
...indexerFlags.actionHandlers,
|
||||
...indexerOptions.actionHandlers,
|
||||
...indexers.actionHandlers,
|
||||
...languages.actionHandlers,
|
||||
@@ -143,6 +147,7 @@ export const reducers = createHandleActions({
|
||||
...downloadClients.reducers,
|
||||
...downloadClientOptions.reducers,
|
||||
...general.reducers,
|
||||
...indexerFlags.reducers,
|
||||
...indexerOptions.reducers,
|
||||
...indexers.reducers,
|
||||
...languages.reducers,
|
||||
|
Reference in New Issue
Block a user