Open winterborn opened 1 year ago
I second this. Komga can't find a poster automatically, it would be nice if it could export the jpg too.
I may see if I can take a crack at doing this... I will need to check my availability over the next few weeks, but I'll see what I can do for sure.
If you want to contribute, I have some suggestions/guidance:
os.path
and shutil
do most of the work) and should have proper error handling and safety measures built-in (especially if you're going to delete files).Suggestions for how to implement this:
volume_id
is a required parameter and file
is optional, if you want to only process a specific file instead of the whole volume.file
is supplied, it's just a list with that but otherwise a list with all files of the volume.The general structure of the implementation is similar to how unzipping is implemented, so you can check that out.
Made some initial research progress on this...
It turns out that in order to generate a series.json
file for Komga to read properly, the formatting has to be very strict, as per Mylar's guidelines:
Example: Print series with Continuing Status
{
"metadata": {
"type": "comicSeries",
"publisher": "DC Comics",
"imprint": null,
"name": "Batman/Fortnite: Zero Point",
"comicid": 135499,
"year": 2021,
"description_text": "Six issue crossover mini-series",
"description_formatted": null,
"volume": null,
"booktype": "Print",
"collects": null,
"ComicImage": "https://comicvine.gamespot.com/a/uploads/scale_large/6/67663/7921530-01.jpg",
"total_issues": 1,
"publication_run": "June 2021 - Present",
"status": "Continuing"
}
}
I have experimented locally to see if my custom series.json
files are properly picked up by Komga, which they are, but the metadata is quite limited... It does not seem to properly pass on information about specific issues, or include artist names, colourists, writers etc.
The alternative, is to make use of an embedded ComicInfo.xml
, which I believe Mylar achieves through their Comictagger functionality.
Will need to do further investigation to see how this works and what could be ported to Kapowarr... it certainly seems like the better way to do it, grabbing more, rich metadata than the series.json
can handle...
Just a heads up:
You'll have to map the generated metadata files to the volume so that they're handled correctly. However, there is no way to map files to the volume in general without mapping it to issues. That's going to be a problem for you because metadata and cover files are exactly that. I'm going to fix that in issue #79.
It's advised to wait with mapping these metadata files until I've fixed that issue, so that you can make use of it.
When a new series is added to the user's library, a series.json or ComicInfo.xml file should be generated for use in Komga to provide additional metadata about the comics. This would be useful if the book itself does not have this metadata embedded.
Currently, if a specific book does not have metadata embedded nor an external metadata file, no additional metadata for the series / volume / arc etc is shown in Komga.