build(deps): bump dependencies (#2796)

This commit is contained in:
Danshil Kokil Mungur
2022-08-17 15:43:35 +04:00
committed by GitHub
parent 821bb79d83
commit 0fa84eae8d
29 changed files with 2251 additions and 2425 deletions

View File

@@ -3,7 +3,6 @@ import {
Column,
CreateDateColumn,
Entity,
getRepository,
In,
Index,
OneToMany,
@@ -15,6 +14,7 @@ import SonarrAPI from '../api/servarr/sonarr';
import { MediaStatus, MediaType } from '../constants/media';
import type { DownloadingItem } from '../lib/downloadtracker';
import downloadTracker from '../lib/downloadtracker';
import { getRepository } from '../datasource';
import { getSettings } from '../lib/settings';
import logger from '../logger';
import Issue from './Issue';
@@ -37,7 +37,7 @@ class Media {
}
const media = await mediaRepository.find({
tmdbId: In(finalIds),
where: { tmdbId: In(finalIds) },
});
return media;
@@ -56,10 +56,10 @@ class Media {
try {
const media = await mediaRepository.findOne({
where: { tmdbId: id, mediaType },
relations: ['requests', 'issues'],
relations: { requests: true, issues: true },
});
return media;
return media ?? undefined;
} catch (e) {
logger.error(e.message);
return undefined;