diff --git a/src/imdb.ts b/src/imdb.ts index 6f9b003..9da6049 100644 --- a/src/imdb.ts +++ b/src/imdb.ts @@ -584,7 +584,7 @@ export class Client { } else if (isTvshow(data)) { ret = new TVShow(data, opts); } else if (isEpisode(data)) { - ret = new Episode(data, 30); + ret = new Episode(data, parseInt(data.Season)); } else { throw new ImdbError(`type: '${data.Type}' is not valid`); } diff --git a/src/interfaces.ts b/src/interfaces.ts index 99d9873..72426dd 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -50,6 +50,7 @@ export interface OmdbEpisode { Title: string; Released: string; Episode: string; + Season: string; Type: string; imdbRating: string; imdbID: string;