mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-04 22:45:02 +02:00
Free memory after extracting comic
This commit is contained in:
parent
4de65b4369
commit
9c87c3a095
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue