Implemented a pixbuf cache mechanism.

Since gdk_pixbuf::Pixbuf is refference counted and every episode,
use the cover of the Podcast Feed/Show, We can only create a Pixbuf
cover per show and pass around the Rc pointer.

GObjects do not implement Send trait, so SendCell is a way around that.
Also lazy_static requires Sync trait, so that's what the mutexes are.
This commit is contained in:
Jordan Petridis
2017-12-21 17:36:07 +02:00
parent 74a6e5814a
commit e416bca963
5 changed files with 42 additions and 1 deletions
+5
View File
@@ -513,6 +513,11 @@ impl From<Podcast> for PodcastCoverQuery {
}
impl PodcastCoverQuery {
/// Get the Feed `id`.
pub fn id(&self) -> i32 {
self.id
}
/// Get the Feed `title`.
pub fn title(&self) -> &str {
&self.title