mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-22 23:55:30 +00:00
parent
9bae009bbc
commit
d923c20aa6
|
@ -66,6 +66,8 @@ proc parseMedia(component: Component; card: UnifiedCard; result: var Card) =
|
|||
durationMs: videoInfo.durationMillis,
|
||||
variants: videoInfo.variants
|
||||
)
|
||||
of model3d:
|
||||
result.title = "Unsupported 3D model ad"
|
||||
|
||||
proc parseUnifiedCard*(json: string): Card =
|
||||
let card = json.fromJson(UnifiedCard)
|
||||
|
|
|
@ -48,7 +48,7 @@ type
|
|||
vanity*: string
|
||||
|
||||
MediaType* = enum
|
||||
photo, video
|
||||
photo, video, model3d
|
||||
|
||||
MediaEntity* = object
|
||||
kind*: MediaType
|
||||
|
@ -102,4 +102,5 @@ proc enumHook*(s: string; v: var MediaType) =
|
|||
v = case s
|
||||
of "video": video
|
||||
of "photo": photo
|
||||
of "model3d": model3d
|
||||
else: echo "ERROR: Unknown enum value (MediaType): ", s; photo
|
||||
|
|
Loading…
Reference in a new issue