Plugin review changes round 2
This commit is contained in:
parent
8b4a50647d
commit
889d51712e
9 changed files with 52 additions and 24 deletions
|
|
@ -88,10 +88,10 @@ export class OMDbAPI extends APIModel {
|
|||
return ret;
|
||||
}
|
||||
|
||||
async getById(item: MediaTypeModel): Promise<MediaTypeModel> {
|
||||
async getById(id: string): Promise<MediaTypeModel> {
|
||||
console.log(`MDB | api "${this.apiName}" queried by ID`);
|
||||
|
||||
const searchUrl = `http://www.omdbapi.com/?i=${item.id}&apikey=${this.plugin.settings.OMDbKey}`;
|
||||
const searchUrl = `http://www.omdbapi.com/?i=${encodeURIComponent(id)}&apikey=${this.plugin.settings.OMDbKey}`;
|
||||
const fetchData = await fetch(searchUrl);
|
||||
|
||||
if (fetchData.status === 401) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue