|  |  |  | @ -68,10 +68,12 @@ class CheckSourceService : BaseService() { | 
			
		
	
		
			
				
					|  |  |  |  |         synchronized(this) { | 
			
		
	
		
			
				
					|  |  |  |  |             processIndex++ | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         execute { | 
			
		
	
		
			
				
					|  |  |  |  |             if (processIndex < allIds.size) { | 
			
		
	
		
			
				
					|  |  |  |  |                 val sourceUrl = allIds[processIndex] | 
			
		
	
		
			
				
					|  |  |  |  |                 App.db.bookSourceDao().getBookSource(sourceUrl)?.let { source -> | 
			
		
	
		
			
				
					|  |  |  |  |                     check(source) | 
			
		
	
		
			
				
					|  |  |  |  |                 } ?: onNext(sourceUrl) | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  |  | @ -83,18 +85,22 @@ class CheckSourceService : BaseService() { | 
			
		
	
		
			
				
					|  |  |  |  |                 source.addGroup("失效") | 
			
		
	
		
			
				
					|  |  |  |  |                 App.db.bookSourceDao().update(source) | 
			
		
	
		
			
				
					|  |  |  |  |             }.onFinally(IO) { | 
			
		
	
		
			
				
					|  |  |  |  |                 onNext(source.bookSourceUrl) | 
			
		
	
		
			
				
					|  |  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     private fun onNext(sourceUrl: String) { | 
			
		
	
		
			
				
					|  |  |  |  |         synchronized(this) { | 
			
		
	
		
			
				
					|  |  |  |  |             check() | 
			
		
	
		
			
				
					|  |  |  |  |                 checkedIds.add(source.bookSourceUrl) | 
			
		
	
		
			
				
					|  |  |  |  |             checkedIds.add(sourceUrl) | 
			
		
	
		
			
				
					|  |  |  |  |             updateNotification( | 
			
		
	
		
			
				
					|  |  |  |  |                 checkedIds.size, | 
			
		
	
		
			
				
					|  |  |  |  |                 getString(R.string.progress_show, checkedIds.size, allIds.size) | 
			
		
	
		
			
				
					|  |  |  |  |             ) | 
			
		
	
		
			
				
					|  |  |  |  |                 synchronized(this) { | 
			
		
	
		
			
				
					|  |  |  |  |             if (processIndex >= allIds.size + threadCount - 1) { | 
			
		
	
		
			
				
					|  |  |  |  |                 stopSelf() | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     /** | 
			
		
	
	
		
			
				
					|  |  |  | 
 |