Define a new Diesel Model for PodcastCover querries.

Define new Diesel Model and impl From<Podcast> trait,
Change the signature of downloader::cache_image function,
Change and merge hammond-gtk::utils::get_pixbuf_from_path functions.
This commit is contained in:
Jordan Petridis
2017-12-20 18:19:31 +02:00
parent c070fc3032
commit 2e06205eda
8 changed files with 59 additions and 27 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ use hammond_data::utils::replace_extra_spaces;
use hammond_downloader::downloader;
use widgets::episode::episodes_listbox;
use utils::get_pixbuf_from_path_128;
use utils::get_pixbuf_from_path;
use content::ShowStack;
use headerbar::Header;
@@ -77,7 +77,7 @@ impl ShowWidget {
let desc = dissolve::strip_html_tags(pd.description()).join(" ");
self.description.set_text(&replace_extra_spaces(&desc));
let img = get_pixbuf_from_path_128(pd);
let img = get_pixbuf_from_path(&pd.clone().into(), 128);
if let Some(i) = img {
self.cover.set_from_pixbuf(&i);
}