Renamed hammond-data/src/index_feeds.rs module into feed.rs.
This commit is contained in:
parent
450643371c
commit
6894f33895
@ -16,7 +16,7 @@ use test::Bencher;
|
|||||||
|
|
||||||
use hammond_data::run_migration_on;
|
use hammond_data::run_migration_on;
|
||||||
use hammond_data::models::NewSource;
|
use hammond_data::models::NewSource;
|
||||||
use hammond_data::index_feed::{index, Feed};
|
use hammond_data::feed::{index, Feed};
|
||||||
use hammond_data::Database;
|
use hammond_data::Database;
|
||||||
|
|
||||||
use std::io::BufReader;
|
use std::io::BufReader;
|
||||||
|
|||||||
@ -25,7 +25,7 @@ extern crate xdg;
|
|||||||
pub mod dbqueries;
|
pub mod dbqueries;
|
||||||
pub mod utils;
|
pub mod utils;
|
||||||
pub mod models;
|
pub mod models;
|
||||||
pub mod index_feed;
|
pub mod feed;
|
||||||
pub mod errors;
|
pub mod errors;
|
||||||
mod feedparser;
|
mod feedparser;
|
||||||
mod schema;
|
mod schema;
|
||||||
|
|||||||
@ -6,7 +6,7 @@ use reqwest::header::{ETag, LastModified};
|
|||||||
use rss::Channel;
|
use rss::Channel;
|
||||||
|
|
||||||
use schema::{episode, podcast, source};
|
use schema::{episode, podcast, source};
|
||||||
use index_feed::Feed;
|
use feed::Feed;
|
||||||
use errors::*;
|
use errors::*;
|
||||||
|
|
||||||
use models::insertables::NewPodcast;
|
use models::insertables::NewPodcast;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
use glib;
|
use glib;
|
||||||
use gtk;
|
use gtk;
|
||||||
|
|
||||||
use hammond_data::index_feed;
|
use hammond_data::feed;
|
||||||
use hammond_data::models::Source;
|
use hammond_data::models::Source;
|
||||||
use hammond_data::Database;
|
use hammond_data::Database;
|
||||||
|
|
||||||
@ -42,14 +42,14 @@ pub fn refresh_feed(
|
|||||||
|
|
||||||
let feeds = {
|
let feeds = {
|
||||||
if let Some(mut vec) = source {
|
if let Some(mut vec) = source {
|
||||||
Ok(index_feed::fetch(&db, vec))
|
Ok(feed::fetch(&db, vec))
|
||||||
} else {
|
} else {
|
||||||
index_feed::fetch_all(&db)
|
feed::fetch_all(&db)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Ok(mut x) = feeds {
|
if let Ok(mut x) = feeds {
|
||||||
index_feed::index(&db, &mut x);
|
feed::index(&db, &mut x);
|
||||||
info!("Indexing done.");
|
info!("Indexing done.");
|
||||||
|
|
||||||
sender.send(true).expect("Couldn't send data to channel");;
|
sender.send(true).expect("Couldn't send data to channel");;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user