Add country, boxOffice and ageRating fields for movies and series

OMDbAPI has all 3 of these fields and MALAPI only has ageRating. While most anime is japanese there are some korean or chinese anime also on MAL so I thought it best to just set country and boxOffice as empty.

boxOffice isn't applicable for series so I removed that field
This commit is contained in:
ltctceplrm 2025-07-19 19:14:11 +02:00
parent c87cb098b2
commit ece6650376
4 changed files with 23 additions and 0 deletions

View file

@ -154,6 +154,9 @@ export class OMDbAPI extends APIModel {
image: result.Poster ? result.Poster.replace('_SX300', '_SX600') : '',
released: true,
country: result.Country?.split(', ') ?? [],
boxOffice: result.BoxOffice,
ageRating: result.Rated,
streamingServices: [],
premiere: this.plugin.dateFormatter.format(result.Released, this.apiDateFormat) ?? 'unknown',
@ -184,6 +187,8 @@ export class OMDbAPI extends APIModel {
image: result.Poster ? result.Poster.replace('_SX300', '_SX600') : '',
released: true,
country: result.Country?.split(', ') ?? [],
ageRating: result.Rated,
streamingServices: [],
airing: false,
airedFrom: this.plugin.dateFormatter.format(result.Released, this.apiDateFormat) ?? 'unknown',