🐛 bugs
This commit is contained in:
@@ -17,7 +17,6 @@ export const greet = async (
|
||||
};
|
||||
const fileObjects = await walkFolder("./comics");
|
||||
_.map(fileObjects, async (fileObject) => {
|
||||
console.log(fileObject);
|
||||
if (SUPPORTED_COMIC_ARCHIVES.includes(fileObject.extension)) {
|
||||
console.log({ ...targetOptions, folderDetails: fileObject });
|
||||
await extractCoverFromComicBookArchive({
|
||||
|
||||
@@ -14,8 +14,8 @@ router.route("/getComicCovers").post(async (req: Request, res: Response) => {
|
||||
typeof req.body.extractionOptions === "object"
|
||||
? req.body.extractionOptions
|
||||
: {};
|
||||
console.log(req.body)
|
||||
const extractedData = await extractArchive(req.body.extractionOptions);
|
||||
console.log("ASDASDASDASDASD", req.body)
|
||||
const extractedData = await extractArchive(req.body);
|
||||
// const foo = await extractMetadataFromImage(
|
||||
// "./comics/covers/Ghosts and Ruins-001.jpg",
|
||||
// );
|
||||
|
||||
@@ -42,6 +42,7 @@ export const unrar = async (
|
||||
const extractor = await unrarer.createExtractorFromData({ data: fileBuffer });
|
||||
switch (extractionOptions.extractTarget) {
|
||||
case "cover":
|
||||
debugger;
|
||||
const list = extractor.getFileList();
|
||||
const fileHeaders = [...list.fileHeaders];
|
||||
const file = extractor.extract({ files: [fileHeaders[0].name] });
|
||||
@@ -69,6 +70,7 @@ export const unrar = async (
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
|
||||
case "all":
|
||||
const files = extractor.extract({});
|
||||
const extractedFiles = [...files.files];
|
||||
@@ -172,7 +174,6 @@ export const extractArchive = async (
|
||||
| IExtractedComicBookCoverFile[]
|
||||
| IExtractComicBookCoverErrorResponse
|
||||
> => {
|
||||
console.log(extractionOptions);
|
||||
switch (extractionOptions.folderDetails.extension) {
|
||||
case ".cbz":
|
||||
return await unzip(extractionOptions);
|
||||
|
||||
Reference in New Issue
Block a user