mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-20 18:02:44 +01:00
Fixed: Remove pre-DB from frontend storage
This commit is contained in:
parent
b1afd7aaaa
commit
7de270b212
@ -1,5 +1,7 @@
|
|||||||
import migrateBlacklistToBlocklist from './migrateBlacklistToBlocklist';
|
import migrateBlacklistToBlocklist from './migrateBlacklistToBlocklist';
|
||||||
|
import migratePreDbToReleased from './migratePreDbToReleased';
|
||||||
|
|
||||||
export default function migrate(persistedState) {
|
export default function migrate(persistedState) {
|
||||||
migrateBlacklistToBlocklist(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…
Reference in New Issue
Block a user