Removed "default" setting and only check if media type is false or not

This commit is contained in:
ltctceplrm 2024-02-01 19:49:21 +01:00
parent 0157c0adf9
commit 675a0f7659
4 changed files with 5 additions and 17 deletions

View file

@ -23,7 +23,7 @@ export class APIManager {
let res: MediaTypeModel[] = [];
for (const api of this.apis) {
if (apisToQuery.contains(api.apiName) && (this.plugin.settings[[api.apiName, mediaType].filter(s => s).join('') as keyof typeof this.plugin.settings] || this.plugin.settings[[api.apiName, "default"].filter(s => s).join('') as keyof typeof this.plugin.settings])) {
if (apisToQuery.contains(api.apiName) && !(this.plugin.settings[[api.apiName, mediaType].filter(s => s).join('') as keyof typeof this.plugin.settings] === false)) {
const apiRes = await api.searchByTitle(query);
res = res.concat(apiRes);
}