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

@ -58,14 +58,14 @@ export class MusicBrainzAPI 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 = `https://musicbrainz.org/ws/2/release-group/${encodeURIComponent(item.id)}?inc=releases+artists+tags+ratings+genres&fmt=json`;
const searchUrl = `https://musicbrainz.org/ws/2/release-group/${encodeURIComponent(id)}?inc=releases+artists+tags+ratings+genres&fmt=json`;
const fetchData = await requestUrl({
url: searchUrl,
headers: {
'User-Agent': `${pluginName}/0.1.7 (${contactEmail})`,
'User-Agent': `${pluginName}/${mediaDbVersion} (${contactEmail})`,
},
});