add plot field when fetching data from omdb

This commit is contained in:
Onur NESVAT 2023-09-23 09:30:33 +03:00
parent 5054b0f20f
commit c2cdc0ef7f
3 changed files with 6 additions and 0 deletions

View file

@ -140,6 +140,7 @@ export class OMDbAPI extends APIModel {
onlineRating: Number.parseFloat(result.imdbRating ?? 0),
actors: result.Actors?.split(', ') ?? [],
image: result.Poster ?? '',
plot: result.Plot ?? '',
released: true,
streamingServices: [],
@ -170,6 +171,7 @@ export class OMDbAPI extends APIModel {
onlineRating: Number.parseFloat(result.imdbRating ?? 0),
actors: result.Actors?.split(', ') ?? [],
image: result.Poster ?? '',
plot: result.Plot ?? '',
released: true,
streamingServices: [],

View file

@ -9,6 +9,7 @@ export class MovieModel extends MediaTypeModel {
onlineRating: number;
actors: string[];
image: string;
plot: string;
released: boolean;
streamingServices: string[];
@ -29,6 +30,7 @@ export class MovieModel extends MediaTypeModel {
this.onlineRating = undefined;
this.actors = undefined;
this.image = undefined;
this.plot = undefined;
this.released = undefined;
this.streamingServices = undefined;

View file

@ -19,6 +19,7 @@ export class SeriesModel extends MediaTypeModel {
onlineRating: number;
actors: string[];
image: string;
plot: string;
released: boolean;
streamingServices: string[];
@ -42,6 +43,7 @@ export class SeriesModel extends MediaTypeModel {
this.onlineRating = undefined;
this.actors = undefined;
this.image = undefined;
this.plot = undefined;
this.released = undefined;
this.streamingServices = undefined;