Add check

This commit is contained in:
2020-10-03 18:10:37 +03:00
parent 82d3366b80
commit c84a4e4e5f

View File

@@ -61,6 +61,12 @@ function processAlbum(folderName: string) {
} }
}); });
if (parsedData['coverFileName']) {
if (!photos.includes(parsedData['coverFileName'])) {
console.error(red(`Error: Cover file ${albumPath}/photos/${parsedData['coverFileName']} does not exists!`));
}
}
if (parsedData['photoDescription']) { if (parsedData['photoDescription']) {
Object.keys(parsedData['photoDescription']).forEach(item => { Object.keys(parsedData['photoDescription']).forEach(item => {
if (!photos.includes(item)) { if (!photos.includes(item)) {