mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-01 04:08:45 -05:00
feat: Overseerr to Jellyseerr migration (#2019)
* feat: add Overseerr migration * refactor: rename to Seerr * refactor: more rename to Seerr * feat: update the value of the MediaStatus.DELETED enum * fix: add more details in migration logs * fix: replace .update by .save for TypeORM hooks * fix: add fake migration to skip the duplicated UpdateWebPush migration * fix: rewrite the AddUserAvatarCacheFields migration for Overseerr merge * fix: replace jellyseerr migrations with a dedicated one for overseerr * fix: update overseerr migration * fix: update overseerr migration * fix: remove irrelevant changes * fix: typos * docs: update jsdoc comment * docs: update seerr description * docs: fix the contributing.md link * fix: remove unwanterd change on postgres dev datasource * docs: add latest tag to docker image * fix: migrate old deleted status for 4k media * fix: update Seerr version check
This commit is contained in:
@@ -764,9 +764,13 @@ class Settings {
|
||||
* This will load settings from file unless an optional argument of the object structure
|
||||
* is passed in.
|
||||
* @param overrideSettings If passed in, will override all existing settings with these
|
||||
* @param raw If true, will load the settings without running migrations or generating missing
|
||||
* values
|
||||
*/
|
||||
public async load(overrideSettings?: AllSettings): Promise<Settings> {
|
||||
public async load(
|
||||
overrideSettings?: AllSettings,
|
||||
raw = false
|
||||
): Promise<Settings> {
|
||||
if (overrideSettings) {
|
||||
this.data = overrideSettings;
|
||||
return this;
|
||||
@@ -779,10 +783,12 @@ class Settings {
|
||||
await this.save();
|
||||
}
|
||||
|
||||
if (data) {
|
||||
if (data && !raw) {
|
||||
const parsedJson = JSON.parse(data);
|
||||
const migratedData = await runMigrations(parsedJson, SETTINGS_PATH);
|
||||
this.data = merge(this.data, migratedData);
|
||||
} else if (data) {
|
||||
this.data = JSON.parse(data);
|
||||
}
|
||||
|
||||
// generate keys and ids if it's missing
|
||||
|
||||
Reference in New Issue
Block a user