Kareadita / Kavita

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
http://www.kavitareader.com
GNU General Public License v3.0
6.37k stars 331 forks source link

[Bug] Ampersand Encoding Issue Prevents Kavita from Recognizing Rocket Raccoon & Groot in CBL Reading List #3301

Open FishCB opened 3 weeks ago

FishCB commented 3 weeks ago

What happened?

I'm using Kavita to read comics and have a problem with a CBL reading list for "Civil War II" taken from the DieselTech CBL-ReadingLists repository. Kavita does not recognize certain comics in my library, specifically "Rocket Raccoon & Groot," even though the files are present and can be read manually.

It seems the issue is related to an encoding mismatch between the CBL file and the ComicInfo.xml metadata. The CBL file uses & to represent the ampersand in Rocket Raccoon & Groot, while the ComicInfo.xml file uses &.

Steps to reproduce:

  1. Import a CBL reading list (for example, the Civil War II (LoCG) reading list from DieselTech: https://github.com/DieselTech/CBL-ReadingLists).
  2. Ensure that "Rocket Raccoon & Groot" comics are present in the library.
  3. Observe that Kavita does not recognize these comics, despite them being correctly tagged (commictagger) and present in the library.
  4. Enable/disable ComicVine matching on import and test again (both configurations produce the same issue).

Expected: Kavita should match the comic and display it correctly in the reading list, regardless of whether the ampersand is encoded as & or &.

Current behaviour: Kavita does not recognize the comics from the reading list and marks them as missing. The files can still be accessed and read manually, but they do not appear as available in the reading list.

Here is an example of the relevant sections of the CBL file and ComicInfo.xml: CBL entry:

ComicInfo XML:

Thanks to the Kavita team for the support so far and for looking into this issue!

Screenshot 2024-10-22 193950 Screenshot 2024-10-22 194043 Screenshot 2024-10-22 194307 Screenshot 2024-10-23 101309 Screenshot 2024-10-23 103937

What did you expect?

Expected: Kavita should match the comic and display it correctly in the reading list, regardless of whether the ampersand is encoded as & or &.

Kavita Version Number - If you don not see your version number listed, please update Kavita and see if your issue still persists.

0.8.3 - Stable

What operating system is Kavita being hosted from?

Linux

If the issue is being seen on Desktop, what OS are you running where you see the issue?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

No response

If the issue is being seen on Mobile, what OS are you running where you see the issue?

None

If the issue is being seen on the Mobile UI, what browsers are you seeing the problem on?

No response

Relevant log output

No response

Additional Notes

Aditional info:


- Tested with and without ComicVine matching enabled.
- Using the version of Kavita 0.8.3.
- The issue seems to be caused by literal string matching between the CBL and the ComicInfo.xml.
- Discussion about the issue on Discord: https://discord.com/channels/821879810934439936/840693141082341406/1298461092086939649
majora2007 commented 5 days ago

First, I can confirm that the & does get read in correctly: image

I was able to get it working. I have a Comic Vine library, Rocket Raccoon & Groot (2015)/Rocket Raccoon & Groot #9 (2015).cbz

<?xml version="1.0"?>
<ComicInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Series>Rocket Raccoon & Groot</Series>
  <Number>9</Number>
  <Volume>2015</Volume>
</ComicInfo>