Albirew/tachiyomi
Archivé
1
0
Bifurcation 0

Fixed wrong chapter recognition for S0 - Chapter 00 (#499)

Cette révision appartient à :
Bram van de Kerkhof 2016-10-20 16:28:25 +02:00 révisé par GitHub
Parent c9e1e6e020
révision 4f5518bdd8
2 fichiers modifiés avec 12 ajouts et 1 suppressions

Voir le fichier

@ -29,7 +29,7 @@ object ChapterRecognition {
* Regex used to remove unwanted tags
* Example Prison School 12 v.1 vol004 version1243 volume64 -R> Prison School 12
*/
private val unwanted = Regex("""(?:(v|ver|vol|version|volume|season).?[0-9]+)""")
private val unwanted = Regex("""(?:(v|ver|vol|version|volume|season|s).?[0-9]+)""")
/**
* Regex used to remove unwanted whitespace

Voir le fichier

@ -429,4 +429,15 @@ class ChapterRecognitionTest {
assertThat(chapter.chapter_number).isEqualTo(7f)
}
/**
* Test for chapters in format sx - chapter xx
*/
@Test fun chapterContainingSeasonCase2() {
createManga("The Gamer")
createChapter("S3 - Chapter 20")
ChapterRecognition.parseChapterNumber(chapter, manga)
assertThat(chapter.chapter_number).isEqualTo(20f)
}
}