Skip to content

Commit

Permalink
feat: add tagline, episode runtime, genres list to media details & cl…
Browse files Browse the repository at this point in the history
…ean/refactor CSS into globals (#1160)
  • Loading branch information
TheCatLady authored Mar 15, 2021
1 parent 3d6b343 commit 2f2e002
Show file tree
Hide file tree
Showing 23 changed files with 682 additions and 583 deletions.
14 changes: 14 additions & 0 deletions overseerr-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,8 @@ components:
$ref: '#/components/schemas/Season'
status:
type: string
tagline:
type: string
type:
type: string
voteAverage:
Expand Down Expand Up @@ -4737,6 +4739,12 @@ paths:
description: Returns a list of genres in a JSON array.
tags:
- tmdb
parameters:
- in: query
name: language
schema:
type: string
example: en
responses:
'200':
description: Results
Expand All @@ -4759,6 +4767,12 @@ paths:
description: Returns a list of genres in a JSON array.
tags:
- tmdb
parameters:
- in: query
name: language
schema:
type: string
example: en
responses:
'200':
description: Results
Expand Down
1 change: 1 addition & 0 deletions server/api/themoviedb/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export interface TmdbTvDetails {
}[];
seasons: TmdbTvSeasonResult[];
status: string;
tagline?: string;
type: string;
vote_average: number;
vote_count: number;
Expand Down
2 changes: 2 additions & 0 deletions server/models/Tv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export interface TvDetails {
spokenLanguages: SpokenLanguage[];
seasons: Season[];
status: string;
tagline?: string;
type: string;
voteAverage: number;
voteCount: number;
Expand Down Expand Up @@ -174,6 +175,7 @@ export const mapTvDetails = (
originCountry: show.origin_country,
originalLanguage: show.original_language,
originalName: show.original_name,
tagline: show.tagline,
overview: show.overview,
popularity: show.popularity,
productionCompanies: show.production_companies.map((company) => ({
Expand Down
8 changes: 6 additions & 2 deletions server/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,19 @@ router.get<{ id: string }>('/network/:id', async (req, res) => {
router.get('/genres/movie', isAuthenticated(), async (req, res) => {
const tmdb = new TheMovieDb();

const genres = await tmdb.getMovieGenres();
const genres = await tmdb.getMovieGenres({
language: req.query.language as string,
});

return res.status(200).json(genres);
});

router.get('/genres/tv', isAuthenticated(), async (req, res) => {
const tmdb = new TheMovieDb();

const genres = await tmdb.getTvGenres();
const genres = await tmdb.getTvGenres({
language: req.query.language as string,
});

return res.status(200).json(genres);
});
Expand Down
Loading

0 comments on commit 2f2e002

Please sign in to comment.