komf icon indicating copy to clipboard operation
komf copied to clipboard

[ComicVine] Match series with ID extracted from title or folder

Open matt1432 opened this issue 7 months ago • 3 comments

I've been working on automating the downloading and metadata tagging of comic books and since I can automatically add the Comicvine ID of volumes to their folder name, I thought it would be nice for Komf to pick that up and match the metadata directly with the Comicvine ID.

To achieve this, I've added the config setting comicVineIdFormat that when set, will try to find the ComicVine ID in he folder name or series title if not found in the folder name, according to the value set.

For example, I would set the value to "[cv-{id}]", which would be converted to the following RegExp: /\Q[cv-\E(?<id>\d+)\Q]\E/, and then tested against a series' folder name.

I also added the config setting comicVineIssueName that when set, will replace a null issue.name with the value set and "{number}" replaced with the corresponding issue number.

The added bookNumberRegexes are to help with the previous point.


Pre-Edit

This is my first time doing anything in Kotlin so I'm sorry if the code is really bad but this PR is mainly a feature request if you are interested in supporting my use case.

I've been working on automating the downloading and metadata tagging of comic books and since I can automatically add the Comicvine ID of volumes to their folder name, I thought it would be nice for Komf to pick that up and match the metadata directly with the Comicvine ID.

As you can see in the code I added, I'm looking at the title of a given series to check for [CV=<some-id>] and parse <some-id> to then use client.getVolume instead of client.searchVolume.

I was also thinking this could be a config setting where a user would have to enable idParsing or something along those lines and then set the idParsingRegex so it would be configurable instead of hardcoded like I did here.

I wrote this code myself just to have a working prototype for my own collection and it's been working very well.

matt1432 avatar May 15 '25 14:05 matt1432

Hey! This sounds awesome, is this still working fine for you?

ThoughtzThruKeyz avatar Aug 25 '25 00:08 ThoughtzThruKeyz

Hey! This sounds awesome, is this still working fine for you?

Yes, I've been running my personal branch for a while without issues: https://github.com/matt1432/komf/tree/personal

matt1432 avatar Aug 25 '25 02:08 matt1432

Awesome! So does the workflow itself change at all?

ThoughtzThruKeyz avatar Aug 27 '25 07:08 ThoughtzThruKeyz