mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-26 02:57:50 +02:00
fallback to parsing parts to handle arc numbers
This commit is contained in:
@ -94,6 +94,19 @@ public class ChapterRecognition {
|
||||
|
||||
// TODO more checks (maybe levenshtein?)
|
||||
|
||||
// try splitting the name in parts an pick the first valid one
|
||||
String[] nameParts = chapter.name.split("-");
|
||||
if (nameParts.length > 1) {
|
||||
Chapter dummyChapter = Chapter.create();
|
||||
for (String part : nameParts) {
|
||||
dummyChapter.name = part;
|
||||
parseChapterNumber(dummyChapter, manga);
|
||||
if (dummyChapter.chapter_number >= 0) {
|
||||
chapter.chapter_number = dummyChapter.chapter_number;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user