Explicitly don't support 'model3d' cards

Fixes #597
This commit is contained in:
Zed 2022-11-27 18:18:51 +01:00
parent 9bae009bbc
commit d923c20aa6
2 changed files with 4 additions and 1 deletions

View file

@ -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)

View file

@ -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