mirror of
https://github.com/p-stream/p-stream.git
synced 2026-01-11 20:10:32 +00:00
wrong related tmdb endpoint 💀
This commit is contained in:
parent
6967261d4a
commit
02291a3e37
1 changed files with 5 additions and 1 deletions
|
|
@ -526,6 +526,10 @@ export async function getMediaVideos(
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches recommended media from TMDB recommendations endpoint.
|
||||
* Returns media that users commonly watch together based on ratings and popularity.
|
||||
*/
|
||||
export async function getRelatedMedia(
|
||||
id: string,
|
||||
type: TMDBContentTypes,
|
||||
|
|
@ -534,7 +538,7 @@ export async function getRelatedMedia(
|
|||
const endpoint = type === TMDBContentTypes.MOVIE ? "movie" : "tv";
|
||||
const data = await get<{
|
||||
results: TMDBMovieSearchResult[] | TMDBShowSearchResult[];
|
||||
}>(`/${endpoint}/${id}/similar`);
|
||||
}>(`/${endpoint}/${id}/recommendations`);
|
||||
|
||||
return data.results.slice(0, limit);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue