Commit Graph

346 Commits

Author SHA1 Message Date
Jordan Petridis
09359a8df3
Update deps and bump rss crate.
My PR for Channelinto_items() went through and a new rss
release in is already available!
2018-04-19 08:07:02 +03:00
Jordan Petridis
3b5831f317
ShowsView: Do not block while loading ShowChilds. 2018-04-19 07:51:48 +03:00
Jordan Petridis
e4fc7c336e
EpisodeView: Fix empty state. 2018-04-19 05:32:27 +03:00
Jordan Petridis
0e4430bae4
EpisodeView: Initial refactor to make loading non-blocking. 2018-04-19 02:52:58 +03:00
Jordan Petridis
f811a9c8f4
Feed: Split index_channel_items method. 2018-04-18 08:20:26 +03:00
Jordan Petridis
771999c603
h-data: Move some functions from pipeline to feed module. 2018-04-18 07:35:53 +03:00
Jordan Petridis
18820202d7
gitlabci: Add needed ENV vars.
abc8fb988f uses an feature of rayon
that's behind a compile time flag.
2018-04-18 07:06:17 +03:00
Jordan Petridis
abc8fb988f
Pipeline: Dispatch feed indexing to the rayon threadpool. 2018-04-18 05:06:02 +03:00
Jordan Petridis
885c525d7b
Pipeline: change the signature of pipeline to accept future::Stream instead of IntoIterator. 2018-04-18 04:05:14 +03:00
Jordan Petridis
418a2f02b2
Pipeline: Add a bad feed test case. 2018-04-18 03:38:06 +03:00
Jordan Petridis
031078284c
Feed: Print an error in stderr before discarding it. 2018-04-18 03:03:05 +03:00
Jordan Petridis
3c7ba8c9d9
Feed: Convert index_channel_items to a Future/Steam impl. 2018-04-18 02:49:21 +03:00
Jordan Petridis
835078a84c
Pipeline: Convert the sources iterator into a Stream and return a Future
`futures::stream::iter_ok` is so conviniet, why had None told me
about it before?
2018-04-18 01:40:06 +03:00
Jordan Petridis
049418c2f5
Feed: clean up clunky impl of indexing episodes. 2018-04-17 12:05:10 +03:00
Jordan Petridis
2d291a08fc
h-data: Refactor the Diesel helper traits to use Associated Types. 2018-04-17 01:33:50 +03:00
Jordan Petridis
bc6eeec663
Replace if Let Err(_) with .map_err().ok() patterns.
I dislike the indentation and the noise if let adds.
2018-04-16 04:03:44 +03:00
Jordan Petridis
50a508b596
Improve formatting 2018-04-15 02:50:06 +03:00
Jordan Petridis
59c634f626
Source: change the signature of the request constructor
We don't really need to return Self.
2018-04-15 02:39:24 +03:00
Jordan Petridis
08ebb9e7d6
pipeline: Make run function generic again.
also minor formatting changes.
2018-04-14 08:03:58 +03:00
Jordan Petridis
f5f0a5b873
Remove dead code. 2018-04-14 07:52:55 +03:00
Jordan Petridis
1036176e51
pipeline: Make sure that the futures will be run.
Use .then() combinator to override the result and return
Ok(()) even if the task fails. That allows us to use join_all
instead of the custom written collect_futures function.
2018-04-14 07:41:50 +03:00
Jordan Petridis
c6a24e839a
h-data: Implement a tail-recursion loop to follow redirects.
Follow http 301 permanent redirects by using a future::loop_fn.
It's kinda funcky, match_status still returns status_codes as erros
and a new DataError Variant had to be added to distiguise when we
should Loop::Continue. This could be cleaned up a lot.
2018-04-14 05:30:29 +03:00
Jordan Petridis
87421ce74d
Cargo fmt 2018-04-13 04:35:50 +03:00
Jordan Petridis
74fb8dc75c
Update deps. 2018-04-12 05:06:33 +03:00
Jordan Petridis
9cb2782ef9 ShowWidget: Initial Lazier evaluation of the widgets. 2018-04-10 16:57:08 +00:00
Jordan Petridis
5cd0a3c451
Fix the things I broke in b74dbb74bb
Someone really needs to restrict my access to anything that involves
transistors when I am sleep deprived.
2018-04-10 07:01:55 +03:00
Jordan Petridis
b74dbb74bb
h-data: Remove rel attributes from <a> tags when sanitizing html.
They are invalid in `pango` markup so theres no reason they
should are not needed. Also add some paranoid .trim() calls.
It returnes a &str slice so it's cheap.
2018-04-10 06:31:51 +03:00
Jordan Petridis
d332636dd4
Fix the fix that should have fixed the tests. 2018-04-06 19:36:52 +03:00
Jordan Petridis
32654f6cb2
Fix the tests. 2018-04-06 19:18:55 +03:00
Jordan Petridis
14a90e7138
Remove Futures_Cpupool.
The performance boost is not good enough to justify the
code complexity it add and the memory overhead of
yeat another threadpool.

We will start refactoring the whole pipeline implemantation
and might transition to either rayon-futures or tokio-runtime.
2018-04-06 18:18:03 +03:00
Jordan Petridis
5cc550c830
NewEpisode: refactor a closure to that returned Option<T> to use .and_then instead. 2018-04-04 16:32:03 +03:00
Jordan Petridis
52cbe67756
NewEpisode: refactor another if else statement and document it. 2018-04-04 16:31:59 +03:00
Jordan Petridis
c910e0af40
NewPodcast: refactor an if else statement and document it. 2018-04-04 16:31:50 +03:00
Jordan Petridis
3d98600126 h-data: Sanitize html during Podcast/Episode parsing. 2018-04-03 19:42:13 +00:00
Jordan Petridis
7ba834ee8d Update deps now that we are at it. 2018-04-03 19:42:12 +00:00
Jordan Petridis
1c527cba03 Remove more commented out dead code. 2018-04-03 19:42:12 +00:00
Jordan Petridis
2d7ba7b246 h-data/source.rs: Reduce boilerplate. 2018-04-03 19:42:11 +00:00
Jordan Petridis
4ed70a8011 Rss::Error is now Send! 2018-04-03 19:42:11 +00:00
Jordan Petridis
7a3a148359 Remove more dead code. 2018-04-03 19:42:11 +00:00
Jordan Petridis
e07e35110d Use pretty assertions! 2018-04-03 19:42:10 +00:00
Jordan Petridis
a463753c84 NewEpidode: Use parse rss.description instead of itunes.summary.
We can deal with(sort of) html now, so we should start indexing
the proper rss description. Also cleanup commented out code.
2018-04-03 19:42:10 +00:00
Jordan Petridis
af1cb43bd6 NewPodcast: Prefer the rss.description attribute.
Since we can handle rendering html stuff by converting it to pango
we no longer need the text-only itunes summary attribure.
2018-04-03 19:42:09 +00:00
Jordan Petridis
c338802329
Update deps. 2018-03-30 11:49:54 +03:00
Jordan Petridis
f2444f151c
h-gtk/utils: Re-work format_err! calls and improve formatting 2018-03-29 15:26:44 +03:00
Jordan Petridis
3c7f3ecb56
NewPodcast: Fix Image parsing if Itunes ext is Some(None).
Instead of checking if the itunes img url was Some we were assuming
that if an itunes extension existed, it would have an image. That's
not always the case as it turns out there can be an Itunes Ext but
img still be None resulting to not falling back to the Rss image tag.
2018-03-28 12:08:41 +03:00
Jordan Petridis
f7a7510322
Implement the shared HashSet with the ignored Shows ids 2018-03-26 13:25:39 +03:00
Jordan Petridis
e9f2ba47f2
dbquerries: Add get_episodes and get_podcasts querries that can filters. 2018-03-26 12:46:13 +03:00
Jordan Petridis
1af06f2e0d
Neaw gtk-rs release, yay! 2018-03-19 06:34:28 +02:00
Rowan Lewis
7696014545 Fix #53 by setting the HTTP user agent string to the latest Firefox ESR. 2018-03-18 11:57:41 +01:00
Rowan Lewis
afdedc7575 Use crono types instead of unsigned integers for time periods. 2018-03-17 01:10:10 +01:00