when getting the next chapter sorted by title, only the comparison to the current chapter is done with natsort,
the sorting of the matched chapters is done with regular sort.
so when you have the chapter titles
1 - Example
2 - Example
10 - Example
and you are on chapter 1, since both 10 and 2 are greater than 1 by natsort, they are both listed, but the list is
10 - Example
2 - Example
so 10 is picked by fetchone.
tested with 3 local CBZ files, with ComicInfo.xml containing
<?xml version="1.0" encoding="UTF-8"?>
<ComicInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/anansi-project/comicinfo/main/schema/v2.0/ComicInfo.xsd">
<Title>Example</Title>
<Number>$id</Number>
<Writer>Me</Writer>
</ComicInfo>
where $id is the chapter number for each of the archives.
after the fix, chapter 1 is followed by chapter 2 when sorting by title, as expected.