it creates files now

This commit is contained in:
mProjectsCode 2022-05-04 21:04:38 +02:00
parent c67a0bf590
commit 4405eb4a34
7 changed files with 61 additions and 19 deletions

View file

@ -15,7 +15,7 @@ export class APIManager {
for (const api of this.apis) {
if (types.length === 0 || api.hasTypeOverlap(types)) {
const apiRes = await api.getByTitle(query);
const apiRes = await api.searchByTitle(query);
// console.log(apiRes);
res = res.concat(apiRes);
}
@ -24,6 +24,14 @@ export class APIManager {
return res;
}
async queryDetailedInfo(item: MediaTypeModel): Promise<MediaTypeModel> {
for (const api of this.apis) {
if (api.apiName === item.dataSource) {
return api.getById(item);
}
}
}
registerAPI(api: APIModel): void {
this.apis.push(api);
}