From 172b29e56ae91a463dd5daefc28f4acea06b3e39 Mon Sep 17 00:00:00 2001 From: DjMaestr0 Date: Tue, 18 Feb 2025 18:23:24 +0100 Subject: [PATCH 1/2] history-class e Please enter the commit message for your changes. Lines starting here is the history class --- shadowtube/history.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 shadowtube/history.py diff --git a/shadowtube/history.py b/shadowtube/history.py new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/shadowtube/history.py @@ -0,0 +1 @@ +"" -- 2.45.2 From 7abf7a939f064bce4e7777eb49293d2815ec77ff Mon Sep 17 00:00:00 2001 From: DjMaestr0 Date: Tue, 18 Feb 2025 18:29:29 +0100 Subject: [PATCH 2/2] Adding history class --- shadowtube/history.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/shadowtube/history.py b/shadowtube/history.py index a60141c..fbc2766 100644 --- a/shadowtube/history.py +++ b/shadowtube/history.py @@ -1 +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) -- 2.45.2