mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Don't use sorting heuristic in comics with more than 1000 pages
Sorting heuristic to try to find spreads in the content of a comic is now only used for files with less than 1000 pages to avoid false positives.
This commit is contained in:
@ -1067,6 +1067,13 @@ void comic_pages_sort(QList<QString> &pageNames, YACReaderPageSortingMode sortin
|
||||
case YACReaderHeuristicSorting: {
|
||||
std::sort(pageNames.begin(), pageNames.end(), naturalSortLessThanCI);
|
||||
|
||||
// This heuristic tries to find spreads named like 1011.jpg, which means page 10 and 11 toghether in a single image file
|
||||
// if the issue has more than 1000 pages lets not use this heuristic to avoid false positives.
|
||||
// Alternativelly the heuristic could be improved but I don't think it's worth the effort.
|
||||
if (pageNames.size() >= 1000) {
|
||||
return;
|
||||
}
|
||||
|
||||
QList<QString> singlePageNames;
|
||||
QList<QString> doublePageNames;
|
||||
|
||||
|
Reference in New Issue
Block a user