forked from DebaucheryLibrarian/traxxx
Added sections and pagination to stash page.
This commit is contained in:
@@ -136,20 +136,30 @@ function curateTag(tag) {
|
||||
function curateStash(stash) {
|
||||
const curatedStash = stash;
|
||||
|
||||
if (stash.scenes) {
|
||||
curatedStash.scenes = stash.scenes.map(item => ({
|
||||
if (stash.scenes || stash.scenesConnection?.scenes) {
|
||||
curatedStash.sceneTotal = stash.scenesConnection?.totalCount || null;
|
||||
curatedStash.scenes = (stash.scenesConnection?.scenes || stash.scenes).map(item => ({
|
||||
...item,
|
||||
scene: curateRelease(item.scene),
|
||||
}));
|
||||
}
|
||||
|
||||
if (stash.actors) {
|
||||
curatedStash.actors = stash.actors.map(item => ({
|
||||
if (stash.actors || stash.actorsConnection?.actors) {
|
||||
curatedStash.actorTotal = stash.actorsConnection?.totalCount || null;
|
||||
curatedStash.actors = (stash.actorsConnection?.actors || stash.actors).map(item => ({
|
||||
...item,
|
||||
actor: curateActor(item.actor),
|
||||
}));
|
||||
}
|
||||
|
||||
if (stash.movies || stash.moviesConnection?.movies) {
|
||||
curatedStash.movieTotal = stash.moviesConnection?.totalCount || null;
|
||||
curatedStash.movies = (stash.moviesConnection?.movies || stash.movies).map(item => ({
|
||||
...item,
|
||||
movie: curateRelease(item.movie),
|
||||
}));
|
||||
}
|
||||
|
||||
return curatedStash;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user