Prototype image cache.

This commit is contained in:
Jordan Petridis
2017-10-13 10:21:06 +03:00
parent fc3c8588a3
commit 9df1e65951
6 changed files with 79 additions and 26 deletions
+2
View File
@@ -8,6 +8,8 @@ pub fn parse_podcast(chan: &Channel, source_id: i32) -> Result<models::NewPodcas
let title = chan.title().to_owned();
let link = chan.link().to_owned();
let description = chan.description().to_owned();
// Some feeds miss baseurl and/or http://
// TODO: Sanitize the url
let image_uri = chan.image().map(|foo| foo.url().to_owned());
let foo = models::NewPodcast {
+1 -1
View File
@@ -50,7 +50,7 @@ lazy_static!{
HAMMOND_XDG.create_config_directory(HAMMOND_XDG.get_config_home()).unwrap()
};
static ref _HAMMOND_CACHE: PathBuf = {
pub static ref HAMMOND_CACHE: PathBuf = {
HAMMOND_XDG.create_cache_directory(HAMMOND_XDG.get_cache_home()).unwrap()
};