You've already forked pigallery2
mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-11-27 22:38:10 +02:00
improving config check and setting
This commit is contained in:
@@ -9,24 +9,21 @@ import * as exif_parser from "exif-parser";
|
||||
import {ProjectPath} from "../../ProjectPath";
|
||||
|
||||
const LOG_TAG = "[DiskManagerTask]";
|
||||
|
||||
|
||||
export class DiskMangerWorker {
|
||||
private static isImage(fullPath: string) {
|
||||
let imageMimeTypes = [
|
||||
'bmp',
|
||||
'gif',
|
||||
'jpeg', 'jpg', 'jpe',
|
||||
'png',
|
||||
'tiff', 'tif',
|
||||
'webp',
|
||||
'ico',
|
||||
'tga'
|
||||
const extensions = [
|
||||
'.bmp',
|
||||
'.gif',
|
||||
'.jpeg', '.jpg', '.jpe',
|
||||
'.png',
|
||||
'.tiff', '.tif',
|
||||
'.webp',
|
||||
'.ico',
|
||||
'.tga'
|
||||
];
|
||||
|
||||
let extension = path.extname(fullPath).toLowerCase();
|
||||
|
||||
return imageMimeTypes.indexOf(extension) !== -1;
|
||||
const extension = path.extname(fullPath).toLowerCase();
|
||||
return extensions.indexOf(extension) !== -1;
|
||||
}
|
||||
|
||||
private static loadPhotoMetadata(fullPath: string): Promise<PhotoMetadata> {
|
||||
|
||||
Reference in New Issue
Block a user