mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-23 05:57:07 -04:00
Fixed: Remove pre-DB from frontend storage
This commit is contained in:
parent
b1afd7aaaa
commit
7de270b212
2 changed files with 20 additions and 0 deletions
|
@ -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';
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue