diff --git a/src/api/APIModel.ts b/src/api/APIModel.ts index 6056a7d..94adbd3 100644 --- a/src/api/APIModel.ts +++ b/src/api/APIModel.ts @@ -19,9 +19,8 @@ export abstract class APIModel { abstract getById(id: string): Promise; hasType(type: MediaType): boolean { - const sanitizedApiName = this.apiName.replace(/\s+/g, '_'); - const disabledMediaTypes = (this.plugin.settings[`${sanitizedApiName}_disabledMediaTypes` as keyof typeof this.plugin.settings] as MediaType[]) || []; - return (this.types || []).includes(type) && !disabledMediaTypes.includes(type); + const disabledMediaTypes = this.plugin.settings[`${this.apiName}_disabledMediaTypes` as keyof typeof this.plugin.settings] as MediaType[]; + return this.types.includes(type) && !disabledMediaTypes.includes(type); } hasTypeOverlap(types: MediaType[]): boolean {