mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
ThumbnailMap bugfix
This commit is contained in:
parent
6745b40241
commit
8a3f0a5c77
@ -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) {
|
||||||
|
@ -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> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user