mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Fix rare edge case where gifs get parsed as videos
This commit is contained in:
parent
8836cf51e8
commit
7ef3a4faba
2 changed files with 16 additions and 0 deletions
|
|
@ -63,6 +63,14 @@ proc cache*(video: var Video) =
|
|||
if video.videoId.len > 0:
|
||||
video.insert()
|
||||
|
||||
proc uncache*(id: int64) =
|
||||
withDb:
|
||||
try:
|
||||
var video = Video.getOne("videoId = ?", $id)
|
||||
video.delete()
|
||||
except:
|
||||
discard
|
||||
|
||||
proc getCachedVideo*(id: int64): Option[Video] =
|
||||
withDb:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue