mirror of
https://github.com/sct/overseerr.git
synced 2025-09-26 20:12:33 +02:00
fix(ui): minor fixes (#3036)
* fix(ui): hide available media on person page * fix(ui): set correct label for image cache settings * fix(ui): disable status badge tooltip for collections * fix(ui): replace empty space when no episodes in season * fix: suggested changes * fix(jobs): set watchlist sync to short interval * chore: run i18n:extract * fix: suggested changes
This commit is contained in:

committed by
GitHub

parent
21d20fdfd6
commit
f5c2fc1c20
@@ -1,5 +1,7 @@
|
||||
import TheMovieDb from '@server/api/themoviedb';
|
||||
import { MediaStatus } from '@server/constants/media';
|
||||
import Media from '@server/entity/Media';
|
||||
import { getSettings } from '@server/lib/settings';
|
||||
import logger from '@server/logger';
|
||||
import {
|
||||
mapCastCredits,
|
||||
@@ -34,6 +36,7 @@ personRoutes.get('/:id', async (req, res, next) => {
|
||||
|
||||
personRoutes.get('/:id/combined_credits', async (req, res, next) => {
|
||||
const tmdb = new TheMovieDb();
|
||||
const settings = getSettings();
|
||||
|
||||
try {
|
||||
const combinedCredits = await tmdb.getPersonCombinedCredits({
|
||||
@@ -41,14 +44,30 @@ personRoutes.get('/:id/combined_credits', async (req, res, next) => {
|
||||
language: req.locale ?? (req.query.language as string),
|
||||
});
|
||||
|
||||
const castMedia = await Media.getRelatedMedia(
|
||||
let castMedia = await Media.getRelatedMedia(
|
||||
combinedCredits.cast.map((result) => result.id)
|
||||
);
|
||||
|
||||
const crewMedia = await Media.getRelatedMedia(
|
||||
let crewMedia = await Media.getRelatedMedia(
|
||||
combinedCredits.crew.map((result) => result.id)
|
||||
);
|
||||
|
||||
if (settings.main.hideAvailable) {
|
||||
castMedia = castMedia.filter(
|
||||
(media) =>
|
||||
(media.mediaType === 'movie' || media.mediaType === 'tv') &&
|
||||
media.status !== MediaStatus.AVAILABLE &&
|
||||
media.status !== MediaStatus.PARTIALLY_AVAILABLE
|
||||
);
|
||||
|
||||
crewMedia = crewMedia.filter(
|
||||
(media) =>
|
||||
(media.mediaType === 'movie' || media.mediaType === 'tv') &&
|
||||
media.status !== MediaStatus.AVAILABLE &&
|
||||
media.status !== MediaStatus.PARTIALLY_AVAILABLE
|
||||
);
|
||||
}
|
||||
|
||||
return res.status(200).json({
|
||||
cast: combinedCredits.cast
|
||||
.map((result) =>
|
||||
|
Reference in New Issue
Block a user