quick fix
Marco Andronaco andronacomarco@gmail.com
Thu, 24 Aug 2023 11:35:30 +0200
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
fxyoutube/db.py
→
fxyoutube/db.py
@@ -22,6 +22,10 @@ url = TextField()
timestamp = DateTimeField(default=datetime.now) def cache_video(info): + try: + Video.delete().where(Video.id == info["id"]).execute() + except DoesNotExist: + pass return Video.create(**info) def get_video_from_cache(video):