summaryrefslogtreecommitdiff
path: root/lib/render/emit_ics.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/render/emit_ics.ml')
-rw-r--r--lib/render/emit_ics.ml12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/render/emit_ics.ml b/lib/render/emit_ics.ml
index 41efb95..4e06eae 100644
--- a/lib/render/emit_ics.ml
+++ b/lib/render/emit_ics.ml
@@ -55,14 +55,10 @@ let line b l = Buffer.add_string b (Escape.fold_ics l)
let event b ~rite ~dtstamp d =
let iso = s d "iso" in
if iso <> "" then begin
- let name =
- match get d "name" with
- | Some (T.Obj kvs) -> (
- match List.assoc_opt "en" kvs with
- | Some (T.Str x) when x <> "" -> x
- | _ -> ( match List.assoc_opt "la" kvs with Some (T.Str x) -> x | _ -> s d "slug"))
- | _ -> s d "slug"
- in
+ (* [name] is the view's own resolved display string (view.ml) -- no
+ further fallback needed here: under [Lang.raw] it already equals
+ [slug], which is what a miss used to require picking by hand. *)
+ let name = s d "name" in
let summary = Printf.sprintf "%s (%s, %s)" name (s d "rank") (s d "colour") in
let desc =
String.concat "\n"