| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -7,6 +7,7 @@ import io.legado.app.constant.BookType | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import io.legado.app.data.entities.BookSource | 
					 | 
					 | 
					 | 
					import io.legado.app.data.entities.BookSource | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import io.legado.app.data.entities.rule.* | 
					 | 
					 | 
					 | 
					import io.legado.app.data.entities.rule.* | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import io.legado.app.utils.* | 
					 | 
					 | 
					 | 
					import io.legado.app.utils.* | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					import splitties.init.appCtx | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import timber.log.Timber | 
					 | 
					 | 
					 | 
					import timber.log.Timber | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import java.util.regex.Pattern | 
					 | 
					 | 
					 | 
					import java.util.regex.Pattern | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -17,11 +18,13 @@ object SourceAnalyzer { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    fun jsonToBookSources(json: String): List<BookSource> { | 
					 | 
					 | 
					 | 
					    fun jsonToBookSources(json: String): List<BookSource> { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        val bookSources = mutableListOf<BookSource>() | 
					 | 
					 | 
					 | 
					        val bookSources = mutableListOf<BookSource>() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        val items: List<Map<String, Any>> = jsonPath.parse(json).read("$") | 
					 | 
					 | 
					 | 
					        if (json.isJsonArray()) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        for (item in items) { | 
					 | 
					 | 
					 | 
					            val items: List<Map<String, Any>> = jsonPath.parse(json).read("$") | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            val jsonItem = jsonPath.parse(item) | 
					 | 
					 | 
					 | 
					            for (item in items) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            jsonToBookSource(jsonItem.jsonString())?.let { | 
					 | 
					 | 
					 | 
					                val jsonItem = jsonPath.parse(item) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                bookSources.add(it) | 
					 | 
					 | 
					 | 
					                jsonToBookSource(jsonItem.jsonString())?.let { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    bookSources.add(it) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return bookSources | 
					 | 
					 | 
					 | 
					        return bookSources | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |