Renamed hammond-data/src/dbcheckup.rs into utils.rs
This commit is contained in:
parent
e2403255cf
commit
3c6176b1c0
@ -23,7 +23,7 @@ extern crate rss;
|
||||
extern crate xdg;
|
||||
|
||||
pub mod dbqueries;
|
||||
pub mod dbcheckup;
|
||||
pub mod utils;
|
||||
pub mod models;
|
||||
pub mod index_feed;
|
||||
pub mod errors;
|
||||
|
||||
@ -88,7 +88,7 @@ pub fn set_played_now(db: &Database, ep: &mut Episode) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn run(db: &Database) -> Result<()> {
|
||||
pub fn checkup(db: &Database) -> Result<()> {
|
||||
download_checker(db)?;
|
||||
played_cleaner(db)?;
|
||||
Ok(())
|
||||
@ -16,7 +16,7 @@ extern crate open;
|
||||
|
||||
// use rayon::prelude::*;
|
||||
use log::LogLevel;
|
||||
use hammond_data::dbcheckup;
|
||||
use hammond_data::utils::checkup;
|
||||
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
@ -83,10 +83,10 @@ fn build_ui(app: >k::Application) {
|
||||
});
|
||||
app.add_action(&quit);
|
||||
|
||||
// Setup the dbcheckup in the app menu.
|
||||
// Setup the checkup in the app menu.
|
||||
let check = gio::SimpleAction::new("check", None);
|
||||
check.connect_activate(clone!(db => move |_, _| {
|
||||
let _ = dbcheckup::run(&db);
|
||||
let _ = checkup(&db);
|
||||
}));
|
||||
app.add_action(&check);
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ use hammond_data::dbqueries;
|
||||
use hammond_data::models::{Episode, Podcast};
|
||||
use hammond_downloader::downloader;
|
||||
use hammond_data::index_feed::Database;
|
||||
use hammond_data::dbcheckup::*;
|
||||
use hammond_data::utils::*;
|
||||
use hammond_data::errors::*;
|
||||
|
||||
use dissolve::strip_html_tags;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user