Add:Scanner extracts cover from comic files #1837 and ComicInfo.xml parser

This commit is contained in:
advplyr 2024-01-14 17:51:26 -06:00
parent e76af3bfc2
commit f5545cd3f4
10 changed files with 762 additions and 4 deletions

View file

@ -60,10 +60,11 @@ module.exports.extractCoverImage = extractCoverImage
/**
* Parse metadata from epub
*
* @param {string} epubPath
* @param {import('../../models/Book').EBookFileObject} ebookFile
* @returns {Promise<import('./parseEbookMetadata').EBookFileScanData>}
*/
async function parse(epubPath) {
async function parse(ebookFile) {
const epubPath = ebookFile.metadata.path
Logger.debug(`Parsing metadata from epub at "${epubPath}"`)
// Entrypoint of the epub that contains the filepath to the package document (opf file)
const containerJson = await extractXmlToJson(epubPath, 'META-INF/container.xml')