Add new config format

Should be WAAAAY easier to work with modules now
This commit is contained in:
ajnart
2022-05-22 20:42:10 +02:00
parent bf85818f8b
commit af2e0235bf
12 changed files with 99 additions and 65 deletions

View File

@@ -1,32 +1,43 @@
import { OptionValues } from '../components/modules/modules';
export interface Settings {
searchUrl: string;
enabledModules: string[];
[key: string]: any;
}
export interface Config {
name: string;
services: serviceItem[];
settings: Settings;
modules: {
[key: string]: ConfigModule;
};
}
interface ConfigModule {
title: string;
enabled: boolean;
options: {
[key: string]: OptionValues;
};
}
export const ServiceTypeList = [
'Other',
'Sonarr',
'Radarr',
'Lidarr',
'qBittorrent',
'Plex',
'Emby',
'Lidarr',
'Plex',
'Radarr',
'Sonarr',
'qBittorrent',
];
export type ServiceType =
| 'Other'
| 'Sonarr'
| 'Radarr'
| 'Emby'
| 'Lidarr'
| 'qBittorrent'
| 'Plex'
| 'Emby';
| 'Radarr'
| 'Sonarr'
| 'qBittorrent';
export interface serviceItem {
id: string;