Plugin review changes round 2

This commit is contained in:
mProjectsCode 2022-06-01 13:50:26 +02:00
parent 8b4a50647d
commit 889d51712e
9 changed files with 52 additions and 24 deletions

View file

@ -25,9 +25,13 @@ export class APIManager {
}
async queryDetailedInfo(item: MediaTypeModel): Promise<MediaTypeModel> {
return await this.queryDetailedInfoById(item.id, item.dataSource);
}
async queryDetailedInfoById(id: string, dataSource: string): Promise<MediaTypeModel> {
for (const api of this.apis) {
if (api.apiName === item.dataSource) {
return api.getById(item);
if (api.apiName === dataSource) {
return api.getById(id);
}
}
}