mirror of https://github.com/Radarr/Radarr
parent
8a84975954
commit
64f27bca4f
|
@ -1,7 +1,9 @@
|
|||
import migrateBlacklistToBlocklist from './migrateBlacklistToBlocklist';
|
||||
import migrateMonitorToEnum from './migrateMonitorToEnum';
|
||||
import migratePreDbToReleased from './migratePreDbToReleased';
|
||||
|
||||
export default function migrate(persistedState) {
|
||||
migrateBlacklistToBlocklist(persistedState);
|
||||
migratePreDbToReleased(persistedState);
|
||||
migrateMonitorToEnum(persistedState);
|
||||
}
|
||||
|
|
|
@ -4,23 +4,19 @@ export default function migrateMonitorToEnum(persistedState) {
|
|||
const addMovie = get(persistedState, 'addMovie.defaults.monitor');
|
||||
const discoverMovie = get(persistedState, 'discoverMovie.defaults.monitor');
|
||||
|
||||
if (!addMovie && !discoverMovie) {
|
||||
return;
|
||||
if (addMovie != null) {
|
||||
if (addMovie) {
|
||||
persistedState.addMovie.defaults.monitor = 'movieOnly';
|
||||
} else {
|
||||
persistedState.addMovie.defaults.monitor = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
if (addMovie === true) {
|
||||
persistedState.addMovie.defaults.monitor = 'movieOnly';
|
||||
}
|
||||
|
||||
if (discoverMovie === true) {
|
||||
persistedState.discoverMovie.defaults.monitor = 'movieOnly';
|
||||
}
|
||||
|
||||
if (addMovie === false) {
|
||||
persistedState.addMovie.defaults.monitor = 'none';
|
||||
}
|
||||
|
||||
if (discoverMovie === false) {
|
||||
persistedState.discoverMovie.defaults.monitor = 'none';
|
||||
if (discoverMovie != null) {
|
||||
if (discoverMovie) {
|
||||
persistedState.discoverMovie.defaults.monitor = 'movieOnly';
|
||||
} else {
|
||||
persistedState.discoverMovie.defaults.monitor = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue