diff --git a/TODO.md b/TODO.md index 1ed5678..6106680 100644 --- a/TODO.md +++ b/TODO.md @@ -1,20 +1,13 @@ -## TODOs: +# TODOs ## Planned Features -## Priorities: +## Priorities - [ ] Unplayed Only and Downloaded only view. -- [ ] Auto-updater - [ ] OPML import/export // Probably need to create a crate. -**Proper Desing Mockups for the Gtk Client:** - -- [ ] Re-design EpisodeWidget. -- [ ] Re-design PodcastWidget. -- [ ] Polish the flowbox_child banner. - -## Second: +## Second - [ ] Make use of file metadas, [This](https://github.com/GuillaumeGomez/audio-video-metadata) might be helpfull. - [ ] Notifications @@ -23,10 +16,9 @@ - [ ] MPRIS integration - [ ] Search Implementation +## Third -## Third: - -- [ ] Download Queue +- [ ] Download Queue - [ ] Ability to Stream content on demand - [ ] soundcloud and itunes feeds // [This](http://getrssfeed.com) seems intresting. - [ ] Integrate with Itunes API for various crap @@ -37,8 +29,7 @@ **Would be nice:** - [ ] Make Podcast cover fetchng and loading not block the execution of the program at startup. -- [ ] Lazy evaluate episode loading based on the podcast_widget's view scrolling. -- [ ] Headerbar back button and stack switching +- [ ] Lazy evaluate episode loading based on the show_widget's scrolling. **FIXME:** diff --git a/hammond-downloader/src/downloader.rs b/hammond-downloader/src/downloader.rs index d0505fd..685986f 100644 --- a/hammond-downloader/src/downloader.rs +++ b/hammond-downloader/src/downloader.rs @@ -125,10 +125,12 @@ pub fn get_episode(ep: &mut EpisodeWidgetQuery, download_folder: &str) -> Result // If download succedes set episode local_uri to dlpath. ep.set_local_uri(Some(&path)); + // Over-write episode lenght let size = fs::metadata(path); if let Ok(s) = size { ep.set_length(Some(s.len() as i32)) }; + ep.save()?; Ok(()) } else { diff --git a/hammond-gtk/resources/gtk/episodes_view.ui b/hammond-gtk/resources/gtk/episodes_view.ui index 8a493c0..48940b8 100644 --- a/hammond-gtk/resources/gtk/episodes_view.ui +++ b/hammond-gtk/resources/gtk/episodes_view.ui @@ -42,6 +42,7 @@ False center 24 + 24 vertical 24 diff --git a/hammond-gtk/resources/gtk/show_widget.ui b/hammond-gtk/resources/gtk/show_widget.ui index 0f83b05..1bc45e7 100644 --- a/hammond-gtk/resources/gtk/show_widget.ui +++ b/hammond-gtk/resources/gtk/show_widget.ui @@ -20,6 +20,8 @@ True False center + 24 + 24 True @@ -42,6 +44,7 @@ False center vertical + 24 True @@ -191,7 +194,6 @@ False True - 24 0 diff --git a/hammond-gtk/src/main.rs b/hammond-gtk/src/main.rs index 424b528..89c6eb1 100644 --- a/hammond-gtk/src/main.rs +++ b/hammond-gtk/src/main.rs @@ -1,4 +1,4 @@ -#![cfg_attr(feature = "cargo-clippy", allow(clone_on_ref_ptr))] +#![cfg_attr(feature = "cargo-clippy", allow(clone_on_ref_ptr, needless_pass_by_value))] extern crate gdk; extern crate gdk_pixbuf; diff --git a/hammond-gtk/src/utils.rs b/hammond-gtk/src/utils.rs index 1f73b1b..b88a6dc 100644 --- a/hammond-gtk/src/utils.rs +++ b/hammond-gtk/src/utils.rs @@ -68,7 +68,13 @@ lazy_static! { }; } -// FIXME: use something that would just scale? +// 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. +// TODO: maybe use something that would just scale to requested size? pub fn get_pixbuf_from_path(pd: &PodcastCoverQuery, size: u32) -> Option { let mut hashmap = CACHED_PIXBUFS.lock().unwrap(); {