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
Rowan Lewis
a7540583d6
Connect settings for auto refresh and cleanup.
2018-03-16 23:23:06 +01:00
Jordan Petridis
3a0fb4bdec
Upgrade dependancies.
2018-03-14 04:07:44 +02:00
Jordan Petridis
285291b2ed
Ignore tests that need access to the host system.
2018-03-12 03:35:07 +02:00
Jordan Petridis
9a73520b25
dbquerries: Add a unit test for update_none_to_played_now func.
2018-03-05 21:40:11 +02:00
Jordan Petridis
bb467b7aba
Rustfmt.
2018-03-03 16:45:37 +02:00
Jordan Petridis
c61938ba62
Update dependancies.
2018-02-20 06:19:05 +00:00
Jordan Petridis
ae25dd65bf
Cargo clippy and fmt.
2018-02-19 09:58:47 +00:00
Jordan Petridis
b6a71688c0
Version bump to 0.3
2018-02-11 22:57:37 +02:00
Jordan Petridis
45522b86df
Remove another unwrap. Though it would never be hit currently.
2018-02-08 21:34:11 +02:00
Jordan Petridis
ea29aae64a
Fix benchmarks.
2018-02-08 17:33:40 +02:00