From af6009f1acf10d2bcaf475f1cde7ba6928178929 Mon Sep 17 00:00:00 2001 From: ltctceplrm <14954927+ltctceplrm@users.noreply.github.com> Date: Wed, 5 Mar 2025 21:47:18 +0100 Subject: [PATCH] Revert "Added a fix for api's with spaces in their names" This reverts commit 98e96b15c70a6e6110a8cc7efdb74b3415da5a14. --- src/api/APIModel.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 {