Renamed hammond-data/src/index_feeds.rs module into feed.rs.

This commit is contained in:
Jordan Petridis 2017-11-18 14:32:58 +02:00
parent 450643371c
commit 6894f33895
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
5 changed files with 7 additions and 7 deletions

View File

@ -16,7 +16,7 @@ use test::Bencher;
use hammond_data::run_migration_on;
use hammond_data::models::NewSource;
use hammond_data::index_feed::{index, Feed};
use hammond_data::feed::{index, Feed};
use hammond_data::Database;
use std::io::BufReader;

View File

@ -25,7 +25,7 @@ extern crate xdg;
pub mod dbqueries;
pub mod utils;
pub mod models;
pub mod index_feed;
pub mod feed;
pub mod errors;
mod feedparser;
mod schema;

View File

@ -6,7 +6,7 @@ use reqwest::header::{ETag, LastModified};
use rss::Channel;
use schema::{episode, podcast, source};
use index_feed::Feed;
use feed::Feed;
use errors::*;
use models::insertables::NewPodcast;

View File

@ -1,7 +1,7 @@
use glib;
use gtk;
use hammond_data::index_feed;
use hammond_data::feed;
use hammond_data::models::Source;
use hammond_data::Database;
@ -42,14 +42,14 @@ pub fn refresh_feed(
let feeds = {
if let Some(mut vec) = source {
Ok(index_feed::fetch(&db, vec))
Ok(feed::fetch(&db, vec))
} else {
index_feed::fetch_all(&db)
feed::fetch_all(&db)
}
};
if let Ok(mut x) = feeds {
index_feed::index(&db, &mut x);
feed::index(&db, &mut x);
info!("Indexing done.");
sender.send(true).expect("Couldn't send data to channel");;