This commit is contained in:
Marc Beninca 2025-03-18 21:09:38 +01:00
parent f180a07564
commit 35ab34c67d
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -81,14 +81,13 @@ class Video(Object):
self.title = d["title"] self.title = d["title"]
self.description_cut = d["description"] self.description_cut = d["description"]
self.duration = int(d["duration"]) self.duration = int(d["duration"])
self.thumbnails = [thumbnail["url"] for thumbnail in d["thumbnails"]] self.thumbnail = d["thumbnails"][-1]["url"]
self.thumbnail = self.thumbnails[-1]
def load_extra(self): def load_extra(self):
self.at = datetime.now().strftime(TIMESTAMP) self.at = datetime.now().strftime(TIMESTAMP)
d = extract_video(self.uid) d = extract_video(self.uid)
# TODO formats # TODO formats
# TODO thumbnail from thumbnails thumbnail = d["thumbnails"][-1]["url"]
# TODO compare existing thumbnail # TODO compare existing thumbnail
self.description = d["description"] self.description = d["description"]
# TODO channel_id # TODO channel_id