mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Show overlay for unavailable videos
This commit is contained in:
parent
8b31f58998
commit
728a335f2c
4 changed files with 23 additions and 6 deletions
|
|
@ -170,12 +170,14 @@ proc parseVideo*(node: JsonNode; tweetId: string): Video =
|
|||
durationMs: track["durationMs"].to(int),
|
||||
views: track["viewCount"].to(string),
|
||||
url: track["playbackUrl"].to(string),
|
||||
available: track{"mediaAvailability"}["status"].to(string) == "available")
|
||||
available: track{"mediaAvailability"}["status"].to(string) == "available",
|
||||
reason: track{"mediaAvailability"}["reason"].to(string))
|
||||
of "vmap":
|
||||
result = Video(
|
||||
playbackType: vmap,
|
||||
durationMs: track["durationMs"].to(int),
|
||||
url: track["vmapUrl"].to(string))
|
||||
url: track["vmapUrl"].to(string),
|
||||
available: true)
|
||||
else:
|
||||
echo "Can't parse video of type ", cType
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue