mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Free memory after extracting comic
This commit is contained in:
parent
4de65b4369
commit
9c87c3a095
@ -50,6 +50,9 @@ async function extractCoverImage(comicPath, comicImageFilepath, outputCoverPath)
|
||||
} catch (error) {
|
||||
Logger.error(`[parseComicMetadata] Failed to extract image from comicPath "${comicPath}"`, error)
|
||||
return false
|
||||
} finally {
|
||||
// Ensure we free the memory
|
||||
archive.close()
|
||||
}
|
||||
}
|
||||
module.exports.extractCoverImage = extractCoverImage
|
||||
@ -104,6 +107,9 @@ async function parse(ebookFile) {
|
||||
Logger.warn(`Cover image not found in comic at "${comicPath}"`)
|
||||
}
|
||||
|
||||
// Ensure we close the archive to free memory
|
||||
archive.close()
|
||||
|
||||
return payload
|
||||
}
|
||||
module.exports.parse = parse
|
||||
|
Loading…
Reference in New Issue
Block a user