Compare commits
	
		
			8 Commits
		
	
	
		
			8f802ed046
			...
			Video_clas
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| f8e1012f3e | |||
| a3c5b350fc | |||
| 0dc358d053 | |||
| 0279f667b3 | |||
| 
						 | 
					7abf7a939f | ||
| 
						 | 
					172b29e56a | ||
| 0a5e98f417 | |||
| bdcaf3747b | 
							
								
								
									
										1119
									
								
								design/design.gaphor
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1119
									
								
								design/design.gaphor
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										18
									
								
								shadowtube/history.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								shadowtube/history.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
class History: #Abstract class
 | 
			
		||||
    def __init__(self, filename):
 | 
			
		||||
        self.history = list() 
 | 
			
		||||
        
 | 
			
		||||
    def __size__(self):
 | 
			
		||||
        return len(history)
 | 
			
		||||
        
 | 
			
		||||
    def parse_history(self, filename):
 | 
			
		||||
        return history
 | 
			
		||||
 | 
			
		||||
    def is_this_type(self, filename): # bool function, 
 | 
			
		||||
        return false                  # returns false if Youtube history
 | 
			
		||||
 | 
			
		||||
    def get_video(self, index):
 | 
			
		||||
        return history[index]
 | 
			
		||||
 | 
			
		||||
    def __iter__(self):
 | 
			
		||||
        return iter(history)
 | 
			
		||||
							
								
								
									
										34
									
								
								shadowtube/types.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								shadowtube/types.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
			
		||||
class Video:
 | 
			
		||||
    def __init__(
 | 
			
		||||
        self,
 | 
			
		||||
        id: str,
 | 
			
		||||
        title: str,
 | 
			
		||||
        description: str,
 | 
			
		||||
        watch_time: float,
 | 
			
		||||
        watch_progress: float,
 | 
			
		||||
    ):
 | 
			
		||||
        self._id = id
 | 
			
		||||
        self._title = title
 | 
			
		||||
        self._description = description
 | 
			
		||||
        self._watch_time = watch_time
 | 
			
		||||
        self._watch_progress = watch_progress
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def title(self):
 | 
			
		||||
        return self._title
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def id(self):
 | 
			
		||||
        return self._id
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def description(self):
 | 
			
		||||
        return self._description
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def watch_time(self):
 | 
			
		||||
        return self._watch_time
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def watch_progress(self):
 | 
			
		||||
        return self._watch_progress
 | 
			
		||||
		Reference in New Issue
	
	Block a user