mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-24 22:35:49 -04:00
New: Collections View
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import get from 'lodash';
|
||||
|
||||
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 === 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';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user