Bato.to: Fix page list (#850)
* Bato.to: Fix page list * Remove overengineering
This commit is contained in:
		
							parent
							
								
									0ca16707e2
								
							
						
					
					
						commit
						a200ab1081
					
				@ -1,7 +1,7 @@
 | 
			
		||||
ext {
 | 
			
		||||
    extName = 'Bato.to'
 | 
			
		||||
    extClass = '.BatoToFactory'
 | 
			
		||||
    extVersionCode = 34
 | 
			
		||||
    extVersionCode = 35
 | 
			
		||||
    isNsfw = true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -468,8 +468,15 @@ open class BatoTo(
 | 
			
		||||
        val imgAccListString = CryptoAES.decrypt(batoWord.removeSurrounding("\""), evaluatedPass)
 | 
			
		||||
        val imgAccList = json.parseToJsonElement(imgAccListString).jsonArray.map { it.jsonPrimitive.content }
 | 
			
		||||
 | 
			
		||||
        return imageUrls.zip(imgAccList).mapIndexed { i, (imgUrl, imgAcc) ->
 | 
			
		||||
            Page(i, imageUrl = "$imgUrl?$imgAcc")
 | 
			
		||||
        return imageUrls.mapIndexed { i, it ->
 | 
			
		||||
            val acc = imgAccList.getOrNull(i)
 | 
			
		||||
            val url = if (acc != null) {
 | 
			
		||||
                "$it?$acc"
 | 
			
		||||
            } else {
 | 
			
		||||
                it
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Page(i, imageUrl = url)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user