Skip to content

Commit

Permalink
support browser floorp
Browse files Browse the repository at this point in the history
  • Loading branch information
WeissP committed Dec 14, 2024
1 parent 6613b42 commit 4f74035
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions webman-core/src/browser/miner.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
mod chromium;
mod firefox;
mod floorp;
mod safari;
mod vivaldi;

Expand All @@ -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};
Expand Down Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions webman-core/src/browser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub enum Browser {
Safari,
Firefox,
Vivaldi,
Floorp,
}

#[cfg(feature = "browser")]
Expand Down

0 comments on commit 4f74035

Please sign in to comment.