From 4f74035bf39179baba4d869dd09df9281921c91e Mon Sep 17 00:00:00 2001 From: weiss Date: Sat, 14 Dec 2024 17:19:09 +0100 Subject: [PATCH] support browser floorp --- webman-core/src/browser/miner.rs | 9 +++++++++ webman-core/src/browser/mod.rs | 1 + 2 files changed, 10 insertions(+) diff --git a/webman-core/src/browser/miner.rs b/webman-core/src/browser/miner.rs index 131d652..26cd9e0 100644 --- a/webman-core/src/browser/miner.rs +++ b/webman-core/src/browser/miner.rs @@ -1,5 +1,6 @@ mod chromium; mod firefox; +mod floorp; mod safari; mod vivaldi; @@ -9,6 +10,7 @@ use super::Browser; use crate::{url::Url, web::resp::UrlInsert, ToOk}; use anyhow::{Context, Result}; use chrono::NaiveDateTime; +use floorp::Floorp; use log::info; use rusqlite::{types::FromSql, Connection, OpenFlags, ToSql}; use serde::{Deserialize, Serialize}; @@ -65,6 +67,13 @@ impl BrowserSetting { })?; Firefox.mine_urls(&conn, since) } + Browser::Floorp => { + let fl = Floorp::default(); + let conn = fl.establish_connection(&loc).with_context(|| { + format!("could not connect to {:?} browser db", self.browser) + })?; + fl.mine_urls(&conn, since) + } }?; if urls.is_empty() { info!("no new urls found"); diff --git a/webman-core/src/browser/mod.rs b/webman-core/src/browser/mod.rs index 9fb50e0..f7668a4 100644 --- a/webman-core/src/browser/mod.rs +++ b/webman-core/src/browser/mod.rs @@ -18,6 +18,7 @@ pub enum Browser { Safari, Firefox, Vivaldi, + Floorp, } #[cfg(feature = "browser")]