mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-05 13:21:25 -05:00
Fixed: Remove pre-DB from frontend storage
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import migrateBlacklistToBlocklist from './migrateBlacklistToBlocklist';
|
||||
import migratePreDbToReleased from './migratePreDbToReleased';
|
||||
|
||||
export default function migrate(persistedState) {
|
||||
migrateBlacklistToBlocklist(persistedState);
|
||||
migratePreDbToReleased(persistedState);
|
||||
}
|
||||
|
||||
18
frontend/src/Store/Migrators/migratePreDbToReleased.js
Normal file
18
frontend/src/Store/Migrators/migratePreDbToReleased.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import get from 'lodash';
|
||||
|
||||
export default function migratePreDbToReleased(persistedState) {
|
||||
const addMovie = get(persistedState, 'addMovie.defaults.minimumAvailability');
|
||||
const discoverMovie = get(persistedState, 'discoverMovie.defaults.minimumAvailability');
|
||||
|
||||
if (!addMovie && !discoverMovie) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (addMovie === 'preDB') {
|
||||
persistedState.addMovie.defaults.minimumAvailability = 'released';
|
||||
}
|
||||
|
||||
if (discoverMovie === 'preDB') {
|
||||
persistedState.discoverMovie.defaults.minimumAvailability = 'released';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user