fix(api): add a migration script to rename *arr tags with spaces (#1946)

* fix(api): add a migration script to rename *arr tags with spaces

This PR adds a migration script that will run at the startup of the app to remove the spaces from
the *arr tags of Jellyseerr.

fix #1897
re #1913
re https://github.com/Radarr/Radarr/issues/11251

* fix: add error message to logs
This commit is contained in:
Gauthier
2025-10-01 11:42:10 +02:00
committed by GitHub
parent 872fc4581e
commit f2bd0abcd8
3 changed files with 122 additions and 0 deletions

View File

@@ -363,6 +363,7 @@ export interface AllSettings {
jobs: Record<JobId, JobSettings>;
network: NetworkSettings;
metadataSettings: MetadataSettings;
migrations: string[];
}
const SETTINGS_PATH = process.env.CONFIG_DIRECTORY
@@ -593,6 +594,7 @@ class Settings {
forceMaxTtl: -1,
},
},
migrations: [],
};
if (initialSettings) {
this.data = merge(this.data, initialSettings);
@@ -722,6 +724,14 @@ class Settings {
this.data.network = data;
}
get migrations(): string[] {
return this.data.migrations;
}
set migrations(data: string[]) {
this.data.migrations = data;
}
get clientId(): string {
return this.data.clientId;
}