mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-18 06:53:14 +02:00
feat: Series recommendations and styling
This commit is contained in:
@@ -5,7 +5,6 @@ import { TMDB_API_KEY, TMDB_BACKDROP_SMALL } from '../../constants';
|
||||
import { settings } from '../../stores/settings.store';
|
||||
import type { TitleType } from '../../types';
|
||||
import type { Api } from '../api.interface';
|
||||
import { appState } from '../../stores/app-state.store';
|
||||
|
||||
const CACHE_ONE_DAY = 'max-age=86400';
|
||||
const CACHE_FOUR_DAYS = 'max-age=345600';
|
||||
@@ -19,6 +18,9 @@ export type TmdbSeason =
|
||||
export type TmdbEpisode = NonNullable<TmdbSeason['episodes']>[0];
|
||||
export type TmdbPerson =
|
||||
operations['person-details']['responses']['200']['content']['application/json'];
|
||||
export type TmdbCredit =
|
||||
| NonNullable<TmdbSeriesFull2['aggregate_credits']['cast']>[0]
|
||||
| NonNullable<TmdbMovieFull2['credits']['cast']>[0];
|
||||
|
||||
export interface TmdbPersonFull extends TmdbPerson {
|
||||
images: operations['person-images']['responses']['200']['content']['application/json'];
|
||||
@@ -165,6 +167,15 @@ export class TmdbApi implements Api<paths> {
|
||||
}
|
||||
}).then((res) => res.data?.results || []);
|
||||
|
||||
getSeriesRecommendations = (tmdbId: number) =>
|
||||
TmdbApiOpen.GET('/3/tv/{series_id}/recommendations', {
|
||||
params: {
|
||||
path: {
|
||||
series_id: tmdbId
|
||||
}
|
||||
}
|
||||
}).then((res) => res.data?.results || []);
|
||||
|
||||
// OTHER
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user