Compare commits

..

No commits in common. "166712515df699f3f53cf9331867d4238d15814c" and "782ab1783d7c9d005819f646cba9b618373a3943" have entirely different histories.

3 changed files with 11 additions and 1199 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,36 +1,18 @@
import json
class History: #Abstract class class History: #Abstract class
def __init__(self, filename: str): def __init__(self, filename):
#self.history = list() self.history = list()
pass
def __size__(self): def __size__(self):
pass return len(history)
def parse_history(self, filename):
return history
@staticmethod def is_this_type(self, filename): # bool function,
def parse_history(self, filename: str): return false # returns false if Youtube history
parsed_data = []
with open(filename, "r", encoding="utf-8") as file: def get_video(self, index):
for line in file: return history[index]
line = line.strip()
if not line:
continue
try:
parsed_data.append(json.loads(line))
except json.JSONDecodeError:
fixed_line = fix_unquoted_values(line)
parsed_data.append(json.loads(fixed_line))
return parsed_data
def is_this_type(self, filename: str): # bool function,
pass # returns false if Youtube history
def get_video(self, index: int):
pass
def __iter__(self): def __iter__(self):
pass return iter(history)

View File

@ -1,51 +0,0 @@
#
# Copyright (c) 2025 Fedir Kovalov.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
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