mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Fix chapter recognition regex and detail number (#1213)
* Update basic filter for sources that include space between numbers Wasnts matching on vol. 1 ch. 10 previously so mangadex last chapter was showing volume number. * Don't show last chapter number when there are 0 chapters or chapters with no numbers. This prevents one shots from showing with -1 as last chapter and instead just leaves it blank * added else to be Unknown instead of blank * removed empty line added test case * switched to null safe ?. * Revert "switched to null safe ?." This reverts commit 97a9300d1bedc8e01efb439c180eced8eaa1da5b. undo * switched to null safe ?.
This commit is contained in:
		
				
					committed by
					
						
						Bram van de Kerkhof
					
				
			
			
				
	
			
			
			
						parent
						
							1292c0ecea
						
					
				
				
					commit
					7f90ad7847
				
			@@ -58,6 +58,17 @@ class ChapterRecognitionTest {
 | 
			
		||||
        assertThat(chapter.chapter_number).isEqualTo(4f)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Ch. xx base case but space after period
 | 
			
		||||
     */
 | 
			
		||||
    @Test fun ChCaseBase2() {
 | 
			
		||||
        createManga("Mokushiroku Alice")
 | 
			
		||||
 | 
			
		||||
        createChapter("Mokushiroku Alice Vol. 1 Ch. 4: Misrepresentation")
 | 
			
		||||
        ChapterRecognition.parseChapterNumber(chapter, manga)
 | 
			
		||||
        assertThat(chapter.chapter_number).isEqualTo(4f)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Ch.xx.x base case
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user