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