Update factory code: add series type to genre (#6363)
add series type(manga/manhwa/manhua/other) thinggy to genre
This commit is contained in:
		
							parent
							
								
									1569ea29d0
								
							
						
					
					
						commit
						ad7d8f01d9
					
				@ -86,6 +86,11 @@ abstract class WPMangaReader(
 | 
			
		||||
 | 
			
		||||
        thumbnail_url = document.select(".infomanga > div[itemprop=image] img, .thumb img").attr("src")
 | 
			
		||||
        description = document.select(".desc, .entry-content[itemprop=description]").joinToString("\n") { it.text() }
 | 
			
		||||
 | 
			
		||||
        // add series type(manga/manhwa/manhua/other) thinggy to genre
 | 
			
		||||
        val type = document.select("span:contains(Type) a, .imptdt:contains(Type) a, a[href*=type\\=], .infotable tr:contains(Type) td:last-child").firstOrNull()?.ownText()
 | 
			
		||||
        genre += if (genre!!.contains(type.toString())) "" else if (!type.isNullOrEmpty() && !genre.isNullOrEmpty()) ", $type"
 | 
			
		||||
        else if (!type.isNullOrEmpty() && genre.isNullOrEmpty()) "$type" else ""
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private fun parseStatus(status: String) = when {
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,7 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
 | 
			
		||||
 | 
			
		||||
    override val themeClass = "WPMangaReader"
 | 
			
		||||
 | 
			
		||||
    override val baseVersionCode: Int = 2
 | 
			
		||||
    override val baseVersionCode: Int = 3
 | 
			
		||||
 | 
			
		||||
    override val sources = listOf(
 | 
			
		||||
            SingleLang("Hikari Scan", "https://hikariscan.com.br", "pt-BR", overrideVersionCode = 1),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user