Fix typo bug in scanAlbum
This commit is contained in:
parent
3c51a23a50
commit
fa063d3363
|
@ -34,6 +34,15 @@ async function _execScan(scanner, scanFunction) {
|
|||
},
|
||||
})
|
||||
|
||||
scanner.pubsub.publish(EVENT_SCANNER_PROGRESS, {
|
||||
scannerStatusUpdate: {
|
||||
progress: 0,
|
||||
finished: false,
|
||||
success: false,
|
||||
message: 'Dummy error',
|
||||
},
|
||||
})
|
||||
|
||||
console.log('Calling scan function')
|
||||
await scanFunction()
|
||||
console.log('Scan function ended')
|
||||
|
@ -52,6 +61,16 @@ async function _execScan(scanner, scanFunction) {
|
|||
} photos`,
|
||||
},
|
||||
})
|
||||
|
||||
scanner.pubsub.publish(EVENT_SCANNER_PROGRESS, {
|
||||
scannerStatusUpdate: {
|
||||
progress: 0,
|
||||
finished: false,
|
||||
success: false,
|
||||
message:
|
||||
'Another dummy error, that is very long, and wraps multiple lines. Theirefore it is longer yay',
|
||||
},
|
||||
})
|
||||
} catch (e) {
|
||||
console.error(`SCANNER ERROR: ${e.message}\n${e.stack}`)
|
||||
scanner.pubsub.publish(EVENT_SCANNER_PROGRESS, {
|
||||
|
|
|
@ -21,13 +21,15 @@ export default async function scanAlbum(scanner, album) {
|
|||
|
||||
processingImagePromises.push(
|
||||
_processImage(scanner, photo.id).catch(e => {
|
||||
console.error(`Error processing image (${e.path}): ${e.stack}`)
|
||||
console.error(
|
||||
`Error processing image (${JSON.stringify(photo)}): ${e.stack}`
|
||||
)
|
||||
scanner.pubsub.publish(EVENT_SCANNER_PROGRESS, {
|
||||
scannerStatusUpdate: {
|
||||
progress: 0,
|
||||
finished: false,
|
||||
success: false,
|
||||
message: `Error processing image at ${e.path}: ${e.message}`,
|
||||
message: `Error processing image at ${photo.path}: ${e.message}`,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue