Show URL when title is missing during pull

git-svn-id: file:///srv/svn/repo/kosuzu/trunk@28 eb64cd80-c68d-6f47-b6a3-0ada418499da
This commit is contained in:
fox
2022-11-17 19:56:15 +00:00
parent 8a24b3430a
commit e38a6d644c

View File

@@ -105,7 +105,8 @@ let pull_index url authors_opt topics_opt =
authors = (match authors_opt with Some s -> Person.Set.of_string s | None -> Person.Set.empty);
topics =( match topics_opt with Some s -> String_set.of_string s | None -> String_set.empty);
} in
let print = printers (string_of_int @@ Logarion.Header_pack.numof_texts pk) pk.info.title dir in
let name = match pk.info.title with "" -> url | title -> title in
let print = printers (string_of_int @@ Logarion.Header_pack.numof_texts pk) name dir in
try Logarion.Header_pack.iteri (per_text url dir filter print) pk; print_newline (); true
with Invalid_argument msg -> Printf.eprintf "\nFailed to parse %s: %s\n%!" url msg; false