mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
feat(tv): show cast for the entire show instead of only the last season (#778)
This uses TMDb's `aggregate_credits` instead of `credits` to get the show's cast for all seasons. Fixes #775
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
TmdbCreditCast,
|
||||
TmdbAggregateCreditCast,
|
||||
TmdbCreditCrew,
|
||||
TmdbExternalIds,
|
||||
TmdbVideo,
|
||||
@@ -68,6 +69,18 @@ export const mapCast = (person: TmdbCreditCast): Cast => ({
|
||||
profilePath: person.profile_path,
|
||||
});
|
||||
|
||||
export const mapAggregateCast = (person: TmdbAggregateCreditCast): Cast => ({
|
||||
castId: person.cast_id,
|
||||
// the first role is the one for which the actor appears the most as
|
||||
character: person.roles[0].character,
|
||||
creditId: person.roles[0].credit_id,
|
||||
id: person.id,
|
||||
name: person.name,
|
||||
order: person.order,
|
||||
gender: person.gender,
|
||||
profilePath: person.profile_path,
|
||||
});
|
||||
|
||||
export const mapCrew = (person: TmdbCreditCrew): Crew => ({
|
||||
creditId: person.credit_id,
|
||||
department: person.department,
|
||||
|
Reference in New Issue
Block a user