mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-11 17:45:38 +00:00
Update TrailersSection.tsx 4
This commit is contained in:
parent
274d2f7d0a
commit
b2cce94841
1 changed files with 3 additions and 3 deletions
|
|
@ -201,7 +201,7 @@ const TrailersSection: React.FC<TrailersSectionProps> = memo(({
|
||||||
|
|
||||||
if (type === 'movie') {
|
if (type === 'movie') {
|
||||||
// For movies, just fetch the main videos endpoint
|
// For movies, just fetch the main videos endpoint
|
||||||
const videosEndpoint = `https://api.themoviedb.org/3/movie/${tmdbId}/videos?api_key=${tmdbApiKey}&language=en-US`;
|
const videosEndpoint = `https://api.themoviedb.org/3/movie/${tmdbId}/videos?api_key=${tmdbApiKey}`;
|
||||||
|
|
||||||
logger.info('TrailersSection', `Fetching movie videos from: ${videosEndpoint}`);
|
logger.info('TrailersSection', `Fetching movie videos from: ${videosEndpoint}`);
|
||||||
|
|
||||||
|
|
@ -232,7 +232,7 @@ const TrailersSection: React.FC<TrailersSectionProps> = memo(({
|
||||||
logger.info('TrailersSection', `TV show has ${numberOfSeasons} seasons`);
|
logger.info('TrailersSection', `TV show has ${numberOfSeasons} seasons`);
|
||||||
|
|
||||||
// Fetch main TV show videos
|
// Fetch main TV show videos
|
||||||
const tvVideosEndpoint = `https://api.themoviedb.org/3/tv/${tmdbId}/videos?api_key=${tmdbApiKey}&language=en-US`;
|
const tvVideosEndpoint = `https://api.themoviedb.org/3/tv/${tmdbId}/videos?api_key=${tmdbApiKey}`;
|
||||||
const tvResponse = await fetch(tvVideosEndpoint);
|
const tvResponse = await fetch(tvVideosEndpoint);
|
||||||
|
|
||||||
if (tvResponse.ok) {
|
if (tvResponse.ok) {
|
||||||
|
|
@ -251,7 +251,7 @@ const TrailersSection: React.FC<TrailersSectionProps> = memo(({
|
||||||
const seasonPromises = [];
|
const seasonPromises = [];
|
||||||
for (let seasonNum = 1; seasonNum <= numberOfSeasons; seasonNum++) {
|
for (let seasonNum = 1; seasonNum <= numberOfSeasons; seasonNum++) {
|
||||||
seasonPromises.push(
|
seasonPromises.push(
|
||||||
fetch(`https://api.themoviedb.org/3/tv/${tmdbId}/season/${seasonNum}/videos?api_key=${tmdbApiKey}&language=en-US`)
|
fetch(`https://api.themoviedb.org/3/tv/${tmdbId}/season/${seasonNum}/videos?api_key=${tmdbApiKey}`)
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(data => ({
|
.then(data => ({
|
||||||
seasonNumber: seasonNum,
|
seasonNumber: seasonNum,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue