Commit Graph

38 Commits

Author SHA1 Message Date
Jordan Petridis
f3fb27005a
Database: Rename the tables to better match the userfacing strings 2018-06-30 21:47:49 +03:00
Jordan Petridis
784e117a8a
cargo fmt 2018-05-20 16:39:36 +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
87421ce74d
Cargo fmt 2018-04-13 04:35:50 +03: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
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
3d98600126 h-data: Sanitize html during Podcast/Episode parsing. 2018-04-03 19:42:13 +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
bb467b7aba
Rustfmt. 2018-03-03 16:45:37 +02:00
Jordan Petridis
ae25dd65bf
Cargo clippy and fmt. 2018-02-19 09:58:47 +00:00
Jordan Petridis
008f57bec4
Create a ParseEpisodeError and replace bail! invocations. 2018-02-05 18:51:21 +02:00
Jordan Petridis
064c2b4be0
Start creating custom errors instead of using bail! macro. 2018-02-05 18:25:56 +02:00
Jordan Petridis
8ba9f928d6
Switch to using DataError instead of failure::Error. 2018-02-05 02:43:56 +02:00
Jordan Petridis
ede4c21e30
Merge the Errors into a single Enum. 2018-02-05 01:39:50 +02:00
Jordan Petridis
de43cae015
Switch rest stuff of data/downloader to Failure Crate. 2018-02-04 17:36:27 +02:00
Jordan Petridis
d6817aaa1f
Parser: pass an rss::ItunesExtension to instead of an rss::Item. 2018-01-24 15:42:08 +02:00
Jordan Petridis
0e16f0acb0
NewEpisode: rename into_episode -> to_episode, change its signature and add unit test. 2018-01-24 14:31:33 +02:00
Jordan Petridis
d5a7fa9de8
NewEpisode: Add index method unit test. 2018-01-24 12:11:49 +02:00
Jordan Petridis
9274aba849
NewEpisode: Add update method unit test. 2018-01-24 11:22:03 +02:00
Jordan Petridis
f9096e5fac
Pipeline: Print the error right away instead of waiting till all futures complete. 2018-01-23 18:18:56 +02:00
Jordan Petridis
ea75d50053
NewEpisode: Add insert unit test. 2018-01-22 17:25:23 +02:00
Jordan Petridis
44d7a4e222
NewEpisodeMinimal: Add unit test for into_new_episode method. 2018-01-22 15:49:58 +02:00
Jordan Petridis
2d6f34fa4d
NewEpisode: Clean up tests a bit. 2018-01-22 15:34:57 +02:00
Jordan Petridis
66e816fc5f
Upgrade Diesel to 1.1 2018-01-22 11:22:01 +02:00
Jordan Petridis
843feabf25
NewEpisode: Move the parsing tests, delete old xml files. 2018-01-21 13:35:35 +02:00
Jordan Petridis
1625f773c2
hammond-data: Fix PartialEq implementations, add NewPodcast.insert unit test. 2018-01-21 08:39:50 +02:00
Jordan Petridis
da8c3a7827
Implement PartialEq accross Insertable and Queryable diesel models. 2018-01-20 19:09:25 +02:00
Jordan Petridis
46b6c0d27e
hammond-data: Remove leftover synchronous code. 2018-01-19 15:41:37 +02:00
Jordan Petridis
e6b0cfccb5
Apply clippy suggestions. 2018-01-19 10:32:25 +02:00
Jordan Petridis
1394366f91
hammond-data: Delete some dead code. 2018-01-18 17:04:57 +02:00
Jordan Petridis
6abf2535b0
hammond_data: Make index a trait that requires Insert + Update. 2018-01-18 16:33:07 +02:00
Jordan Petridis
93372a30d0
1.21 Gigawatts. Remove non-future indexing loop.
Tried to have a seperate futures loop but it's too confusign having
too write a Trait2, functon2, etc version of everything and keep it together.

Futures are functional sort of, so the synchronous versioun can be removed.
It still needs a ton of work though to be ready, or even get near the perf
of of the sync+rayon version.
2018-01-18 11:38:24 +02:00
Jordan Petridis
5d88998180
hammond_data: Add an EpisodeMinimal Diesel model. 2018-01-17 10:21:16 +02:00
Jordan Petridis
574cfae5c6
rustfmt: enable reorder imports. 2018-01-17 08:57:02 +02:00
Jordan Petridis
e707087e72
hammond_data: Split models::queriables into multiple modules. 2018-01-17 08:45:14 +02:00
Jordan Petridis
3a6f6d8931
hammond_data: Split models::insertables into multiple modules. 2018-01-17 08:27:39 +02:00