You've already forked my-video-workflow
							
							
		
			
				
	
	
		
			18 lines
		
	
	
		
			434 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			434 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from typing import Optional
 | |
| 
 | |
| from entity.File import File
 | |
| 
 | |
| 
 | |
| class VideoClip(File):
 | |
|     duration: Optional[float]
 | |
| 
 | |
|     def __init__(self, file, base_path):
 | |
|         super(VideoClip, self).__init__(file, base_path)
 | |
|         self.duration = None
 | |
| 
 | |
|     def set_duration(self, duration: Optional[float]):
 | |
|         self.duration = duration
 | |
| 
 | |
|     def evaluate_duration(self):
 | |
|         if self.duration is None or self.duration < 0:
 | |
|             ... |