Added series page and scene page section, no overview (yet).
This commit is contained in:
@@ -4,27 +4,12 @@ import { knexQuery as knex, knexOwner, knexManticore } from './knex.js';
|
||||
import { utilsApi } from './manticore.js';
|
||||
import { HttpError } from './errors.js';
|
||||
import { fetchActorsById, curateActor, sortActorsByGender } from './actors.js';
|
||||
import { curateMedia } from './media.js';
|
||||
import { fetchTagsById } from './tags.js';
|
||||
import { fetchEntitiesById } from './entities.js';
|
||||
import { curateStash } from './stashes.js';
|
||||
import promiseProps from '../utils/promise-props.js';
|
||||
|
||||
function curateMedia(media) {
|
||||
if (!media) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
id: media.id,
|
||||
path: media.path,
|
||||
thumbnail: media.thumbnail,
|
||||
lazy: media.lazy,
|
||||
isS3: media.is_s3,
|
||||
width: media.width,
|
||||
height: media.height,
|
||||
};
|
||||
}
|
||||
|
||||
function curateMovie(rawMovie, assets) {
|
||||
if (!rawMovie) {
|
||||
return null;
|
||||
@@ -66,7 +51,7 @@ function curateMovie(rawMovie, assets) {
|
||||
slug: tag.slug,
|
||||
name: tag.name,
|
||||
})),
|
||||
poster: curateMedia(assets.poster),
|
||||
// poster: curateMedia(assets.poster),
|
||||
covers: assets.covers.map((cover) => curateMedia(cover)),
|
||||
photos: assets.photos.map((photo) => curateMedia(photo)),
|
||||
stashes: assets.stashes?.map((stash) => curateStash(stash)) || [],
|
||||
@@ -147,7 +132,7 @@ export async function fetchMoviesById(movieIds, reqUser) {
|
||||
const movie = movies.find((movieEntry) => movieEntry.id === movieId);
|
||||
|
||||
if (!movie) {
|
||||
console.warn('cannot find movie', movieId);
|
||||
console.warn('Cannot find movie', movieId);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user