Curating chapter media.
This commit is contained in:
parent
cdea877024
commit
e60153ad01
|
@ -52,6 +52,28 @@ const releaseFields = `
|
|||
duration
|
||||
title
|
||||
description
|
||||
poster: chaptersPosterByChapterId {
|
||||
media {
|
||||
id
|
||||
path
|
||||
thumbnail
|
||||
s3: isS3
|
||||
width
|
||||
height
|
||||
size
|
||||
}
|
||||
}
|
||||
photos: chaptersPhotos {
|
||||
media {
|
||||
id
|
||||
path
|
||||
thumbnail
|
||||
s3: isS3
|
||||
width
|
||||
height
|
||||
size
|
||||
}
|
||||
}
|
||||
}
|
||||
poster: releasesPosterByReleaseId {
|
||||
media {
|
||||
|
@ -170,7 +192,11 @@ function curateGraphqlRelease(release) {
|
|||
entity: release.entity,
|
||||
actors: release.actors.map(actor => actor.actor),
|
||||
tags: release.tags.map(tag => tag.tag),
|
||||
...(release.chapters && { chapters: release.chapters }),
|
||||
...(release.chapters && { chapters: release.chapters.map(chapter => ({
|
||||
...chapter,
|
||||
poster: chapter.poster?.media || null,
|
||||
photos: chapter.photos.map(photo => photo.media),
|
||||
})) }),
|
||||
poster: release.poster?.media || null,
|
||||
...(release.photos && { photos: release.photos.map(photo => photo.media) }),
|
||||
trailer: release.trailer?.media || null,
|
||||
|
|
Loading…
Reference in New Issue