This commit is contained in:
parent
dc4fb4079e
commit
2e7b192ce1
2 changed files with 12 additions and 6 deletions
|
@ -286,6 +286,12 @@ pub async fn index_path(dom: &Domain, path: &str) {
|
|||
|
||||
if is_doc {
|
||||
let doc = dom.path(next_path.path());
|
||||
log::info!(
|
||||
"Indexing {} / {} [{} queued]",
|
||||
doc.domain,
|
||||
doc.path,
|
||||
queue.len()
|
||||
);
|
||||
index_document(&doc).await;
|
||||
}
|
||||
|
||||
|
@ -312,6 +318,9 @@ pub async fn index_document(doc: &Document) {
|
|||
|
||||
for (mime, data) in extract_data_urls(&String::from_utf8_lossy(&content)) {
|
||||
let hash = sha256_hash(&data);
|
||||
|
||||
println!("{} / {}: Indexing fragment {hash}", doc.domain, doc.path);
|
||||
|
||||
hashes.push(hash.clone());
|
||||
sqlx::query("INSERT INTO fragments (id, mime, blob) VALUES ($1, $2, $3) ON CONFLICT DO NOTHING")
|
||||
.bind(&hash)
|
||||
|
|
|
@ -207,10 +207,7 @@ pub fn get_shell() -> Shell {
|
|||
.push(
|
||||
Link(
|
||||
"/mime",
|
||||
Row(vec![
|
||||
MaterialIcon("description"),
|
||||
Text("Media Documents").render(),
|
||||
])
|
||||
Row(vec![MaterialIcon("description"), Text("Media").render()])
|
||||
.full_center()
|
||||
.gap(ScreenValue::_2),
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue