mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-18 09:53:16 +02:00
feat: Popular series hero carousel
This commit is contained in:
@@ -156,6 +156,15 @@ export class TmdbApi implements Api<paths> {
|
||||
})
|
||||
.then((res) => res.data);
|
||||
|
||||
getPopularSeries = () =>
|
||||
TmdbApiOpen.GET('/3/tv/popular', {
|
||||
params: {
|
||||
query: {
|
||||
language: get(settings)?.language
|
||||
}
|
||||
}
|
||||
}).then((res) => res.data?.results || []);
|
||||
|
||||
// OTHER
|
||||
}
|
||||
|
||||
@@ -178,7 +187,7 @@ const getTmdbCache = async (
|
||||
else {
|
||||
const backdropUri = await fn();
|
||||
if (backdropUri) {
|
||||
cache.put(String(tmdbId), new Response(backdropUri));
|
||||
await cache.put(String(tmdbId), new Response(backdropUri));
|
||||
}
|
||||
return backdropUri;
|
||||
}
|
||||
@@ -325,15 +334,6 @@ export const getTmdbMoviePoster = async (tmdbId: number) =>
|
||||
|
||||
/** Discover */
|
||||
|
||||
export const getTmdbPopularSeries = () =>
|
||||
TmdbApiOpen.GET('/3/tv/popular', {
|
||||
params: {
|
||||
query: {
|
||||
language: get(settings)?.language
|
||||
}
|
||||
}
|
||||
}).then((res) => res.data?.results || []);
|
||||
|
||||
export const getTmdbNetworkSeries = (networkId: number) =>
|
||||
TmdbApiOpen.GET('/3/discover/tv', {
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user