Add functional bundling of ComicInfo File with static test name

This commit is contained in:
Neshura 2023-11-15 23:59:50 +01:00
parent b5812fa32c
commit 25ef82cf2d
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
4 changed files with 368 additions and 5 deletions

View file

@ -97,6 +97,17 @@
}
console.log(metadata);
if (bundleDirectory != "") {
let savePath = saveDirectory;
if (saveDirectory.endsWith("/")) {
savePath += "test.cbz";
}
else {
savePath += "/test.cbz";
}
let comicInfoPath = await invoke("save", { metadata: metadata, path: tempDirPath});
let bundlePath = await invoke("save_bundle", { bundleDir: bundleDirectory, metadataFilePath: comicInfoPath, savePath: savePath })
returnMessage = "Saved '" + metadata.title + "' bundled to '" + bundlePath + "'";
}
else {
let comicInfoPath = await invoke("save", { message: metadata, path: saveDirectory })