I use an addon instead of having kodi show the data directly and it has its own problems. Sorry it took this long to reply, I guess I was too busy when I read it and forgot about it before I could reply.
Now time for some updates.
I haven't worked on it at all since last time, but I felt like giving the idea I had a few months ago to improve the detection a try and after basically 2 full days of trying to make it work as best I can, it's pretty decent now. It's still not perfect but it seems to have a higher success ratio so far and it handles some cases that were previously impossible pretty well.
For example, here's a problematic cover with the old detection:
And here it is with the new(the new is in a separate test script for easy debugging purposes so the vertical pink lines indicates the detected left and right sides of the cover spine instead of being properly separated):
It tries to identify the spine first by checking for horizontal lines(the green ones were detected) and then look for likely edges for both sides of the spine, indicated by the pink lines.
It does fail very rarely where the old detection succeeded, but I still have to tweak so things and the possibility of one method falling back on the other when failure is detected is an option.
This should mean I'll try to implement a few of the missing things as well as adding this soon, if I don't get side-tracked with something else.