Merge pull request 'Added separate History class' (#5) from history-class into main
Reviewed-on: #5
This commit is contained in:
commit
0dc358d053
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)
|
Loading…
Reference in New Issue
Block a user