Skip to content

Commit

Permalink
add isReleased to tvShows seasons (#170)
Browse files Browse the repository at this point in the history
* add isReleased to tvShows seasons

* add more options for certain images

* switched hd from og to w780
  • Loading branch information
TDanks2000 authored Jan 6, 2023
1 parent ce3dac1 commit 064ac9f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/providers/meta/tmdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,23 @@ class TMDB extends MovieParser {
url: episodeFromProvider?.url || undefined,
img: !episode?.still_path
? undefined
: `https://image.tmdb.org/t/p/original${episode.still_path}`,
: {
mobile: `https://image.tmdb.org/t/p/w300${episode.still_path}`,
hd: `https://image.tmdb.org/t/p/w780${episode.still_path}`,
},
};
});

seasons.push({
season: i,
image: !seasonData?.poster_path
? undefined
: `https://image.tmdb.org/t/p/original${seasonData.poster_path}`,
: {
mobile: `https://image.tmdb.org/t/p/w300${seasonData.poster_path}`,
hd: `https://image.tmdb.org/t/p/w780${seasonData.poster_path}`,
},
episodes,
isReleased: seasonData?.episodes[0]?.air_date > new Date().toISOString() ? false : true,
});
}
}
Expand Down Expand Up @@ -351,7 +358,7 @@ class TMDB extends MovieParser {
// const tmdb = new TMDB();
// const search = await tmdb.search('the flash');
// const info = await tmdb.fetchMediaInfo(search.results[0].id, search.results![0].type as string);
// console.log(info);
// // console.log(info);
// })();

export default TMDB;

0 comments on commit 064ac9f

Please sign in to comment.