Added sub-objects for api toggles (WIP)

This commit is contained in:
ltctceplrm 2024-03-17 01:02:51 +01:00
parent 5eec98d127
commit 31ffd0d185
2 changed files with 45 additions and 31 deletions

View file

@ -20,7 +20,7 @@ export abstract class APIModel {
abstract getById(id: string): Promise<MediaTypeModel>;
hasType(type: MediaType): boolean {
if (this.types.contains(type) && !(this.plugin.settings[(this.apiName + type) as keyof MediaDbPluginSettings] === false)) {
if (this.types.contains(type) && !(this.plugin.settings[((`${this.apiName}"."${type}`)) as keyof MediaDbPluginSettings] === false)) {
return true;
}
}