mirror of
				https://github.com/devine-dl/devine.git
				synced 2025-11-04 03:44:49 +00:00 
			
		
		
		
	Add a total elapsed timer to the final log of dl command
This commit is contained in:
		
							parent
							
								
									09d6c4e1c3
								
							
						
					
					
						commit
						4a5aebbca7
					
				@ -266,6 +266,8 @@ class dl:
 | 
			
		||||
        *_: Any,
 | 
			
		||||
        **__: Any
 | 
			
		||||
    ) -> None:
 | 
			
		||||
        start_time = time.time()
 | 
			
		||||
 | 
			
		||||
        if cdm_only is None:
 | 
			
		||||
            vaults_only = None
 | 
			
		||||
        else:
 | 
			
		||||
@ -490,7 +492,14 @@ class dl:
 | 
			
		||||
                    cookie_jar.set_cookie(cookie)
 | 
			
		||||
                cookie_jar.save(ignore_discard=True)
 | 
			
		||||
 | 
			
		||||
        console.log("Processed all titles!")
 | 
			
		||||
        minutes, seconds = divmod(int(time.time() - start_time), 60)
 | 
			
		||||
        hours, minutes = divmod(minutes, 60)
 | 
			
		||||
        time_string = (f"{hours:d}h" if hours else "") + f"{minutes:d}m{seconds:d}s"
 | 
			
		||||
 | 
			
		||||
        console.log(Padding(
 | 
			
		||||
            f"Processed all titles in [progress.elapsed]{time_string}",
 | 
			
		||||
            (0, 0, 1, 0)
 | 
			
		||||
        ))
 | 
			
		||||
 | 
			
		||||
    def prepare_drm(
 | 
			
		||||
        self,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user