1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

ThumbnailMap bugfix

This commit is contained in:
Patrik J. Braun 2022-03-27 19:25:37 +02:00
parent 6745b40241
commit 8a3f0a5c77
2 changed files with 3 additions and 3 deletions

View File

@ -123,7 +123,7 @@ export class GalleryMWs {
} }
const cleanUpMedia = (media: MediaDTO[]): void => { const cleanUpMedia = (media: MediaDTO[]): void => {
media.forEach((m): void => { for (const m of media) {
delete m.id; delete m.id;
if (MediaDTOUtils.isPhoto(m)) { if (MediaDTOUtils.isPhoto(m)) {
delete (m as VideoDTO).metadata.bitRate; delete (m as VideoDTO).metadata.bitRate;
@ -139,7 +139,7 @@ export class GalleryMWs {
delete (m.directory as any).id; delete (m.directory as any).id;
} }
Utils.removeNullOrEmptyObj(m); Utils.removeNullOrEmptyObj(m);
}); }
}; };
if (cw.directory) { if (cw.directory) {

View File

@ -14,7 +14,7 @@ import {ServerTime} from '../ServerTimingMWs';
export class ThumbnailGeneratorMWs { export class ThumbnailGeneratorMWs {
private static ThumbnailMap: { [key: number]: number }; private static ThumbnailMap: { [key: number]: number } = Config.Client.Media.Thumbnail.generateThumbnailMap();
@ServerTime('2.th', 'Thumbnail decoration') @ServerTime('2.th', 'Thumbnail decoration')
public static async addThumbnailInformation(req: Request, res: Response, next: NextFunction): Promise<any> { public static async addThumbnailInformation(req: Request, res: Response, next: NextFunction): Promise<any> {