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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user