483 Commits
Author SHA1 Message Date
Jordan Petridis b6a71688c0 Version bump to 0.3 2018-02-11 22:57:37 +02:00
Jordan Petridis dcc4eae27e Use Gnome Nightly Sdk for the flatpak manifest. 2018-02-11 00:54:17 +02:00
Jordan Petridis 65a080ed1d Readme: Fix rustup link. 2018-02-10 22:42:13 +02:00
Jordan Petridis 48071c28a7 AboutDialog: Add a temporary icon, and update contributors list. 2018-02-10 09:26:08 +02:00
Jordan Petridis 138cfdb68c EpisodeWidget: use debug! instead of error! to avoid spamming stderr with *not actuall* errors. 2018-02-10 05:45:50 +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 1135d77147 EpisodeWidget: Remove unwrap on that could occur if an invalid path was passed. 2018-02-08 21:10:36 +02:00
Jordan Petridis 9dfb18a487 EpisodeWidget: Minor refactor of set_total_size method. 2018-02-08 21:02:16 +02:00
Jordan Petridis fbfa0de17e EpisodeWidget: Fix minutes label parsing.
Before if a feed had reported a number between 1 and 60, a label 0 min
would be set.

This fixes that, while also using chrono::Duration for parsing minutes.
2018-02-08 20:39:37 +02:00
Jordan Petridis ea29aae64a Fix benchmarks. 2018-02-08 17:33:40 +02:00
Jordan Petridis e77b0a84c7 Update dependancies. 2018-02-08 17:03:26 +02:00
Jordan Petridis c5e0bf34cb Headerbar: Use the Application Action instead of relying directly on Content. 2018-02-08 05:40:40 +02:00
Jordan Petridis 4ba82c1515 EpisodeWidget: Set title alignment from glade. 2018-02-08 05:29:47 +02:00
Jordan Petridis b172aa7aa3 Remove forgotten unwrap(). 2018-02-08 04:39:51 +02:00
Jordan Petridis c6f5a4200d EpisodeWidget: Fix progressbar alignment. 2018-02-07 22:08:52 +02:00
Jordan Petridis e2a1762af4 EpisodeWidget: Use refference counting intead of unnecessary clones.
Pass owenership of EpisodeWidgetQuery and use Atomic Ref counting
to pass to the callbacks. This should avoid extra allocations.
2018-02-07 18:40:22 +02:00
Jordan Petridis 07c1a9a0e9 Fix private field visibility of stacks. 2018-02-07 07:11:40 +02:00
Jordan Petridis 31bd75ae45 Minor Arc changes. 2018-02-07 07:02:24 +02:00
Jordan Petridis 67af85e347 Hammond-gtk: Use Atomic Refference counting to reduce cloning of Podcast. 2018-02-07 06:28:16 +02:00
Jordan Petridis df02054b29 Hammond-gtk: Change the privacy of the widgets module. 2018-02-07 05:47:58 +02:00
Jordan Petridis 0cdd48ac1e Hammond-gtk: Change the privacy of the views module. 2018-02-07 05:37:07 +02:00
Jordan Petridis bdda596806 Hammond-gtk: Inital split of content.rs into stacks module. 2018-02-07 05:33:29 +02:00
Jordan Petridis 8cbae4050e Merge branch '40-gtk-unwrap-cleanup' into 'master'
Resolve "Clean up the unwraps in the Gtk Client."

Closes #40

See merge request alatiera/Hammond!17
2018-02-07 02:12:11 +00:00
Jordan Petridis d3696fc5ec Minor Error messages wording changes. 2018-02-07 03:52:21 +02:00
Jordan Petridis 2d33606251 Hammond-gtk: Stack, Content constructors return Results now.
Constructors now proxy underlying errors that migth occur during initialazation.
I think that's about the last unwraps in the main thread.
2018-02-07 03:17:37 +02:00
Jordan Petridis 89564996df ShowStack: Convert rest methods to return Result<T, Error>. 2018-02-07 01:19:07 +02:00
Jordan Petridis e196a6c905 ShowStack: update_widget methods now return Result<T, Error>. 2018-02-07 00:55:43 +02:00
Jordan Petridis 7eb038b899 EpisodesStack: Refactor update method to return a Result<T, Error>. 2018-02-07 00:31:04 +02:00
Jordan Petridis 1c84f0d721 hammond-gtk::manager: Switch the add function to return a Result<(), Error>. 2018-02-06 22:03:17 +02:00
Jordan Petridis ab519a54d3 Headerbar: Use Result<T, failure::Error> wherever possible. 2018-02-06 21:32:21 +02:00
Jordan Petridis 7ed1cd8b26 hammond-gtk: Change utils::get_pixbuf_from_path function to return a Result. 2018-02-06 20:56:55 +02:00
Jordan Petridis c6e426cbac Downloader: Change cache_image function to return Result<T, DownlaoderError> instead of Option<T>. 2018-02-06 20:14:03 +02:00
Jordan Petridis d3f279374a ShowWidget: Refactor to return Result<T, Error> wherever possible. 2018-02-06 02:47:39 +02:00
Jordan Petridis 0dc16dab9a EpisodeWidget: Refactor to return Result<T, Error> wherever possible. 2018-02-06 02:31:53 +02:00
Jordan Petridis ed5ff16598 Downloader: clean a bit downloader::get_episode function. 2018-02-06 02:00:32 +02:00
Jordan Petridis c1ecdbda52 Merge branch '39-failure-libs-migration' into 'master'
Resolve "Migrate Error-Handling to Failure crate."

Closes #39

See merge request alatiera/Hammond!16
2018-02-05 19:16:11 +00:00
Jordan Petridis d3472b3205 hammond-data: Deny Unused. 2018-02-05 20:51:34 +02:00
Jordan Petridis 5cd3dff1d4 Downloader: Switch to returning Downloader::Error instead of failure::Error. 2018-02-05 20:41:45 +02:00
Jordan Petridis 4d1168803c Dbquerries: Remove Result type allias. 2018-02-05 19:43:26 +02:00
Jordan Petridis 7eec01a52e Minor rename of DataError::Bail. 2018-02-05 19:05:40 +02:00
Jordan Petridis 44ebe46f10 Replace last bail! invocations. 2018-02-05 19:00:31 +02:00
Jordan Petridis 008f57bec4 Create a ParseEpisodeError and replace bail! invocations. 2018-02-05 18:51:21 +02:00
Jordan Petridis d0ae5a4198 Typo fix. 2018-02-05 18:33:12 +02:00
Jordan Petridis 064c2b4be0 Start creating custom errors instead of using bail! macro. 2018-02-05 18:25:56 +02:00
Jordan Petridis 34d7391363 Make a counterfeit rss Error. 2018-02-05 16:37:50 +02:00
Jordan Petridis e84e7df3f1 Remove unwrap call. 2018-02-05 15:59:34 +02:00
Jordan Petridis 8ba9f928d6 Switch to using DataError instead of failure::Error. 2018-02-05 02:43:56 +02:00
Jordan Petridis 435ce05ac7 Add rest of the From impls for the Error Type. 2018-02-05 01:53:01 +02:00
Jordan Petridis ede4c21e30 Merge the Errors into a single Enum. 2018-02-05 01:39:50 +02:00
Jordan Petridis 0892fe26ba Manually implement From Trait for the DatabaseError. 2018-02-05 01:20:01 +02:00
Jordan Petridis 1085d468b9 cargo fmt 2018-02-04 18:45:19 +02:00
Jordan Petridis 8f0a63fdb7 Downloader: Make the Error type public. 2018-02-04 17:46:01 +02:00
Jordan Petridis de43cae015 Switch rest stuff of data/downloader to Failure Crate. 2018-02-04 17:36:27 +02:00
Jordan Petridis f9f015a211 Hammond-data: switch database module to use Failure. 2018-02-04 16:33:10 +02:00
Jordan Petridis 3874235074 Readme: Add a note about being able to built with Gnome-Builder. 2018-02-04 02:03:47 +02:00
Jordan Petridis 1888539a97 Rename assets folder to screenshots, and improve the build system. 2018-02-04 01:34:34 +02:00
Jordan Petridis d131c279b9 Add batch indexing fallback.
If an RSS feed triggered a unique constrains violation, none of it's
items would be indexed resulting in a Podcast without episodes.

This adds a fallback that indexes each item individually if the batch index fails.
2018-02-03 16:02:42 +02:00
Jordan Petridis 92d01ec51a Feed: enchance get_stuff unit test. 2018-02-03 15:55:26 +02:00
Jordan Petridis 97c65c8bd1 Add a download test for Steal the Stars podcast to spot #10 reggressions. 2018-02-03 15:43:00 +02:00
Jordan Petridis e8ae0b0251 Thats a hack, a terrible one, but without it the user
would have to manually click refresh if the user that was added
happen to redirect somewhere else.

The problem is in the hammond-data/src/models/source.rs
fn request_constructor. It has to do with futures and lifetimes
and I am not sure how to tackle it yet.
2018-02-03 00:06:02 +02:00
Jordan Petridis f1f248fa40 Merge branch 'master' into 'master'
Issue 10 - Infinite Redirect Fix

See merge request alatiera/Hammond!15
2018-02-02 16:12:46 +00:00
James Wykeham-Martin a007460029 Added Some to attempt.url() and removed unwrap 2018-02-02 15:41:00 +00:00
James Wykeham-Martin 7a0e7708be formatted 2018-02-02 10:43:20 +00:00
James Wykeham-Martin 5e7d8841af Added loopback detection using current last rather than contains 2018-02-02 09:58:09 +00:00
James Wykeham-Martin d0c5764471 Added custom redirect policy 2018-02-02 09:40:13 +00:00
James Wykeham-Martin 82f577c17d Added custom redirect policy 2018-02-02 09:38:06 +00:00
James Wykeham-Martin 32296d91b7 Merge remote-tracking branch 'upstream/master' 2018-02-02 09:09:43 +00:00
Jordan Petridis 80fd4e9fc5 Source: Set Etag and last modified to None upon redirect. 2018-02-01 19:35:35 +02:00
Jordan Petridis 7b62ef203d Source: Pass owenership around instead of &mut, cause futures. 2018-02-01 15:55:19 +02:00
Jordan Petridis 2f062afb07 Clippy suggestions 2018-01-29 19:09:53 +02:00
Jordan Petridis 817d5d9cf7 Fix meson config to build each time. 2018-01-29 18:17:02 +02:00
Jordan Petridis a2cf2357c6 Add about a basic about dialog. 2018-01-29 18:02:24 +02:00
Jordan Petridis 815639fe5f Add an order by tittle asc clasuse to the Podcast query. Address #34. 2018-01-29 12:30:13 +02:00
Jordan Petridis b1c3b4f9cc Pipeline: Fetch sources without etag support fist as they are more likely to need parsing. 2018-01-29 12:20:21 +02:00
Jordan Petridis 332a439b7a hammond-data: Factor out save method of diesel models into a Trait. 2018-01-28 22:09:06 +02:00
Jordan Petridis fb5264c479 NewSource: Rename into_source -> to_source and take reffence &self instead. 2018-01-27 18:34:03 +02:00
Jordan Petridis a3705d424b NewSource: Remove Insert implemantation and replace it with a insert_or_ignore method. 2018-01-27 18:09:40 +02:00
Jordan Petridis a4660a0700 Headerbar: Do not allow insertion of duplicate urls. 2018-01-27 14:40:51 +02:00
Jordan Petridis 77a52bdc8c hammond-data: Add a source_exists query. 2018-01-27 14:23:19 +02:00
Jordan Petridis 18e55e23ee Headerbar: Do not allow insertion of invalid urls. 2018-01-27 14:11:02 +02:00
Jordan Petridis d14973cf0d Use num_cpus instead of hardcoding the number of threads for dns look_up.
In the next hyper_tls relase it should be possible to use the existing
cpu_pool executor.
2018-01-27 11:08:57 +02:00
Jordan Petridis 120d494280 Update hyper and futures. 2018-01-27 09:45:25 +02:00
Jordan Petridis 8c0e3221cb refresh_feed: remove code duplication. 2018-01-26 19:29:45 +02:00
Jordan Petridis 5e1d1e557f GtkApplication: Add an action for showing the headerbar_update_indicator. 2018-01-26 19:15:07 +02:00
Jordan Petridis a7e3b1b99e GtkApplication: Headbar and Content constructors now return Self instead of Arc<Self>. 2018-01-26 19:05:19 +02:00
Jordan Petridis 1e722e0d58 Merge branch 'futuristic-pipeline' into 'master'
Futuristic pipeline

See merge request alatiera/Hammond!14
2018-01-26 16:33:46 +00:00
Jordan Petridis 39aa86157b Switch rest of the tests to point to the internet archive urls. 2018-01-26 17:25:35 +02:00
Jordan Petridis df85a4ea9e Pipeline: avoid panicking by checking the lenght and returning an error. 2018-01-26 14:17:43 +02:00
Jordan Petridis 2912bad110 Pipeline: Split the pipeline from the cpu-pool and the tokio-core. 2018-01-26 13:34:04 +02:00
Jordan Petridis a57fdef01d Merge branch 'patch-1' into 'master'
Added Flatpak building instructions

See merge request alatiera/Hammond!13
2018-01-25 19:42:45 +00:00
Gabriele Musco 7a0ae6ee14 fixed capital H in Hammond 2018-01-25 14:47:58 +00:00
Gabriele Musco f335bedc2a Added Flatpak building instructions 2018-01-25 14:46:11 +00:00
Jordan Petridis b370af35d4 Feed: Add a bunch of tests. 2018-01-24 18:42:33 +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 5da002fe6d Use map_err(From::from) instead of ? into Ok() wrapping pattern. 2018-01-24 15:27:36 +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 457e43978f Pipeline: Fix a panic if the list of futures was 0. 2018-01-23 19:07:11 +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 e74a2df27f Source: On Http 301 response, update Source.uri . 2018-01-23 16:43:02 +02:00
Jordan Petridis 1c4138c166 Benches: Remove dead stuff. 2018-01-23 13:24:08 +02:00
Jordan Petridis 050fe9c52b Pipeline: offload more stuff to the threadpool. 2018-01-23 11:43:37 +02:00
Jordan Petridis a8c49049dd Fix flatpak permission. 2018-01-23 10:40:14 +02:00
Jordan Petridis 8095919bbe This sort of works? 2018-01-23 10:12:32 +02:00
Jordan Petridis f7f6087d70 NewPodcast: On update unit test assert .id and .source_id fields stay the same. 2018-01-22 21:09:06 +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 d231cc165f Fix batch indexing. 2018-01-22 14:51:31 +02:00
Jordan Petridis c2d5b5ded0 Flatpak: Remove the notification portal since its not going to be used any time soon. 2018-01-22 12:23:23 +02:00
Jordan Petridis 7bd361fbbb Upgrade dependancies. 2018-01-22 11:47:17 +02:00
Jordan Petridis 66e816fc5f Upgrade Diesel to 1.1 2018-01-22 11:22:01 +02:00
Jordan Petridis 20f36a67a0 Upgrade log and loggerv. 2018-01-21 15:22:13 +02:00
Jordan Petridis eb75e68b72 Fix benchmarks. 2018-01-21 14:52:21 +02:00
Jordan Petridis dc9a28c0c7 Remove xml files. 2018-01-21 14:49:54 +02:00
Jordan Petridis 843feabf25 NewEpisode: Move the parsing tests, delete old xml files. 2018-01-21 13:35:35 +02:00
Jordan Petridis 937bd61d5e NewPodcast: Add unit test for the to_podcast() method. 2018-01-21 12:17:47 +02:00
Jordan Petridis 4ee5888b7f NewPodcast: Rename into_podcast method -> to_podcast since it now does not take owenership. 2018-01-21 11:04:15 +02:00
Jordan Petridis 73eeb1b545 NewPodcast: Add NewPodcast.index unit test. 2018-01-21 10:04:53 +02:00
Jordan Petridis 16bbfb5478 NewPodcast: Add (lackign) NewPodcast.update unit test. 2018-01-21 09:35:48 +02:00
Jordan Petridis 410657c98b NewPodcast: Remove the boilerplate on the unit tests. 2018-01-21 08:57:50 +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 6c9e0984a5 Migrate podcast tests to use the internet archive snapshots. 2018-01-20 18:02:07 +02:00
Jordan Petridis df17a10014 Source: refactor into_feed test. 2018-01-20 16:43:32 +02:00
Jordan Petridis ef52a026bc Feed: Add Builder pattern. 2018-01-20 08:46:05 +02:00
Jordan Petridis b3c4de320b Remove dead dependancies. 2018-01-20 07:41:09 +02:00
Jordan Petridis 7d9781052f hammond-data: Rework the modules privacy. 2018-01-20 07:28:30 +02:00
Jordan Petridis 855b1517a7 Feed: Removee unimplemented! hack to guard against my future stupidity. 2018-01-19 19:20:21 +02:00
Jordan Petridis 1606ceaadb Source: split response_to_channel into more futures. 2018-01-19 16:29:50 +02:00
Jordan Petridis 46b6c0d27e hammond-data: Remove leftover synchronous code. 2018-01-19 15:41:37 +02:00
Jordan Petridis b92ba7be76 Switch from libtest to criterion.rs for benchmarks. 2018-01-19 14:32:43 +02:00
Jordan Petridis 44dbb06dcc Add benchmarks for the async path. 2018-01-19 13:15:21 +02:00
Jordan Petridis e6b0cfccb5 Apply clippy suggestions. 2018-01-19 10:32:25 +02:00
Jordan Petridis 5c5faafc72 Source: Move around code and change some methods signature.
request_constructor is now a Source method.
update_etags now takes &mut self instead of mut self.
update_etags now uses source setters methods instead of raw fields.
changed the naming of into_feed to to_feed according to rust convention.
2018-01-19 07:51:55 +02:00
Jordan Petridis 9dc555cad7 Feed: Add an index_async implementation. 2018-01-18 18:57:44 +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 1c96288178 hammond_data: Add more benchmark cases. 2018-01-18 15:50:48 +02:00
Jordan Petridis 098c5755b0 hammond-data: Do batch indexing of new_episodes. 2018-01-18 13:47:40 +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
Jordan Petridis 3766db2b14 hammond_data: Move parse_podcast into a NewEpisode method. 2018-01-17 07:31:24 +02:00
Jordan Petridis 8174fe0bac hammond_data: Move parse_episode from parser into a NewEpisode method. 2018-01-17 07:16:59 +02:00
Jordan Petridis bd9844f012 Dbquerries: Use map_err() instead of ? into Ok() pattern. 2018-01-17 07:13:34 +02:00
Jordan Petridis f64779f70a Parser: Add NewEpisodeMinimal struct.
Parsing whole episodes can be expensive and we only need
a subset to determine if it should be indexed/updated or ignored.
2018-01-16 18:33:32 +02:00
Jordan Petridis 978e5a61f6 Dbquerries: add EXIST querries for podcast and episode. 2018-01-16 17:26:41 +02:00
Jordan Petridis fa03c20b00 Feed: add parse_channel_items_future method. 2018-01-16 14:52:20 +02:00
Jordan Petridis bf4f655ed2 Pipeline: remove submodule hack. 2018-01-16 14:37:51 +02:00
Jordan Petridis b3460b15a2 hammond_data::Feed: add parse_podcast_future method. 2018-01-16 13:44:33 +02:00
Jordan Petridis 7f78e87551 hammond_data::Feed: Remove unused parts. 2018-01-16 12:35:08 +02:00
Jordan Petridis 3358fcd0b3 hammond_data::Feed: general cleanup of no longer needed stuff. 2018-01-15 11:03:40 +02:00
Jordan Petridis 10345ffda7 Pipeline: add matching on status code. 2018-01-15 10:16:01 +02:00
Jordan Petridis 2f7a22355f Minor cleanup of the mess. 2018-01-14 08:27:50 +02:00
Jordan Petridis e63a366fdc I don't know why the benchmarks keep cycling. 2018-01-14 06:48:42 +02:00
Jordan Petridis 1031315cdd Getting somewhere? 2018-01-14 06:37:47 +02:00
Tobias Bernard d60dbfbd6b Fix some typos in README.md 2018-01-13 15:16:22 +00:00
Jordan Petridis a5fd79e220 I hate futures error handling. 2018-01-13 14:47:38 +02:00
Jordan Petridis e162f8fd3f Non-working yet benchmark. 2018-01-13 08:31:16 +02:00
Jordan Petridis e4d77a6ba4 Cleanup the id() method mess of the diesel models. 2018-01-13 07:46:56 +02:00
Jordan Petridis 6517956987 This works somehow... 2018-01-13 07:09:59 +02:00
Jordan Petridis ee9cede921 hammond_data: Remove Source dependancy from Feed struct. 2018-01-13 06:08:51 +02:00
Jordan Petridis 1dd25f91fd Minor cleanup 2018-01-13 05:47:23 +02:00
Jordan Petridis 771b7b3804 Something Something futures. 2018-01-13 01:28:02 +02:00
Jordan Petridis 8e367b7e86 Dont ask me how this is working. 2018-01-12 08:50:16 +02:00
Jordan Petridis e20b96e061 Update CHANGELOG.md 2018-01-12 03:36:09 +02:00
Jordan Petridis 58854c2ebd Update Screenshots and README.md 2018-01-12 03:28:02 +02:00
Jordan Petridis 01fe5c4730 Revert to using light theme. 2018-01-12 01:48:52 +02:00
Jordan Petridis e192cf6618 Headerbar: Use application action channel instead of GAction. 2018-01-12 01:41:36 +02:00
Jordan Petridis 88a4c2d9f0 gitlab-ci: Disable nightly builds and clippy. 2018-01-12 00:33:58 +02:00
Jordan Petridis 95ff3715a3 Migrate StackSwitch actions to use the AppAction channel. 2018-01-11 01:14:54 +02:00
Jordan Petridis 8a90de3c0e Implement download cancel action. #24 2018-01-10 09:43:38 +02:00
Jordan Petridis 77f005caab Update Contributing.md 2018-01-10 09:04:24 +02:00
Jordan Petridis a63a6e168c Added BrokenFeed Issue template. 2018-01-10 08:27:13 +02:00
Jordan Petridis 3899e8ed39 Add GPL notices to the glade ui files. 2018-01-10 02:59:47 +02:00
Jordan Petridis fe2f8617a2 Merge branch '33-downloader-re-work' into 'master'
Resolve "Downloader Re-work"

Closes #33

See merge request alatiera/Hammond!12
2018-01-10 00:56:18 +00:00
Jordan Petridis 7f8544373f EpisodesView: Show 50 episodes instead of 100. 2018-01-10 02:14:49 +02:00
Jordan Petridis 955845110b Merge branch 'master' into 33-downloader-re-work 2018-01-09 12:06:38 +02:00
Jordan Petridis d4e3bf696b EpisodeWidget: Fix updating. 2018-01-09 10:52:52 +02:00
Jordan Petridis 0ba5e14d7f EpisodeWidget: Only update if it's visible. 2018-01-09 10:10:54 +02:00
Jordan Petridis ea70addbc6 Removed some unwrap()s. 2018-01-09 09:21:07 +02:00
Jordan Petridis 87a259e1a4 Minor cleanup. 2018-01-09 07:21:38 +02:00
Jordan Petridis 68d7c621d3 EpisodeWidget: Update the local_size label. 2018-01-09 06:15:41 +02:00
Jordan Petridis c54f29e82a EpisodeWidget: Modulate callbacks. 2018-01-09 04:20:38 +02:00
Jordan Petridis 9dafb0ae9e EpisodeWidget: Add local_size label that shows the amount of bytes downloaded. 2018-01-09 03:58:13 +02:00
Jordan Petridis 193117f579 Downloader: Update the progress index of downloads. 2018-01-08 12:29:47 +02:00
Jordan Petridis eef83fc98c EpisodeWidget: Implement API to update the progress bar. 2018-01-08 05:11:37 +02:00
Jordan Petridis 345d4b3865 Check more http status codes when parsing feeds. 2018-01-08 02:41:37 +02:00
Jordan Petridis 81b1ec810c Apply clippy suggestions. 2018-01-07 08:36:02 +02:00
Jordan Petridis 074284d286 Move unsub show logic and get_download_folder func to hammond-data::utils. 2018-01-07 08:26:38 +02:00
Jordan Petridis e290ae223e Pixbuf cache: use rwlock where possible. 2018-01-07 07:49:16 +02:00
Jordan Petridis 5c333291e1 Move temporary downloads to XDG_CACHE/Downloads. 2018-01-07 07:46:11 +02:00
Jordan Petridis 6bd391d89e I hate global mutable state.. 2018-01-07 05:51:29 +02:00
Jordan Petridis 4a6a9517f1 ShowStack: Copy the scrollbar position only if both widget represent the same podcast. 2018-01-06 05:38:31 +02:00
Jordan Petridis e961d5f8b0 Use lazystatic to cache the current chrono date. This will backfire on every new year's eve. 2018-01-06 03:49:26 +02:00
Jordan Petridis 5fed283ff4 EpisodeWidget: Hide duration label if its equal to 0. 2018-01-06 03:18:28 +02:00
Jordan Petridis bb5c25d87f Write unit tests for the itunes_duration_extension parser. 2018-01-06 03:09:24 +02:00
Jordan Petridis da459707be Wire up the callbacks to the client. 2018-01-05 23:57:48 +02:00
Jordan Petridis 13ba2762ad Move the download manager to the gtk crate. 2018-01-05 22:02:06 +02:00
Jordan Petridis e9dd297bf3 Merge branch 'master' into 33-downloader-re-work 2018-01-05 21:43:41 +02:00
Jordan Petridis eafad35860 Upgrade diesel to 1.0.0 and update rest dependancies. 2018-01-05 19:57:11 +02:00
Jordan Petridis d8d4b08252 EpisodeWidget: Trim date label to avoid date/title miss alignment on single digit dates. 2018-01-05 18:46:22 +02:00
Jordan Petridis 65a2d666a3 ShowWidget: Upon unsubing spawn IO heavy tasks into a seperate thread. 2018-01-05 00:35:18 +02:00
Jordan Petridis 299d2e8db1 ShowsView: Retain vertical scrolling adjustment upon view refresh. 2018-01-05 00:09:09 +02:00
Jordan Petridis 8ad5bf6f09 ShowWidget: Retain vertical scrolling adjustment upon view refresh. 2018-01-04 23:43:31 +02:00
Jordan Petridis 112b61d39e EpisodesView: Retain vertical scrolling adjustment upon view refresh. 2018-01-04 23:19:15 +02:00
Jordan Petridis 9d82b0edda EpisodeWidget ui tweaks. 2018-01-04 17:27:55 +02:00
Jordan Petridis 29837ad39a Default to using Arc instead of Rc with composite structs of GtkWidgets. 2018-01-04 17:05:05 +02:00
Jordan Petridis 750abb519b GtkApplication: Change the action channel polling interval. 2018-01-04 16:42:17 +02:00
Jordan Petridis f873278a96 hammond_gtk: Move the gtk callback to an Application channel action. 2018-01-04 16:16:34 +02:00
Jordan Petridis f30c645596 hammond_gtk: Refactor refresh_feed func to use the Application channel. 2018-01-04 16:05:42 +02:00
Jordan Petridis 67bc3e5225 Minor cleanup. 2018-01-03 08:12:55 +02:00
Jordan Petridis c33b493dcd Migrate Headerbar transitions into Channel actions. 2018-01-03 08:02:06 +02:00
Jordan Petridis 2633161c67 GtkApplication: Remove some SimpleActions. 2018-01-03 06:57:15 +02:00
Jordan Petridis 33cd6e69ff EpisodeWidget: Migrate to use a Channel Action instead of simple Action. 2018-01-03 06:53:19 +02:00
Jordan Petridis 84da6aac8c ShowWidget: Replace the unsub simple action with a Channel Action. 2018-01-03 06:23:12 +02:00
Jordan Petridis c8537e9474 GtkApplication: Start to refactor to into a App-channel structure. 2018-01-03 05:58:50 +02:00
Jordan Petridis a0476fedec ShowWidget: Split init into smaller functions and add comments. 2018-01-03 03:33:33 +02:00
Jordan Petridis f54ae2f1d5 EpisodeWidget: Code cleanup and splitting. 2018-01-03 03:02:46 +02:00
Jordan Petridis 2d71a99121 Change the auto-updater and checkup startup scheduling. 2018-01-02 20:47:49 +02:00
Jordan Petridis c67c6e463e EpisodeWidget: Its still a mess, but a bit cleaner. 2018-01-02 08:19:24 +02:00
Jordan Petridis c61d322569 EpisodeWidget: Implement shared download state. 2018-01-02 08:00:38 +02:00
Jordan Petridis 37e9b6fbf0 'How hard could it be' 2018-01-02 07:23:53 +02:00
Jordan Petridis 15b3eb115c ShowWidget: Add tooltip to the website button. 2018-01-01 19:46:27 +02:00
Jordan Petridis b32f448957 When downloading an episode, set it's title to rowid instead of it's title. 2018-01-01 16:36:15 +02:00
Jordan Petridis e42353e03f cargo update 2018-01-01 00:46:31 +02:00
Jordan Petridis a3c204a02d Headerbar: Fix add popup. 2018-01-01 00:42:14 +02:00
Jordan Petridis a3cd76dbf8 hammond-downloader: Use glob Insead of hardcoded file extensions. 2017-12-31 03:59:48 +02:00
Jordan Petridis 785a5f80c6 hammond-data::utils: Small and minor refactor. 2017-12-31 01:42:28 +02:00
Jordan Petridis e727734443 DB Schema: Remove episode.published_date column. 2017-12-30 22:23:10 +02:00
Jordan Petridis 963ff212ad hammond-gtk: Add some tooltips. Closes #13. 2017-12-30 21:56:44 +02:00
Jordan Petridis 3c84d889fd Headerbar: Do more stuff through glade, cut some code. 2017-12-30 21:19:29 +02:00
Jordan Petridis 5730e71e2a Clear TODO and FIXME that are no longer releavant. 2017-12-30 20:54:23 +02:00
Jordan Petridis 4894683924 hammond-gtk: Set the default theme to the dark variant for now. 2017-12-30 18:12:53 +02:00
Jordan Petridis ce08d49107 Headerbar: Added update indication. 2017-12-29 22:58:20 +02:00
Jordan Petridis bcc089bd82 ShowWidget: Migrate unsub button to use the GAction instead. 2017-12-29 20:33:47 +02:00
Jordan Petridis 036292284d hammond-data: Do not clean source url's cause some feeds use queries as identifiers for some reason. 2017-12-29 20:21:36 +02:00
Jordan Petridis ac286888bd hammond-gtk: Add more GActions and wire the EpisodeWidget. 2017-12-29 20:06:04 +02:00
Jordan Petridis fdd63afdfe hammond-gtk: Create Application wide actions. 2017-12-29 16:05:10 +02:00
Jordan Petridis ca06a16bd9 Closes #2. Kudo to @jwykeham for the fix!. 2017-12-29 02:45:02 +02:00
Jordan Petridis 55b6fccefd Make it explicit to run some tests. 2017-12-28 23:46:09 +02:00
Jordan Petridis 1d78ab7c42 Cargo upgrade. 2017-12-28 23:19:36 +02:00
Jordan Petridis 8a7d6d9f1b Add an empty CHANGELOG that follows keepachangelog.com format. Closes #23. 2017-12-28 22:41:22 +02:00
Jordan Petridis 287620d6cd hammond-gtk: Added some getters and removed some public fields. 2017-12-28 19:16:51 +02:00
Jordan Petridis 5942e47f2a hammond-gtk: Split gtk::Application into its own module. 2017-12-28 16:59:05 +02:00
Jordan Petridis a9d1084e05 gitlab-ci: Remove ci cache until gitlab-runner 10.4 release 2017-12-27 18:14:50 +02:00
Jordan Petridis 7d7b09ff0f hammond-data::parser: Prefer itunes_summary over channel.description if it exists. Finishes #20. 2017-12-27 17:59:40 +02:00
Jordan Petridis 1f0a2b5c6c hammond-data::parser: Prefer itunes_summary over item.description if it exists. Finishes #20. 2017-12-27 17:40:31 +02:00
Jordan Petridis ada73a616f EpisodeWidget: Make cancel button insensitive. 2017-12-27 15:13:09 +02:00
Jordan Petridis 0a7825dfff EpisodeWidget: Remove delete button and hide cancel button till refactor. 2017-12-26 21:36:18 +02:00
Jordan Petridis bfb74c4dba hammond-data: Index_loop does not wait for GET request to finish now. 2017-12-26 18:18:48 +02:00
Jordan Petridis 41abeeb2e3 Merge branch 'hamburger-menu' into 'master'
Hamburger menu

See merge request alatiera/Hammond!11
2017-12-26 14:25:47 +00:00
Jordan Petridis e99ab58b83 Headerbar: Add margins to the hamburger menu. 2017-12-26 15:46:25 +02:00
Jordan Petridis 933fec55a5 hammond-data::parser: Refactor Episode tests. 2017-12-26 13:40:52 +02:00
Jordan Petridis fde4bedce6 hammond-data::parser: Refactor Podcast tests. 2017-12-25 23:29:42 +02:00
Jordan Petridis d5b9379732 Headerbar: Remove some option from the menu. 2017-12-25 22:26:38 +02:00
Jordan Petridis 0a47b91913 Headerbar: Wire menu refresh button. 2017-12-25 22:03:37 +02:00
Jordan Petridis 9f51f4826f Headerbar: Added menu popup. 2017-12-25 21:54:57 +02:00
Jordan Petridis eee491f17c appdata.xml update. 2017-12-25 20:22:53 +02:00
Jordan Petridis 8cccbe928d hammond-gtk: Change application title. Addresses #28. 2017-12-24 20:33:18 +02:00
Jordan Petridis ee03d92fdb Merge branch 'master' into 'master'
[ui] add round corners to listboxes

See merge request alatiera/Hammond!10
2017-12-24 13:02:37 +00:00
Julian Sparber f8b9bdb696 [ui] add round corners to listboxes 2017-12-24 13:16:37 +01:00
Jordan Petridis ef705f9a2a Merge branch '27-episodesview' into 'master'
Resolve "EpisodesView"

Closes #27, #21, #22, #19, and #18

See merge request alatiera/Hammond!8
2017-12-23 15:05:17 +00:00
Jordan Petridis e7185d2cd3 Visual tweaks, and other minor stuff.
Added margins bottom margins on EpisodesView and ShowWidget.
Added some comment's to the code.
Silenced needless_pass_by_value clippy warning.
Updated TODO.md.
2017-12-23 16:56:03 +02:00
Jordan Petridis 30970c8dfb gitlab-ci: Force regeneration of gresources. 2017-12-23 16:35:23 +02:00
Jordan Petridis 2d6f02c407 EpisodeWidget: Do not display size if it's 0 bytes. 2017-12-23 15:44:28 +02:00
Jordan Petridis 37dbfff766 gitlab-ci: Do not cache rustfmt and clippy stuff. 2017-12-23 14:22:02 +02:00
Jordan Petridis f9d17afad3 hammond-gtk: Remove app menu. 2017-12-23 10:39:20 +02:00
Jordan Petridis 5234ecb2a7 Merge branch '27-episodesview' into '27-episodesview'
[ui] add custom style and [fix] draw List separators with css

See merge request alatiera/Hammond!9
2017-12-22 21:41:18 +00:00
Julian Sparber 32c60e7ffa merge 2017-12-22 22:10:40 +01:00
Julian Sparber 95c290df50 [ui] add custom style and [fix] draw List separators with css 2017-12-22 21:54:28 +01:00
Jordan Petridis 832495bece EpisodesView: Remove Year category. 2017-12-22 22:14:08 +02:00
Jordan Petridis ae6a97d725 EpisodesViewWidget: Add margins from the cover. 2017-12-22 21:21:39 +02:00
Jordan Petridis fac048a24d Small Visual tweaks all over the client. 2017-12-22 20:47:37 +02:00
Jordan Petridis 7aebb4d50d gitlab-ci: Add caching to the ci config. 2017-12-22 18:49:24 +02:00
Jordan Petridis 31b19dd88e Just things apple force you to do. 2017-12-22 18:28:18 +02:00
Jordan Petridis 0129efb02e EpisodeWidget: Display episode's duration. Closes #21. 2017-12-22 17:49:15 +02:00
Jordan Petridis 4512790f2d hammond-data: Add duration column to the episode table. 2017-12-22 17:30:07 +02:00
Jordan Petridis 5541b18a6a hammond-data::parser: Add itunesext_duration parser. 2017-12-22 16:55:45 +02:00
Jordan Petridis b820ee4db7 hammond-data::parser : Do not clean image urls cause feeds put redirects for uri for some reason. 2017-12-22 14:51:57 +02:00
Jordan Petridis 8513ba3644 EpisodesView: Use chrono to categorize widgets intead of epoch calculations. 2017-12-22 14:29:41 +02:00
Jordan Petridis 2ad0539a82 Downloader: Overwrite episode.lenght column upon download finish with the actual file size. Closes #22. 2017-12-21 22:15:17 +02:00
Jordan Petridis b7e160f735 EpisodeWidget: Change date representation based on it's year. Closes #19. 2017-12-21 21:50:50 +02:00
Jordan Petridis 4a033e6d89 EpisodeWidget: Remove the decimal places in the size label. 2017-12-21 21:37:51 +02:00
Jordan Petridis 378b8609aa EpisodeWidget: Change the byte unit based on the size. Closes #18. 2017-12-21 21:31:25 +02:00
Jordan Petridis c8310b1eb9 EpisodesView: Bump the labels size a bit. 2017-12-21 20:01:24 +02:00
Jordan Petridis 13b2043b76 EpisodesStack: Fix view selection upon creation. 2017-12-21 19:10:37 +02:00
Jordan Petridis e416bca963 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.
2017-12-21 17:36:07 +02:00
Jordan Petridis 74a6e5814a ShowWidget: Update EpisodesView when unsub button is activated. 2017-12-21 15:14:29 +02:00
Jordan Petridis 994ea5af22 EpisodesView: Remove unused label. 2017-12-20 22:08:07 +02:00
Jordan Petridis 336846f6dd EpisodesStack: Implemnt the transition between empty and populated. 2017-12-20 21:25:00 +02:00
Jordan Petridis db59bed69d hammond-data::utils: Modified EpisodeCleaner Diesel model to also be used with played_cleaner. 2017-12-20 19:18:20 +02:00
Jordan Petridis 3c24b9f9d9 hammond-data::utils: Added new Diesel model for the download checker. 2017-12-20 19:00:14 +02:00
Jordan Petridis 2e06205eda Define a new Diesel Model for PodcastCover querries.
Define new Diesel Model and impl From<Podcast> trait,
Change the signature of downloader::cache_image function,
Change and merge hammond-gtk::utils::get_pixbuf_from_path functions.
2017-12-20 18:19:31 +02:00
Jordan Petridis c070fc3032 EpisodesView: Ugly and Hacky Prototype of episode splitting. 2017-12-20 15:12:55 +02:00
Jordan Petridis ace62f7ed6 EpisodesView: Initial draft of episodewidget's splitting into the frames. 2017-12-20 14:49:28 +02:00
Jordan Petridis ccfea527ac gitlab-ci: use --force for clippy and rustfmt isntallation. 2017-12-20 13:25:31 +02:00
Jordan Petridis bda09c032a EpisodeWidget: Update the progrress bar only when download clicked. 2017-12-20 13:18:29 +02:00
Jordan Petridis 632f011db5 EpisodeView: Implement initial view update. 2017-12-20 13:13:32 +02:00
Jordan Petridis 914cad72f5 EpisodesView: Custom Diesel model not really necessary. 2017-12-19 20:45:40 +02:00
Jordan Petridis 895591f628 EpisodesView: Use show cover image. 2017-12-19 13:19:38 +02:00
Jordan Petridis ad9a932143 Fix diesel query. 2017-12-19 12:56:16 +02:00
Jordan Petridis f602e8c36d EpisodesView: Create a DieselModel for EpisodeViewWidget. 2017-12-19 11:04:44 +02:00
Jordan Petridis 5220eaceee EpisodesView: Add an empty cover to the widget. 2017-12-18 21:35:51 +02:00
Jordan Petridis 61bd7893c7 EpisodeWidget: Remove Podcast depndancy from new() method. 2017-12-18 19:10:50 +02:00
Jordan Petridis 32cd24fc7b EpisodesView: Added glade files and initial yak shaving. 2017-12-18 18:20:40 +02:00
Jordan Petridis 945600b20d Merge branch 'master' into 'master'
Set dim-label for secondary labels of EpisodeWidget in Glade.

See merge request alatiera/Hammond!7
2017-12-17 14:30:10 +00:00
Jordan Petridis e04de5a576 ShowsView: Move title to a tooltip, fix gresource, center flowbox halign. 2017-12-17 15:57:06 +02:00
Jordan Petridis 0826514cbc ShowsView: Remove new_episodes indicator. 2017-12-17 15:34:34 +02:00
Jordan Petridis 3cbda5979d Merge branch 'show_widget_redesign' into 'master'
Show widget redesign

See merge request alatiera/Hammond!6
2017-12-17 13:05:25 +00:00
Constantin Nickel 681b91d368 Set dim-label for secondary labels of EpisodeWidget in Glade. 2017-12-17 13:17:04 +01:00
Jordan Petridis 2eb58eae00 Headerbar: Remove refresh button. 2017-12-17 13:57:08 +02:00
Jordan Petridis 4c8c1f0013 Add update option to the app menu. 2017-12-17 13:52:00 +02:00
Jordan Petridis 35009e2574 Added an auto-updater that runs each hour. 2017-12-17 13:44:00 +02:00
Jordan Petridis 75fe0f8ff5 Use Default trait for creating Widget's that don't need arguments. 2017-12-17 13:08:51 +02:00
Jordan Petridis 440badf1eb ShowWidget: Strip html tags from the description. 2017-12-16 20:45:15 +02:00
Jordan Petridis f7af05a650 EpisodeWidget: Dim/Grey out widget if episode is played. 2017-12-16 20:30:25 +02:00
Jordan Petridis aca35c0513 ShowWidget: Improve? description handling. 2017-12-16 19:20:40 +02:00
Jordan Petridis f8ae2dcffe Update rustfmt.toml and remove rustfmt warnings. 2017-12-16 18:22:35 +02:00
Jordan Petridis 0653460fb2 EpisodeWidget: prevent title label overflow.
Set label's maximu character width to prevent it and elipsize instead.
2017-12-16 14:58:16 +02:00
Jordan Petridis dbe08f7deb EpisodeListBox: Improve the separator workaround. 2017-12-16 14:17:27 +02:00
Jordan Petridis 5989f4f541 ShowWidget: Set widget width to 600. 2017-12-15 21:15:20 +02:00
Jordan Petridis 4375c7f4ce EpisodeWidget: Added a separator in each widget.
This is a work around since list_box_set_header_func is not yet
available in the gtk-rs bindings.
2017-12-15 21:06:57 +02:00
Jordan Petridis 3c90e98d43 ShowWidget: Make settings button a GtkMenuButton. 2017-12-15 21:06:43 +02:00
Jordan Petridis b1af25e4c0 ShowWidget: Wire the website button to open podcast homepage. 2017-12-15 21:06:16 +02:00
Jordan Petridis 6614818418 Use Gtk::Frame to limit ShowWidget's size. 2017-12-15 19:55:13 +02:00
Jordan Petridis c74153f56a Initial implementation of the new ShowWidget. 2017-12-15 18:42:49 +02:00
Jordan Petridis 4b0a6ea0f7 Add Show title in the Headerbar when switching to ShowWidget. 2017-12-15 13:45:08 +02:00
Jordan Petridis 6284c8828b Merge branch 'episode_widget_redisgn' into 'master'
Episode widget redisgn

See merge request alatiera/Hammond!5
2017-12-15 11:30:15 +00:00
Jordan Petridis 0c1e759a45 Dim out secondary label of EpisodeWidget. 2017-12-15 12:27:30 +02:00
Jordan Petridis 0ac78fcff1 Added date label into EpisodeWidget. 2017-12-14 18:03:37 +02:00
Jordan Petridis e3b540170a Add file size indication based on rss item length. 2017-12-14 15:32:21 +02:00
Jordan Petridis a7208b0c61 Set EpisodeWidget button valignment to center instead of fill. 2017-12-14 14:46:41 +02:00
Jordan Petridis 9d07ba24b8 HeaderBar Refactor.
Removed the Headerbar stack.
Removed the ShowTitle.
Fixed StackSwitcher centering.
Set the Headerbar button valignment to center instead of fill.
2017-12-14 14:27:51 +02:00
Jordan Petridis afdb79b712 Set the progress bar into activity mode. 2017-12-14 13:38:18 +02:00
Jordan Petridis 8fe6b526a5 Add a new Diesel Model for the EpisodeWidget. 2017-12-14 12:01:35 +02:00
Jordan Petridis ebbebf7735 Initial implementation of the new EpisodeWidget. 2017-12-14 10:57:29 +02:00
Jordan Petridis fe136c8dbe use user-trash-symbolic instead of edit-delete-symbolic icon. 2017-12-14 08:42:52 +02:00
Jordan Petridis da57a966d5 Merge branch 'stack_redesign' into 'master'
Stack redesign

See merge request alatiera/Hammond!4
2017-12-13 16:28:06 +00:00
Jordan Petridis f0de6bfb1b Use symbolic icons instead. 2017-12-13 17:58:55 +02:00
Jordan Petridis d74aa9c625 Wire Headerbar back button and change initialiazation order. 2017-12-13 16:36:40 +02:00
Jordan Petridis 0bb0035f3c Rework of the Headerbar.
Added a stack to switch between a normal and a BackButton view.
Also added a centered stack switcher and removed the Home button.
Backbutton is not wired yet.
2017-12-13 13:53:15 +02:00
Jordan Petridis 0a52f87f3a Rename glade files. 2017-12-13 12:21:34 +02:00
Jordan Petridis 82a59d80dd Update README.md and CONTRIBUTING.md 2017-12-13 11:53:56 +02:00
Jordan Petridis 5defb5867a Move and rename stuff. 2017-12-13 11:35:17 +02:00
Jordan Petridis d5d55d4ef3 Update dependancies. 2017-12-12 16:51:24 +02:00
Jordan Petridis 01310ee7fa Working non-state machine stack implementation.
Removed the stack state-machines. It was confusing trying to both
implement statemachines and re-design the stack architecture at the same time.
2017-12-12 16:01:19 +02:00
Jordan Petridis 211b36dfa3 Fix showmachine updating. 2017-12-11 16:14:43 +02:00
Jordan Petridis ddb195db3c Wired up refresh button. 2017-12-11 13:51:16 +02:00
Jordan Petridis fa33138d66 Start switching to the new stack architecture. 2017-12-11 11:53:29 +02:00
Jordan Petridis ad7f5013f3 Extend ShowsMachine functionality. 2017-12-11 11:15:54 +02:00
Jordan Petridis e9b6e26f08 yet another attempt at implementing a stack state machine. 2017-12-10 23:23:09 +02:00
Jordan Petridis 2461dca94d Remove home button. 2017-12-10 19:15:32 +02:00
James Wykeham-Martin 6f635ac9fa Updated client.get request headers 2017-12-10 07:58:41 +00:00
Jordan Petridis e127941d8a Initial stackswitcher addition into the headerbar. 2017-12-10 09:53:05 +02:00
Jordan Petridis 851be1fcfb Schema hotfix. 2017-12-10 06:47:10 +02:00
Jordan Petridis d8281c70a5 Better naming of a dbquery function. 2017-12-10 06:11:03 +02:00
Jordan Petridis bc57c33491 Change episode table schema. 2017-12-09 17:38:46 +02:00
Jordan Petridis 999a2a1fc1 Strip whitespace during parsing. 2017-12-09 10:22:09 +02:00
Jordan Petridis 8b4684679b Merge branch 'client-rework' into 'master'
Client rework

See merge request alatiera/Hammond!3
2017-12-09 04:25:39 +00:00
Jordan Petridis b528c48e3b Run rustfmt. 2017-12-09 05:57:16 +02:00
Jordan Petridis 5b19274e6a Ignore the stack state machine until TryInto trait is stabilized. 2017-12-08 10:00:21 +02:00
Jordan Petridis 48e61c6377 Added small a utility that eats extra whitespace. 2017-12-07 18:31:45 +02:00
Jordan Petridis 1266c6e971 Switch to a Generic Struct instead of an Enum. 2017-12-07 15:24:15 +02:00
Jordan Petridis 41b0a36b81 Implement Into ContentState types. 2017-12-07 11:14:12 +02:00
Jordan Petridis 6801d0b1d1 Move replace_*view functions inot Content methods. 2017-12-07 10:51:16 +02:00
Jordan Petridis 973212254c My code is horrible, don't look at it. 2017-12-07 09:43:47 +02:00
Jordan Petridis 2b2f44b10e Attempt n42 of implementing a StateMachine. 2017-12-07 08:50:20 +02:00
Jordan Petridis 9431fb827f Bug fix. 2017-12-07 08:42:36 +02:00
Jordan Petridis d7af108833 WIP markup to html parser func. 2017-12-07 06:41:10 +02:00
Jordan Petridis c07d240532 Sanitize html during feed parsing. 2017-12-07 06:38:31 +02:00
Jordan Petridis 05e056481f Take advantage of <Into> trait from the generated builders. 2017-12-05 09:28:13 +02:00
Jordan Petridis 8e6cc4d2f2 Remove custom builders in favor of derive_builder crate. 2017-12-05 09:10:02 +02:00
Jordan Petridis 35f7464540 Use a gitlab-ci template instead of script duplication. 2017-12-05 07:47:07 +02:00
Jordan Petridis c8c0699d9c gitlab-ci tweak. 2017-12-05 07:37:43 +02:00
Jordan Petridis 0835b5ed4f flatpak manifest update 2017-12-05 06:22:59 +02:00
Jordan Petridis ca2ad9b2da rustfmt fix?. 2017-12-04 14:32:38 +02:00
Jordan Petridis 276169e43d Minor cleanup of nested match/if let statements into using and_then(). 2017-12-04 14:32:16 +02:00
Jordan Petridis ad1d9a155e Readme typo fix. 2017-12-02 09:03:21 +02:00
Jordan Petridis 8bd48a09a6 Groupd stack manipulation functions into content module. 2017-12-02 08:58:28 +02:00
Jordan Petridis 7727bc5ec3 Remove unnecessary Arc. 2017-12-02 01:46:37 +02:00
Jordan Petridis 74a1aae168 Upgraded diesel to 0.99 and switched from the git master into crated.io.
Also did a cargo upgrade of all the dependancies.
Notable upgrades are r2d2, lazystatic 1.0, loggerv 0.6 and rss 1.2
2017-12-02 01:39:28 +02:00
Jordan Petridis 9312366f62 Enable more lints. 2017-12-02 00:06:42 +02:00
Jordan Petridis 8d63db047a Temporary removed unused Content.fields. 2017-12-01 07:30:28 +02:00
Jordan Petridis 0359e9dd35 Convert EpisodeWidget into a Composed struct. 2017-12-01 07:13:41 +02:00
Jordan Petridis 91ac2c6445 Minor cleanups. 2017-12-01 06:40:32 +02:00
Jordan Petridis 2d4acc3ba3 Tweaked stack transition effects. 2017-12-01 06:21:48 +02:00
Jordan Petridis fb6fc68d23 Fix empty view. 2017-12-01 06:00:06 +02:00
Jordan Petridis 3fca086d14 Renamed stack children. 2017-12-01 05:32:47 +02:00
Jordan Petridis dcc541d832 Added a PodcastChild struct and groupd some flowbox_child methods. 2017-12-01 04:22:26 +02:00
Jordan Petridis 300fc3467d Remove more stuff. 2017-12-01 03:50:23 +02:00
Jordan Petridis 326ee75cd8 Remove old implementation. 2017-12-01 02:57:55 +02:00
Jordan Petridis b4b2f24c77 Use content struct instead of plain stack. 2017-12-01 01:30:19 +02:00
Jordan Petridis 5414dbdb37 Wire and use the new Header struct instead. 2017-12-01 01:20:49 +02:00
Jordan Petridis dd0034327b Add Content Struct. 2017-12-01 01:12:25 +02:00
Jordan Petridis 774e5b38a0 Add EmptyView Struct. 2017-12-01 01:03:10 +02:00
Jordan Petridis f1f4d10fe3 Add PopulatedView struct. 2017-12-01 01:00:07 +02:00
Jordan Petridis 84c918bbd5 Fix bug where the played button will always be shown by setting default state to not visible. 2017-11-30 21:39:21 +02:00
Jordan Petridis 94879b4256 Move get_pixbuf_from_path into hammond_gtk/src/utils.rs module. 2017-11-30 21:38:21 +02:00
Jordan Petridis bf240a00f4 Make a PodcastWidget Struct type. 2017-11-30 21:19:03 +02:00
Jordan Petridis b32e35c574 Rename podcasts_view module. 2017-11-30 21:10:05 +02:00
Jordan Petridis 1fbcfa47ac Refactor Headerbar into a Wrapped struct type. 2017-11-30 21:02:26 +02:00
Jordan Petridis 13e47e9b4e Version bump. 2017-11-28 10:46:03 +02:00
Jordan Petridis 13751e3708 Tweak gresource initialization. 2017-11-28 10:27:43 +02:00
Jordan Petridis c92e40e3cf Run download cleaner on startup. Closes #3. 2017-11-28 10:23:19 +02:00
Jordan Petridis 2051f0f58e Enable some extra clippy warnings. 2017-11-28 09:50:30 +02:00
Jordan Petridis c07215d357 Set hammond-data to build with Deny missing_docs. 2017-11-28 09:44:26 +02:00
Jordan Petridis e4a7a7becf Add module Doc comments. 2017-11-28 09:38:05 +02:00
Jordan Petridis 7dd8755bcb Document hammond-data/src/lib.rs xdg_dirs module. 2017-11-28 09:24:12 +02:00
Jordan Petridis 76f9f36609 Document Source Model. 2017-11-28 09:01:38 +02:00
Jordan Petridis 4d669ef297 Document Podcast Model. 2017-11-28 08:40:27 +02:00
Jordan Petridis 3707b70b41 Document Episode Model. 2017-11-28 08:25:04 +02:00
Jordan Petridis d81f9c6ad7 Fixed stable unit tests. 2017-11-28 04:42:15 +02:00
Jordan Petridis 34e808182c Documented a bit hammond-data/src/feed.rs. 2017-11-27 06:06:14 +02:00
Jordan Petridis c4030e51df Added some doc comments in hammond-data/src/utils.rs. 2017-11-27 05:25:16 +02:00
Jordan Petridis cb65782829 Extended the NewModel builder and added a bunch of unit tests. 2017-11-27 04:32:21 +02:00
Jordan Petridis ee4f08c5cf Implemented a BuildPattern for NewModels. Swiched stuff to pub(crate).
Added a Constructor for NewModels in order to make their fields private.
Also added getter methods that are mainly used in Unit tests.
2017-11-26 23:30:56 +02:00
Jordan Petridis 9e03aaae27 Upgrade gtk-rs crates. 2017-11-26 21:25:46 +02:00
Jordan Petridis 866904a687 Use generic IntoIterator instead of &[foo] slices. 2017-11-26 07:03:21 +02:00
Jordan Petridis 9d0df9de46 Tweak cargo privacy settings. 2017-11-26 06:21:14 +02:00
Jordan Petridis 7eff93ecf1 Remove rand from the downloader. 2017-11-26 03:47:43 +02:00
Jordan Petridis 6336f7cac1 Moved update funtions into a Trait and impl for NewModels. 2017-11-26 00:56:38 +02:00
Jordan Petridis 39dff5e27a Moved insert functions into an Insert trait and implemented it for each NewModel. 2017-11-26 00:40:03 +02:00
Jordan Petridis ce3a76aee1 Update episode rows instead of replacing them. 2017-11-26 00:13:51 +02:00
Jordan Petridis 39cccf85a5 Change the ci config. 2017-11-25 18:50:32 +02:00
Jordan Petridis 2f801043c1 In place update a podcast row instead of replace. 2017-11-25 18:22:56 +02:00
Jordan Petridis f83f894e44 Replaced pool.get().unwrap() statements with get()?. 2017-11-25 03:29:06 +02:00
Jordan Petridis f0a0fdfa83 Added a truncate_db helper function. 2017-11-25 03:01:21 +02:00
Jordan Petridis 7498a37f68 Fixed unit test. 2017-11-25 02:19:16 +02:00
Jordan Petridis faab32ba17 Fix podcast flowbox_child title label. 2017-11-25 02:00:37 +02:00
Jordan Petridis 62da8bbb52 Use source_id as the unique identifieble field for the podcast table. 2017-11-25 01:56:10 +02:00
Jordan Petridis 12ffe5c231 Use a db transaction when deleting a feed. 2017-11-24 20:40:32 +02:00
Jordan Petridis d9ef4fed53 Truncate the temp db before running test_complete_index. Should close #17. 2017-11-24 20:31:10 +02:00
Jordan Petridis 4a195eb1b7 Moved set_played_now into a method of the Episode model. 2017-11-24 19:48:20 +02:00
Jordan Petridis f7f0a16858 Minor cleanup. 2017-11-24 19:28:34 +02:00
Jordan Petridis 91f4a30c01 Moved episode indexing into a transaction. 2017-11-23 21:30:17 +02:00
Jordan Petridis 5570fdd118 Switched to using r2d2 instead of a databaseConnection object. 2017-11-23 21:09:50 +02:00
Jordan Petridis aa7c493e81 hammond-data/src/feed.rs api changes. 2017-11-23 18:48:41 +02:00
Jordan Petridis a58671ea9a Moved database related things into their own module. 2017-11-22 21:54:09 +02:00
Jordan Petridis 02b27d33b6 Move XDG global variables into their own module. 2017-11-22 21:07:21 +02:00
Jordan Petridis 6098f0f54a Banner fix? Closes #14. 2017-11-22 10:44:32 +02:00
Jordan Petridis 3bcb23b39a Redefine NewModels to hold Option<String> instead of Option<&str>. 2017-11-22 09:53:52 +02:00
Jordan Petridis 31328355b1 Methods renaming, Api changes. 2017-11-22 06:25:34 +02:00
Jordan Petridis 9bc6df2cba Made Disel NewModels private. 2017-11-22 05:50:25 +02:00
Jordan Petridis ee7c5ca26e Use bail! instead of panic!. 2017-11-20 22:23:04 +02:00
Jordan Petridis 7be0b5bbf8 Added a url cleanr. Closes #4. 2017-11-20 22:06:29 +02:00
Jordan Petridis 5890fe2bb4 Moved all diesel queries into hammond-data/src/dbquerries.rs module. 2017-11-20 20:05:00 +02:00
Jordan Petridis 0ce4107be4 Revert back to using an Arc<Mutex<Connection>> instead of the pool. 2017-11-20 18:09:53 +02:00
Jordan Petridis ce29602431 I hate everything. 2017-11-20 16:57:27 +02:00
Jordan Petridis e07683c046 partially-fixed the tests and benchmarks. 2017-11-20 01:08:34 +02:00
Jordan Petridis 5ad52fa4b2 Refactored to remove from Database refferences. 2017-11-19 23:32:37 +02:00
Jordan Petridis beaeeffba8 Refactored dbquerries.
Refactored so dbquerries.rs module *should* be the only piece of code
that interacts with a Database connection. Insert stuff will be moved too.
2017-11-19 23:08:36 +02:00
Jordan Petridis 47b32ac000 Removed the Database type alias. 2017-11-19 22:39:51 +02:00
Jordan Petridis 55442529a8 Initial switch to using r2d2. 2017-11-19 22:06:10 +02:00
Jordan Petridis 052988a2b1 Update dependancies. 2017-11-19 18:14:56 +02:00
Jordan Petridis a6dbf65575 Move stuff from hammond_data/src/lib.rs into utils. 2017-11-18 20:55:19 +02:00
Jordan Petridis 563f249a48 Reverted index_channel items to the synchronous version.
Using a transaction yields ~1/3 better performance as of now.
2017-11-18 19:57:50 +02:00
Jordan Petridis 5c84b77434 Converted iter_mut into into_iter wherever possible. 2017-11-18 19:23:25 +02:00
Jordan Petridis 494761beaf Removed id function from diesel models.
It's automaticly declared upon derive identifiable,
And there's no need to overwrite it.
2017-11-18 15:23:40 +02:00
Jordan Petridis 1bf5187e48 Renamed hammond-data/src/feedparser.rs module into parser.rs. 2017-11-18 15:05:55 +02:00
Jordan Petridis 6894f33895 Renamed hammond-data/src/index_feeds.rs module into feed.rs. 2017-11-18 14:32:58 +02:00
Jordan Petridis 450643371c Renamed index_feeds and fetch_feeds functions. 2017-11-18 14:24:52 +02:00
Jordan Petridis 1ec4370c7b Moved Database type-alias into hammond-data/src/lib.rs. 2017-11-17 21:37:55 +02:00
Jordan Petridis e66a337468 Moved indexing episode into a NewEpisode method.
There is a performance reggresion caused by the introduction of
Arc<Mutex<Connection>> instead of Connection that should be refactored.

Also removed the db transcaction as it was incomplete.
2017-11-17 20:01:59 +02:00
Jordan Petridis 282a29e7dd Move some indexing functions into methods of insertable models. 2017-11-17 18:58:44 +02:00
Jordan Petridis 8eca46871d Moved insert_return functions into methods of insertable models. 2017-11-17 18:10:29 +02:00
Jordan Petridis 2152aa9034 Convert Feed struct-tuple into a plain struct. 2017-11-17 16:24:48 +02:00
Jordan Petridis 3d108d4a7a Make Feed fields private. 2017-11-17 16:12:11 +02:00
Jordan Petridis 54a0f17588 Initial draft of hammond-data/src/index_feed.rs API redesign. 2017-11-17 13:26:39 +02:00
Jordan Petridis 3c6176b1c0 Renamed hammond-data/src/dbcheckup.rs into utils.rs 2017-11-16 23:32:40 +02:00
Jordan Petridis e2403255cf Updated Readme and TODO. 2017-11-16 00:40:59 +02:00
Jordan Petridis cfb876e006 Split hammond-data/models into sub modules. 2017-11-15 17:42:22 +02:00
Jordan Petridis 118846f255 Added extra columns to podcast and episode tables. 2017-11-15 16:58:21 +02:00
Jordan Petridis 8b4701f1a1 Renamed Gresource path in order to be less confusing. 2017-11-15 14:55:26 +02:00
Jordan Petridis a286014a62 Refactored indexing functions of the Diesel models. 2017-11-14 17:56:28 +02:00
Jordan Petridis 6996759db5 Removed the file open syscall from the benchmark. 2017-11-14 15:02:32 +02:00
Jordan Petridis 58e11f17b7 Use bigger rss feeds for benchmarking. 2017-11-14 14:49:43 +02:00
Jordan Petridis edd694e7d6 Added initial feed indexing benchmark. 2017-11-14 14:09:13 +02:00
Jordan Petridis 03637903c6 Update dependancies. 2017-11-14 13:06:09 +02:00
99 changed files with 26351 additions and 4092 deletions
+5 -1
View File
@@ -1,4 +1,4 @@
/target/
target/
**/*.rs.bk
Cargo.lock
.vscode
@@ -7,3 +7,7 @@ Cargo.lock
_build
vendor/
.flatpak-builder/
flatpak-build/
repo/
Makefile
.criterion
+32 -46
View File
@@ -11,65 +11,51 @@ before_script:
- apt-get install -yqq --no-install-recommends libgtk-3-dev
# - apt-get install -yqq --no-install-recommends meson
# kcov
# - apt-get install -y libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev
.cargo_test_template: &cargo_test
stage: test
script:
- rustc --version && cargo --version
# Force regeneration of gresources regardless of artifacts chage
- cd hammond-gtk/resources/ && glib-compile-resources --generate resources.xml && cd ../../
- cargo build
- cargo test --verbose -- --test-threads=1
- cargo test --verbose -- --test-threads=1 --ignored
# variables:
variables:
# RUSTFLAGS: "-C link-dead-code"
RUST_BACKTRACE: "FULL"
CARGO_HOME: $CI_PROJECT_DIR/cargo
# Currently doesnt work.
# # Build with meson
# build:stable:
# # Stable img
# # https://hub.docker.com/_/rust/
# image: "rust"
# script:
# - rustc --version && cargo --version
# - ./configure --prefix=/usr/local
# - make && sudo make install
# build:nightly:
# # Nightly
# # https://hub.docker.com/r/rustlang/rust/
# image: "rustlang/rust:nightly"
# script:
# - rustc --version && cargo --version
# - ./configure --prefix=/usr/local
# - make && sudo make install
test:stable:
# Stable img
stable:test:
# https://hub.docker.com/_/rust/
image: "rust"
script:
- rustc --version && cargo --version
- cargo build --all
- cargo test --all --verbose
<<: *cargo_test
test:nightly:
# Nightly
# https://hub.docker.com/r/rustlang/rust/
image: "rustlang/rust:nightly"
script:
- rustc --version && cargo --version
- cargo build --all
- cargo test --all --verbose
# - cargo bench
# nightly:test:
# # https://hub.docker.com/r/rustlang/rust/
# image: "rustlang/rust:nightly"
# <<: *cargo_test
# Configure and run rustfmt on nightly
# Exits and builds fails if on bad format
lint:rustfmt:
rustfmt:
image: "rustlang/rust:nightly"
stage: lint
variables:
CFG_RELEASE_CHANNEL: "nightly"
script:
- rustc --version && cargo --version
- cargo install rustfmt-nightly
- cargo install rustfmt-nightly --force
- cargo fmt --all -- --write-mode=diff
# Configure and run clippy on nightly
# Only fails on errors atm.
lint:clippy:
image: "rustlang/rust:nightly"
script:
- rustc --version && cargo --version
- cargo install clippy
- cargo clippy --all
# clippy:
# image: "rustlang/rust:nightly"
# stage: lint
# script:
# - rustc --version && cargo --version
# - cargo install clippy --force
# # Force regeneration of gresources regardless of artifacts chage
# - cd hammond-gtk/resources/ && glib-compile-resources --generate resources.xml && cd ../../
# - cargo clippy --all
+24
View File
@@ -0,0 +1,24 @@
## Invalid RSS Feed Template.
Please provide the source of the xml rss feed.
**Feed URL**
example.com/podcast
**Detailed description of the issue**
Would be helpfull if error messages where included from stderr.
If you are not sure how to do it, feel free to ask and we will walk you through it!
Some common cases might be:
* Feed cannot be added
* Broken Feed Image
* Episode(s) do not download
Steps to reproduce:
1. Open Hammond
2. Do an action
3. ...
-11
View File
@@ -7,14 +7,3 @@ Steps to reproduce:
2. Do an action
3. ...
## Design Tasks
* [ ] design tasks
## Development Tasks
* [ ] development tasks
## QA Tasks
* [ ] qa (quality assurance) tasks
+31
View File
@@ -0,0 +1,31 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.3.0] - 2018-02-11
* Tobias Bernard Redesigned the whole Gtk+ client.
* Complete re-write of hammond-data and hammond-gtk modules.
* Error handling for all crates was migrated from error-chain to Failure.
* Hammond-data now uses futures to parse feeds.
* Custom gtk-widgets are now composed structs as opposed to functions returning Gtk widgets.
## [0.2.0] - 2017-11-28
* Database Schema Breaking Changes.
* Added url sanitization. #4.
* Reworked and refactored of the hammond-data API.
* Added some more unit tests
* Documented hammond-data public API.
## [0.1.1] - 2017-11-13
* Added appdata.xml file
## [0.1.0] - 2017-11-13
Initial Release
+45 -20
View File
@@ -1,34 +1,57 @@
> Adapted from Gnome-TODO
> https://gitlab.gnome.org/GNOME/gnome-todo/blob/582f9a57b84f92dc629b2042b887188878578cdb/CONTRIBUTING.md
## Contributing
## Contributing to Hammond
Contributing
Thank you for looking in this file!
When contributing to the development of Hammond, please first discuss the change you wish to make via issue, email, or any other method with the maintainers before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
If you have any questions regarding the use or development of Hammond,
want to discuss design or simply hang out, please join us in [#hammond on irc.gnome.org.](irc://irc.gnome.org/#hammond)
Please note we have a [code of conduct](https://wiki.gnome.org/Foundation/CodeOfConduc), please follow it in all your interactions with the project.
## Source repository
Hammond's main source repository is at gitlab.gnome.org. You can view
the web interface [here](https://gitlab.gnome.org/alatiera/hammond)
Development happens in the master branch.
Note that we don't do bug tracking in the Github mirror.
If you need to publish a branch, feel free to do it at any
publically-accessible Git hosting service, although gitlab.gnome.org
makes things easier for the maintainers.
## Style
We use rustfmt for code formatting and we enforce it on the gitlab-CI server.
We use [rustfmt](https://github.com/rust-lang-nursery/rustfmt) for code formatting and we enforce it on the gitlab-CI server.
Quick setup
```
cargo install rustfmt-nightly
cargo fmt --all
```
```
cargo install rustfmt-nightly
cargo fmt --all
```
It is recommended to add a pre-commit hook to run cargo test and cargo fmt
```
#!/bin/sh
cargo test --all && cargo fmt --all -- --write-mode=diff
```
It is recommended to add a pre-commit hook to run cargo test and `cargo fmt`.
Don't forget to `git add` again after `cargo fmt`.
```
#!/bin/sh
cargo test -- --test-threads=1 && cargo fmt --all -- --write-mode=diff
```
## Running the test suite
Running the tests requires an internet connection and it it will download some files from the [Internet Archive](archive.org)
The test suite sets a temporary sqlite database in the `/tmp` folder.
Due to that it's not possible to run them in parrallel.
In order to run the test suite use the following: `cargo test -- --test-threads=1`
# Issues, issues and more issues!
There are many ways you can contribute to Hammond, and all of them involve creating issues
in [Hammond issue tracker](https://gitlab.gnome.org/alatiera/Hammond/issues). This is the
entry point for your contribution.
in [Hammond issue tracker](https://gitlab.gnome.org/alatiera/Hammond/issues). This is the entry point for your contribution.
To create an effective and high quality ticket, try to put the following information on your
ticket:
@@ -71,8 +94,10 @@ Steps to reproduce:
## Pull Request Process
1. Ensure your code compiles. Run `make` before creating the pull request.
2. If you're adding new API, it must be properly documented.
3. The commit message is formatted as follows:
2. Ensure the test suit passes. Run `cargo test -- --test-threads=1`.
3. Ensure your code is properly formated. Run `cargo fmt --all`.
4. If you're adding new API, it must be properly documented.
5. The commit message is formatted as follows:
```
component: <summary>
@@ -82,7 +107,7 @@ Steps to reproduce:
<link to the bug ticket>
```
4. You may merge the pull request in once you have the sign-off of the maintainers, or if you
6. You may merge the pull request in once you have the sign-off of the maintainers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.
## Code of Conduct
Generated
+888 -489
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -7,3 +7,4 @@ members = [
[profile.release]
debug = false
+79 -42
View File
@@ -1,23 +1,28 @@
# Hammond
## Multithreaded, safe, and reliable Gtk+ Podcast client.
This is a prototype of a podcast client written in Rust.
## A Podcast Client for the GNOME Desktop written in Rust.
[![pipeline status](https://gitlab.gnome.org/alatiera/Hammond/badges/master/pipeline.svg)](https://gitlab.gnome.org/alatiera/Hammond/commits/master)
![podcasts_view](./assets/podcasts_view.png)
![podcast_widget](./assets/podcast_widget.png)
### Features
## Getting in Touch
If you have any questions regarding the
use or development of Hammond, want to discuss design or simply hang out, please join us in [#hammond on irc.gnome.org.](irc://irc.gnome.org/#hammond)
* TBA
Sidenote:
There isn't much documentation yet, so you will probably have question about parts of the Code.
![episdes_view](./screenshots/episodes_view.png)
![shows_view](./screenshots/shows_view.png)
![show_widget](./screenshots/show_widget.png)
## Quick start
As of January 19 2018, Hammond can be built and run with [Gnome Builder](https://wiki.gnome.org/Apps/Builder) Nightly
and any Stable release of Gnome Builder >= 3.28.0.
Get Builder [here](https://wiki.gnome.org/Apps/Builder/Downloads)
Manually:
The following steps assume you have a working installation of rustc and cargo.
If you dont take a look at [rustup.rs](rustup.rs)
If you dont take a look at [rustup.rs](https://rustup.rs/)
```sh
git clone https://gitlab.gnome.org/alatiera/hammond.git
@@ -25,7 +30,41 @@ cd Hammond/
cargo run -p hammond-gtk --release
```
## Install from soure
## Broken Feeds
Found a feed that does not work in Hammond?
Please [open an issue](https://gitlab.gnome.org/alatiera/Hammond/issues/new) and choose the `BrokenFeed` template so we will know and fix it!
## Getting in Touch
If you have any questions regarding the use or development of Hammond,
want to discuss design or simply hang out, please join us in [#hammond on irc.gnome.org.](irc://irc.gnome.org/#hammond)
Note:
There isn't much documentation yet, so you will probably have question about parts of the Code.
### Flatpak
Flatpak is the reccomended way of building and installing Hammond.
#### Building a Flatpak
Download the `org.gnome.Hammond.json` flatpak manifest from this repo.
```bash
# Add flathub repo
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# Add the gnome-nightly repo
flatpak --user remote-add gnome-nightly https://sdk.gnome.org/gnome-nightly.flatpakrepo
# Install the required rust-stable extension from flathub
flatpak --user install flathub org.freedesktop.Sdk.Extension.rust-stable
flatpak-builder --repo=repo hammond org.gnome.Hammond.json --force-clean
flatpak build-bundle repo hammond org.gnome.Hammond
```
## Building from soure
```sh
git clone https://gitlab.gnome.org/alatiera/hammond.git
cd Hammond/
@@ -33,49 +72,58 @@ cd Hammond/
make && sudo make install
```
**Additionall:**
**Additional:**
You can run `sudo make uninstall` for removal
And `make clean` to clean up the enviroment after instalation.
### Dependencies
### Flatpak
Flatpak instructions... Soon™.
## Building
### Dependancies
* Rust stable 1.21 or later.
* Rust stable 1.22 or later.
* Gtk+ 3.22 or later
* Meson
**Debian/Ubuntu**:
**Debian/Ubuntu**
```sh
apt-get update -yqq
apt-get install -yqq --no-install-recommends build-essential
apt-get install -yqq --no-install-recommends libgtk-3-dev meson
```
**Fedora**:
**Fedora**
```sh
dnf install -y gtk3-devel glib2-devel openssl-devel sqlite-devel meson
```
If you happen to build it on other distributions please let me know the names of the corresponding libraries. Feel free to open a PR or an Issue to note it.
```sh
git clone https://gitlab.gnome.org/alatiera/Hammond.git
cd Hammond/
cargo build --all
```
## Contributing
There alot of thins yet to be done.
If you want to contribute, please check the [Contributions Guidelines][contribution-guidelines].
You can start by taking a look at [Issues](https://gitlab.gnome.org/alatiera/Hammond/issues) or by opening a [New issue](https://gitlab.gnome.org/alatiera/Hammond/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=).
There are also some minor tasks tagged with `TODO:` and `FIXME:` in the source code.
[contribution-guidelines]: https://gitlab.gnome.org/alatiera/Hammond/blob/master/CONTRIBUTING.md
## Overview
```sh
$ tree -d
├── assets # png's used in the README.md
├── hammond-data # Storate related stuff, Sqlite db, XDG setup.
│   ├── migrations # Diesel migrations.
├── screenshots # png's used in the README.md
├── hammond-data # Storate related stuff, SQLite, XDG setup, RSS Parser.
│   ├── migrations # Diesel SQL migrations.
│   │   └── ...
│   ├── src
│   └── tests
@@ -86,20 +134,10 @@ $ tree -d
│   ├── resources # GResources folder
│   │   └── gtk # Contains the glade.ui files.
│   └── src
│   ├── views # Currently only contains the Podcasts_view.
│   └── widgets # Contains custom widgets such as Podcast and Episode.
│   ├── views # Contains the Empty, Episodes and Shows view.
│   └── widgets # Contains custom widgets such as Show and Episode.
```
## Contributing
There alot of thins yet to be done.
You can find start by taking a look at [Issues](https://gitlab.gnome.org/alatiera/Hammond/issues) or Opening a [New one](https://gitlab.gnome.org/alatiera/Hammond/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=).
You may also want to take a look at [TODO.md](https://gitlab.gnome.org/alatiera/Hammond/blob/master/TODO.md) or grep the source code for `TODO:` and `FIXME:` tags.
If you want to contribute, please check the [Contributions Guidelines][contribution-guidelines].
[contribution-guidelines]: https://gitlab.gnome.org/GNOME/gnome-todo/blob/master/CONTRIBUTING.md
## A note about the project's name
The project was named after Allan Moore's character [Evey Hammond](https://en.wikipedia.org/wiki/Evey_Hammond) from the graphic novel V for Vendetta.
@@ -108,9 +146,8 @@ It has nothing to do with the horrible headlines on the news.
## Acknowledgments
Hammond's design is heavily insired by [Gnome-Music](https://wiki.gnome.org/Design/Apps/Music) and [Vocal](http://vocalproject.net/).
Hammond's design is heavily insired by [GNOME Music](https://wiki.gnome.org/Design/Apps/Music) and [Vocal](http://vocalproject.net/).
We also copied some elements from [Gnome-news](https://wiki.gnome.org/Design/Apps/Potential/News).
We also copied some elements from [GNOME News](https://wiki.gnome.org/Design/Apps/Potential/News).
And almost the entirety of the build system is copied from the [Fractal](https://gitlab.gnome.org/danigm/fractal) project.
+18 -57
View File
@@ -1,71 +1,32 @@
## TODOs:
# TODOs
**General:**
## Planned Features
- [x] Add CONTRIBUTING.md
- [x] Add Issues and Pull Request templates
- [ ] Write docs
## Priorities
## Priorities:
**Would be nice:**
- [x] Use GResource for assets like the banner.png etc, instead of hardcoded paths.
- [x] Possibly Convert description labels to textview.
- [ ] Make Podcast cover fetchng and loading not block the execution of the program at startup.
- [ ] Re-design EpisodeWidget.
- [ ] Lazy evaluate episode loading based on the podcast_widget's view scrolling.
- [ ] Headerbar back button and stack switching
- [x] New episode notifier on podcast_flowbox_child, like the one vocal has
- [ ] Polish the flowbox_child banner.
- [x] Update on startup
**Unhack stuff:**
- [ ] Url sanitization
- [x] Fix downloader .ext parsing
**FIXME:**
- [x] Fix Flowbox child activation. [#1](https://gitlab.gnome.org/alatiera/Hammond/issues/1)
- [ ] Fix Etag/Last-modified implementation. [#2](https://gitlab.gnome.org/alatiera/Hammond/issues/2)
**DB changes:**
- [x] episodes: add watched field
- [x] Podcast deletion
- [x] Download cleaner
## Secondary:
- [ ] Discuss and decide when to schedule the download cleaner. [#3](https://gitlab.gnome.org/alatiera/Hammond/issues/3)
- [ ] Unplayed Only and Downloaded only view.
- [ ] Auto-updater
- [ ] Make use of file metadas, [This](https://github.com/GuillaumeGomez/audio-video-metadata) might be helpfull.
- [ ] OPML import/export // Probably need to create a crate.
**DB changes:**
## Second
- [ ] Mark episodes/podcast for archival
- [ ] Mark stuff as Favorite. Maybe auto-archive favorites?
## Third:
- [ ] Notifications
- [ ] Make use of file metadas, [This](https://github.com/GuillaumeGomez/audio-video-metadata) might be helpfull.
- [ ] Episode queue
- [ ] Embedded player
- [ ] MPRIS integration
- [ ] Search Implementation
## Third
## Fourth:
- [ ] 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
- [ ] YoutubeFeeds
- [ ] Integrate with Itunes API for various crap?
- [ ] YoutubeFeeds?
## Rest Tasks
**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 show_widget's scrolling.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 KiB

Vendored
+4 -1
View File
@@ -136,9 +136,12 @@ fi
cat > Makefile <<END
# Generated by configure; do not edit
all:
all: rebuild
${NINJA} ${NINJA_OPT}
rebuild:
rm -f ${builddir}/hammond
install:
DESTDIR="\$(DESTDIR)" ${NINJA} ${NINJA_OPT} install
+32 -15
View File
@@ -5,25 +5,42 @@ version = "0.1.0"
workspace = "../"
[dependencies]
chrono = "0.4"
ammonia = "1.0.1"
chrono = "0.4.0"
derive_builder = "0.5.1"
dotenv = "0.10.1"
error-chain = "0.11"
lazy_static = "0.2"
log = "0.3"
rayon = "0.9"
reqwest = "0.8"
rfc822_sanitizer = "0.3"
rss = "1.1"
xdg = "2.1"
error-chain = "0.11.0"
itertools = "0.7.6"
lazy_static = "1.0.0"
log = "0.4.1"
rayon = "0.9.0"
rfc822_sanitizer = "0.3.3"
rss = "1.2.1"
url = "1.6.0"
xdg = "2.1.0"
futures = "0.1.18"
hyper = "0.11.18"
tokio-core = "0.1.12"
hyper-tls = "0.1.2"
native-tls = "0.1.5"
futures-cpupool = "0.1.8"
num_cpus = "1.8.0"
failure = "0.1.1"
failure_derive = "0.1.1"
[dependencies.diesel]
features = ["sqlite"]
version = "0.16"
features = ["sqlite", "r2d2"]
version = "1.1.1"
[dependencies.diesel_codegen]
[dependencies.diesel_migrations]
features = ["sqlite"]
version = "0.16"
version = "1.1.0"
[dev-dependencies]
rand = "0.3"
tempdir = "0.3"
rand = "0.4.2"
tempdir = "0.3.6"
criterion = "0.2.0"
[[bench]]
name = "bench"
harness = false
+125
View File
@@ -0,0 +1,125 @@
#[macro_use]
extern crate criterion;
use criterion::Criterion;
// extern crate futures;
// extern crate futures_cpupool;
extern crate hammond_data;
extern crate hyper;
extern crate hyper_tls;
extern crate rand;
extern crate tokio_core;
// extern crate rayon;
extern crate rss;
// use rayon::prelude::*;
// use futures::future::*;
// use futures_cpupool::CpuPool;
use tokio_core::reactor::Core;
use hammond_data::FeedBuilder;
use hammond_data::Source;
use hammond_data::database::truncate_db;
use hammond_data::pipeline;
// use hammond_data::errors::*;
use std::io::BufReader;
// RSS feeds
const INTERCEPTED: &[u8] = include_bytes!("../tests/feeds/2018-01-20-Intercepted.xml");
const INTERCEPTED_URL: &str = "https://web.archive.org/web/20180120083840if_/https://feeds.\
feedburner.com/InterceptedWithJeremyScahill";
const UNPLUGGED: &[u8] = include_bytes!("../tests/feeds/2018-01-20-LinuxUnplugged.xml");
const UNPLUGGED_URL: &str =
"https://web.archive.org/web/20180120110314if_/https://feeds.feedburner.com/linuxunplugged";
const TIPOFF: &[u8] = include_bytes!("../tests/feeds/2018-01-20-TheTipOff.xml");
const TIPOFF_URL: &str =
"https://web.archive.org/web/20180120110727if_/https://rss.acast.com/thetipoff";
// This feed has HUGE descripion and summary fields which can be very
// very expensive to parse.
const CODE: &[u8] = include_bytes!("../tests/feeds/2018-01-20-GreaterThanCode.xml");
const CODE_URL: &str =
"https://web.archive.org/web/20180120104741if_/https://www.greaterthancode.com/feed/podcast";
// Relative small feed
const STARS: &[u8] = include_bytes!("../tests/feeds/2018-01-20-StealTheStars.xml");
const STARS_URL: &str =
"https://web.archive.org/web/20180120104957if_/https://rss.art19.com/steal-the-stars";
static FEEDS: &[(&[u8], &str)] = &[
(INTERCEPTED, INTERCEPTED_URL),
(UNPLUGGED, UNPLUGGED_URL),
(TIPOFF, TIPOFF_URL),
(CODE, CODE_URL),
(STARS, STARS_URL),
];
// This is broken and I don't know why.
fn bench_pipeline(c: &mut Criterion) {
truncate_db().unwrap();
FEEDS.iter().for_each(|&(_, url)| {
Source::from_url(url).unwrap();
});
c.bench_function("pipline", move |b| {
b.iter(|| {
let sources = hammond_data::dbqueries::get_sources().unwrap();
pipeline::run(sources, true).unwrap();
})
});
truncate_db().unwrap();
}
fn bench_index_large_feed(c: &mut Criterion) {
truncate_db().unwrap();
let url = "https://www.greaterthancode.com/feed/podcast";
let mut core = Core::new().unwrap();
c.bench_function("index_large_feed", move |b| {
b.iter(|| {
let s = Source::from_url(url).unwrap();
// parse it into a channel
let chan = rss::Channel::read_from(BufReader::new(CODE)).unwrap();
let feed = FeedBuilder::default()
.channel(chan)
.source_id(s.id())
.build()
.unwrap();
core.run(feed.index()).unwrap();
})
});
truncate_db().unwrap();
}
fn bench_index_small_feed(c: &mut Criterion) {
truncate_db().unwrap();
let url = "https://rss.art19.com/steal-the-stars";
let mut core = Core::new().unwrap();
c.bench_function("index_small_feed", move |b| {
b.iter(|| {
let s = Source::from_url(url).unwrap();
// parse it into a channel
let chan = rss::Channel::read_from(BufReader::new(STARS)).unwrap();
let feed = FeedBuilder::default()
.channel(chan)
.source_id(s.id())
.build()
.unwrap();
core.run(feed.index()).unwrap();
})
});
truncate_db().unwrap();
}
criterion_group!(
benches,
bench_pipeline,
bench_index_large_feed,
bench_index_small_feed
);
criterion_main!(benches);
@@ -1,34 +1,34 @@
-- Till version 0.2 is released the plan is to edited directly and dont expect
-- any kind of non-braking changes.
-- After there is a stable prototype, Only diesel migrations will be used
-- in order to change the db schema.
CREATE TABLE `source` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
`uri` TEXT NOT NULL UNIQUE,
`last_modified` TEXT,
`http_etag` TEXT
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
`uri` TEXT NOT NULL UNIQUE,
`last_modified` TEXT,
`http_etag` TEXT
);
CREATE TABLE `episode` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
`title` TEXT,
`uri` TEXT NOT NULL UNIQUE,
`local_uri` TEXT,
`description` TEXT,
`published_date` TEXT ,
`epoch` INTEGER NOT NULL DEFAULT 0,
`length` INTEGER,
`guid` TEXT,
`played` INTEGER ,
`podcast_id` INTEGER NOT NULL
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
`title` TEXT,
`uri` TEXT NOT NULL UNIQUE,
`local_uri` TEXT,
`description` TEXT,
`published_date` TEXT,
`epoch` INTEGER NOT NULL DEFAULT 0,
`length` INTEGER,
`guid` TEXT,
`played` INTEGER,
`favorite` INTEGER NOT NULL DEFAULT 0,
`archive` INTEGER NOT NULL DEFAULT 0,
`podcast_id` INTEGER NOT NULL
);
CREATE TABLE `podcast` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
`title` TEXT NOT NULL UNIQUE,
`link` TEXT NOT NULL,
`description` TEXT NOT NULL,
`image_uri` TEXT,
`source_id` INTEGER NOT NULL
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
`title` TEXT NOT NULL,
`link` TEXT NOT NULL,
`description` TEXT NOT NULL,
`image_uri` TEXT,
`favorite` INTEGER NOT NULL DEFAULT 0,
`archive` INTEGER NOT NULL DEFAULT 0,
`always_dl` INTEGER NOT NULL DEFAULT 0,
`source_id` INTEGER NOT NULL UNIQUE
);
@@ -0,0 +1,23 @@
ALTER TABLE episode RENAME TO old_table;
CREATE TABLE episode (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
title TEXT,
uri TEXT NOT NULL UNIQUE,
local_uri TEXT,
description TEXT,
published_date TEXT,
epoch INTEGER NOT NULL DEFAULT 0,
length INTEGER,
guid TEXT,
played INTEGER,
favorite INTEGER NOT NULL DEFAULT 0,
archive INTEGER NOT NULL DEFAULT 0,
podcast_id INTEGER NOT NULL
);
INSERT INTO episode (title, uri, local_uri, description, published_date, epoch, length, guid, played, favorite, archive, podcast_id)
SELECT title, uri, local_uri, description, published_date, epoch, length, guid, played, favorite, archive, podcast_id
FROM old_table;
Drop table old_table;
@@ -0,0 +1,22 @@
ALTER TABLE episode RENAME TO old_table;
CREATE TABLE episode (
title TEXT NOT NULL,
uri TEXT,
local_uri TEXT,
description TEXT,
published_date TEXT,
epoch INTEGER NOT NULL DEFAULT 0,
length INTEGER,
guid TEXT,
played INTEGER,
podcast_id INTEGER NOT NULL,
favorite INTEGER DEFAULT 0,
archive INTEGER DEFAULT 0,
PRIMARY KEY (title, podcast_id)
);
INSERT INTO episode (title, uri, local_uri, description, published_date, epoch, length, guid, played, favorite, archive, podcast_id)
SELECT title, uri, local_uri, description, published_date, epoch, length, guid, played, favorite, archive, podcast_id
FROM old_table;
Drop table old_table;
@@ -0,0 +1,22 @@
ALTER TABLE episode RENAME TO old_table;
CREATE TABLE episode (
title TEXT NOT NULL,
uri TEXT,
local_uri TEXT,
description TEXT,
published_date TEXT,
epoch INTEGER NOT NULL DEFAULT 0,
length INTEGER,
guid TEXT,
played INTEGER,
podcast_id INTEGER NOT NULL,
favorite INTEGER DEFAULT 0,
archive INTEGER DEFAULT 0,
PRIMARY KEY (title, podcast_id)
);
INSERT INTO episode (title, uri, local_uri, description, published_date, epoch, length, guid, played, favorite, archive, podcast_id)
SELECT title, uri, local_uri, description, published_date, epoch, length, guid, played, favorite, archive, podcast_id
FROM old_table;
Drop table old_table;
@@ -0,0 +1,23 @@
ALTER TABLE episode RENAME TO old_table;
CREATE TABLE episode (
title TEXT NOT NULL,
uri TEXT,
local_uri TEXT,
description TEXT,
published_date TEXT,
epoch INTEGER NOT NULL DEFAULT 0,
length INTEGER,
duration INTEGER,
guid TEXT,
played INTEGER,
podcast_id INTEGER NOT NULL,
favorite INTEGER DEFAULT 0,
archive INTEGER DEFAULT 0,
PRIMARY KEY (title, podcast_id)
);
INSERT INTO episode (title, uri, local_uri, description, published_date, epoch, length, guid, played, favorite, archive, podcast_id)
SELECT title, uri, local_uri, description, published_date, epoch, length, guid, played, favorite, archive, podcast_id
FROM old_table;
Drop table old_table;
@@ -0,0 +1,24 @@
ALTER TABLE episode RENAME TO old_table;
CREATE TABLE episode (
title TEXT NOT NULL,
uri TEXT,
local_uri TEXT,
description TEXT,
published_date TEXT,
epoch INTEGER NOT NULL DEFAULT 0,
length INTEGER,
duration INTEGER,
guid TEXT,
played INTEGER,
podcast_id INTEGER NOT NULL,
favorite INTEGER DEFAULT 0,
archive INTEGER DEFAULT 0,
PRIMARY KEY (title, podcast_id)
);
INSERT INTO episode (title, uri, local_uri, description, epoch, length, duration, guid, played, favorite, archive, podcast_id)
SELECT title, uri, local_uri, description, epoch, length, duration, guid, played, favorite, archive, podcast_id
FROM old_table;
Drop table old_table;
@@ -0,0 +1,23 @@
ALTER TABLE episode RENAME TO old_table;
CREATE TABLE episode (
title TEXT NOT NULL,
uri TEXT,
local_uri TEXT,
description TEXT,
epoch INTEGER NOT NULL DEFAULT 0,
length INTEGER,
duration INTEGER,
guid TEXT,
played INTEGER,
podcast_id INTEGER NOT NULL,
favorite INTEGER DEFAULT 0,
archive INTEGER DEFAULT 0,
PRIMARY KEY (title, podcast_id)
);
INSERT INTO episode (title, uri, local_uri, description, epoch, length, duration, guid, played, favorite, archive, podcast_id)
SELECT title, uri, local_uri, description, epoch, length, duration, guid, played, favorite, archive, podcast_id
FROM old_table;
Drop table old_table;
+76
View File
@@ -0,0 +1,76 @@
//! Database Setup. This is only public to help with some unit tests.
use diesel::prelude::*;
use diesel::r2d2;
use diesel::r2d2::ConnectionManager;
use std::io;
use std::path::PathBuf;
use errors::DataError;
#[cfg(not(test))]
use xdg_dirs;
type Pool = r2d2::Pool<ConnectionManager<SqliteConnection>>;
embed_migrations!("migrations/");
lazy_static!{
static ref POOL: Pool = init_pool(DB_PATH.to_str().unwrap());
}
#[cfg(not(test))]
lazy_static! {
static ref DB_PATH: PathBuf = xdg_dirs::HAMMOND_XDG.place_data_file("hammond.db").unwrap();
}
#[cfg(test)]
extern crate tempdir;
#[cfg(test)]
lazy_static! {
static ref TEMPDIR: tempdir::TempDir = {
tempdir::TempDir::new("hammond_unit_test").unwrap()
};
static ref DB_PATH: PathBuf = TEMPDIR.path().join("hammond.db");
}
/// Get an r2d2 `SqliteConnection`.
pub(crate) fn connection() -> Pool {
POOL.clone()
}
fn init_pool(db_path: &str) -> Pool {
let manager = ConnectionManager::<SqliteConnection>::new(db_path);
let pool = r2d2::Pool::builder()
.max_size(1)
.build(manager)
.expect("Failed to create pool.");
{
let db = pool.get().expect("Failed to initialize pool.");
run_migration_on(&*db).expect("Failed to run migrations during init.");
}
info!("Database pool initialized.");
pool
}
fn run_migration_on(connection: &SqliteConnection) -> Result<(), DataError> {
info!("Running DB Migrations...");
// embedded_migrations::run(connection)?;
embedded_migrations::run_with_output(connection, &mut io::stdout()).map_err(From::from)
}
/// Reset the database into a clean state.
// Test share a Temp file db.
#[allow(dead_code)]
pub fn truncate_db() -> Result<(), DataError> {
let db = connection();
let con = db.get()?;
con.execute("DELETE FROM episode")?;
con.execute("DELETE FROM podcast")?;
con.execute("DELETE FROM source")?;
Ok(())
}
-95
View File
@@ -1,95 +0,0 @@
use rayon::prelude::*;
use errors::*;
use dbqueries;
use index_feed::Database;
use models::Episode;
use chrono::prelude::*;
use std::path::Path;
use std::fs;
use std::sync::Arc;
// TODO: Write unit test.
fn download_checker(db: &Database) -> Result<()> {
let mut episodes = {
let tempdb = db.lock().unwrap();
dbqueries::get_downloaded_episodes(&tempdb)?
};
episodes.par_iter_mut().for_each(|ep| {
if !Path::new(ep.local_uri().unwrap()).exists() {
ep.set_local_uri(None);
let res = ep.save(&Arc::clone(db));
if let Err(err) = res {
error!("Error while trying to update episode: {:#?}", ep);
error!("Error: {}", err);
};
}
});
Ok(())
}
// TODO: Write unit test.
fn played_cleaner(db: &Database) -> Result<()> {
let mut episodes = {
let tempdb = db.lock().unwrap();
dbqueries::get_played_episodes(&tempdb)?
};
let now_utc = Utc::now().timestamp() as i32;
episodes.par_iter_mut().for_each(|mut ep| {
if ep.local_uri().is_some() && ep.played().is_some() {
let played = ep.played().unwrap();
// TODO: expose a config and a user set option.
let limit = played + 172_800; // add 2days in seconds
if now_utc > limit {
let e = delete_local_content(&Arc::clone(db), &mut ep);
if let Err(err) = e {
error!("Error while trying to delete file: {:?}", ep.local_uri());
error!("Error: {}", err);
} else {
info!("Episode {:?} was deleted succesfully.", ep.title());
};
}
}
});
Ok(())
}
// TODO: Write unit test.
pub fn delete_local_content(db: &Database, ep: &mut Episode) -> Result<()> {
if ep.local_uri().is_some() {
let uri = ep.local_uri().unwrap().to_owned();
if Path::new(&uri).exists() {
let res = fs::remove_file(&uri);
if res.is_ok() {
ep.set_local_uri(None);
ep.save(db)?;
} else {
error!("Error while trying to delete file: {}", uri);
error!("Error: {}", res.unwrap_err());
};
}
} else {
error!(
"Something went wrong evaluating the following path: {:?}",
ep.local_uri(),
);
}
Ok(())
}
pub fn set_played_now(db: &Database, ep: &mut Episode) -> Result<()> {
let epoch = Utc::now().timestamp() as i32;
ep.set_played(Some(epoch));
ep.save(db)?;
Ok(())
}
pub fn run(db: &Database) -> Result<()> {
download_checker(db)?;
played_cleaner(db)?;
Ok(())
}
+282 -100
View File
@@ -1,168 +1,350 @@
//! Random CRUD helper functions.
use diesel::prelude::*;
use diesel;
use models::{Episode, Podcast, Source};
use index_feed::Database;
use chrono::prelude::*;
use diesel::prelude::*;
/// Random db querries helper functions.
/// Probably needs cleanup.
use diesel;
use diesel::dsl::exists;
use diesel::select;
pub fn get_sources(con: &SqliteConnection) -> QueryResult<Vec<Source>> {
use database::connection;
use errors::DataError;
use models::*;
pub fn get_sources() -> Result<Vec<Source>, DataError> {
use schema::source::dsl::*;
let db = connection();
let con = db.get()?;
source.load::<Source>(con)
source
.order((http_etag.asc(), last_modified.asc()))
.load::<Source>(&con)
.map_err(From::from)
}
pub fn get_podcasts(con: &SqliteConnection) -> QueryResult<Vec<Podcast>> {
pub fn get_podcasts() -> Result<Vec<Podcast>, DataError> {
use schema::podcast::dsl::*;
let db = connection();
let con = db.get()?;
podcast.load::<Podcast>(con)
podcast
.order(title.asc())
.load::<Podcast>(&con)
.map_err(From::from)
}
pub fn get_episodes(con: &SqliteConnection) -> QueryResult<Vec<Episode>> {
use schema::episode::dsl::*;
episode.order(epoch.desc()).load::<Episode>(con)
}
pub fn get_downloaded_episodes(con: &SqliteConnection) -> QueryResult<Vec<Episode>> {
use schema::episode::dsl::*;
episode.filter(local_uri.is_not_null()).load::<Episode>(con)
}
pub fn get_played_episodes(con: &SqliteConnection) -> QueryResult<Vec<Episode>> {
use schema::episode::dsl::*;
episode.filter(played.is_not_null()).load::<Episode>(con)
}
pub fn get_episode_from_id(con: &SqliteConnection, ep_id: i32) -> QueryResult<Episode> {
use schema::episode::dsl::*;
episode.filter(id.eq(ep_id)).get_result::<Episode>(con)
}
pub fn get_episode_local_uri_from_id(
con: &SqliteConnection,
ep_id: i32,
) -> QueryResult<Option<String>> {
use schema::episode::dsl::*;
episode
.filter(id.eq(ep_id))
.select(local_uri)
.get_result::<Option<String>>(con)
}
pub fn get_episodes_with_limit(con: &SqliteConnection, limit: u32) -> QueryResult<Vec<Episode>> {
pub fn get_episodes() -> Result<Vec<Episode>, DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
episode
.order(epoch.desc())
.limit(i64::from(limit))
.load::<Episode>(con)
.load::<Episode>(&con)
.map_err(From::from)
}
pub fn get_podcast_from_id(con: &SqliteConnection, pid: i32) -> QueryResult<Podcast> {
use schema::podcast::dsl::*;
podcast.filter(id.eq(pid)).get_result::<Podcast>(con)
}
pub fn get_pd_episodes(con: &SqliteConnection, parent: &Podcast) -> QueryResult<Vec<Episode>> {
pub(crate) fn get_downloaded_episodes() -> Result<Vec<EpisodeCleanerQuery>, DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
episode
.select((rowid, local_uri, played))
.filter(local_uri.is_not_null())
.load::<EpisodeCleanerQuery>(&con)
.map_err(From::from)
}
// pub(crate) fn get_played_episodes() -> Result<Vec<Episode>, DataError> {
// use schema::episode::dsl::*;
// let db = connection();
// let con = db.get()?;
// episode
// .filter(played.is_not_null())
// .load::<Episode>(&con)
// .map_err(From::from)
// }
pub(crate) fn get_played_cleaner_episodes() -> Result<Vec<EpisodeCleanerQuery>, DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
episode
.select((rowid, local_uri, played))
.filter(played.is_not_null())
.load::<EpisodeCleanerQuery>(&con)
.map_err(From::from)
}
pub fn get_episode_from_rowid(ep_id: i32) -> Result<Episode, DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
episode
.filter(rowid.eq(ep_id))
.get_result::<Episode>(&con)
.map_err(From::from)
}
pub fn get_episode_local_uri_from_id(ep_id: i32) -> Result<Option<String>, DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
episode
.filter(rowid.eq(ep_id))
.select(local_uri)
.get_result::<Option<String>>(&con)
.map_err(From::from)
}
pub fn get_episodes_widgets_with_limit(limit: u32) -> Result<Vec<EpisodeWidgetQuery>, DataError> {
use schema::episode;
let db = connection();
let con = db.get()?;
episode::table
.select((
episode::rowid,
episode::title,
episode::uri,
episode::local_uri,
episode::epoch,
episode::length,
episode::duration,
episode::played,
episode::podcast_id,
))
.order(episode::epoch.desc())
.limit(i64::from(limit))
.load::<EpisodeWidgetQuery>(&con)
.map_err(From::from)
}
pub fn get_podcast_from_id(pid: i32) -> Result<Podcast, DataError> {
use schema::podcast::dsl::*;
let db = connection();
let con = db.get()?;
podcast
.filter(id.eq(pid))
.get_result::<Podcast>(&con)
.map_err(From::from)
}
pub fn get_podcast_cover_from_id(pid: i32) -> Result<PodcastCoverQuery, DataError> {
use schema::podcast::dsl::*;
let db = connection();
let con = db.get()?;
podcast
.select((id, title, image_uri))
.filter(id.eq(pid))
.get_result::<PodcastCoverQuery>(&con)
.map_err(From::from)
}
pub fn get_pd_episodes(parent: &Podcast) -> Result<Vec<Episode>, DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
Episode::belonging_to(parent)
.order(epoch.desc())
.load::<Episode>(con)
.load::<Episode>(&con)
.map_err(From::from)
}
pub fn get_pd_unplayed_episodes(
con: &SqliteConnection,
parent: &Podcast,
) -> QueryResult<Vec<Episode>> {
pub fn get_pd_episodeswidgets(parent: &Podcast) -> Result<Vec<EpisodeWidgetQuery>, DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
episode.select((rowid, title, uri, local_uri, epoch, length, duration, played, podcast_id))
.filter(podcast_id.eq(parent.id()))
// .group_by(epoch)
.order(epoch.desc())
.load::<EpisodeWidgetQuery>(&con)
.map_err(From::from)
}
pub fn get_pd_unplayed_episodes(parent: &Podcast) -> Result<Vec<Episode>, DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
Episode::belonging_to(parent)
.filter(played.is_null())
.order(epoch.desc())
.load::<Episode>(con)
.load::<Episode>(&con)
.map_err(From::from)
}
pub fn get_pd_episodes_limit(
con: &SqliteConnection,
parent: &Podcast,
limit: u32,
) -> QueryResult<Vec<Episode>> {
use schema::episode::dsl::*;
// pub(crate) fn get_pd_episodes_limit(parent: &Podcast, limit: u32) ->
// Result<Vec<Episode>, DataError> { use schema::episode::dsl::*;
Episode::belonging_to(parent)
.order(epoch.desc())
.limit(i64::from(limit))
.load::<Episode>(con)
}
// let db = connection();
// let con = db.get()?;
pub fn get_source_from_uri(con: &SqliteConnection, uri_: &str) -> QueryResult<Source> {
// Episode::belonging_to(parent)
// .order(epoch.desc())
// .limit(i64::from(limit))
// .load::<Episode>(&con)
// .map_err(From::from)
// }
pub fn get_source_from_uri(uri_: &str) -> Result<Source, DataError> {
use schema::source::dsl::*;
let db = connection();
let con = db.get()?;
source.filter(uri.eq(uri_)).get_result::<Source>(con)
source
.filter(uri.eq(uri_))
.get_result::<Source>(&con)
.map_err(From::from)
}
pub fn get_podcast_from_title(con: &SqliteConnection, title_: &str) -> QueryResult<Podcast> {
pub fn get_source_from_id(id_: i32) -> Result<Source, DataError> {
use schema::source::dsl::*;
let db = connection();
let con = db.get()?;
source
.filter(id.eq(id_))
.get_result::<Source>(&con)
.map_err(From::from)
}
pub fn get_podcast_from_source_id(sid: i32) -> Result<Podcast, DataError> {
use schema::podcast::dsl::*;
let db = connection();
let con = db.get()?;
podcast.filter(title.eq(title_)).get_result::<Podcast>(con)
podcast
.filter(source_id.eq(sid))
.get_result::<Podcast>(&con)
.map_err(From::from)
}
pub fn get_episode_from_uri(con: &SqliteConnection, uri_: &str) -> QueryResult<Episode> {
pub fn get_episode_from_pk(title_: &str, pid: i32) -> Result<Episode, DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
episode.filter(uri.eq(uri_)).get_result::<Episode>(con)
episode
.filter(title.eq(title_))
.filter(podcast_id.eq(pid))
.get_result::<Episode>(&con)
.map_err(From::from)
}
pub fn remove_feed(db: &Database, pd: &Podcast) -> QueryResult<usize> {
let tempdb = db.lock().unwrap();
pub(crate) fn get_episode_minimal_from_pk(
title_: &str,
pid: i32,
) -> Result<EpisodeMinimal, DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
tempdb.transaction(|| -> QueryResult<usize> {
delete_source(&tempdb, pd.source_id())?;
delete_podcast(&tempdb, pd.id())?;
delete_podcast_episodes(&tempdb, pd.id())
episode
.select((rowid, title, uri, epoch, duration, guid, podcast_id))
.filter(title.eq(title_))
.filter(podcast_id.eq(pid))
.get_result::<EpisodeMinimal>(&con)
.map_err(From::from)
}
pub(crate) fn remove_feed(pd: &Podcast) -> Result<(), DataError> {
let db = connection();
let con = db.get()?;
con.transaction(|| {
delete_source(&con, pd.source_id())?;
delete_podcast(&con, pd.id())?;
delete_podcast_episodes(&con, pd.id())?;
info!("Feed removed from the Database.");
Ok(())
})
}
pub fn delete_source(connection: &SqliteConnection, source_id: i32) -> QueryResult<usize> {
fn delete_source(con: &SqliteConnection, source_id: i32) -> QueryResult<usize> {
use schema::source::dsl::*;
diesel::delete(source.filter(id.eq(source_id))).execute(connection)
diesel::delete(source.filter(id.eq(source_id))).execute(con)
}
pub fn delete_podcast(connection: &SqliteConnection, podcast_id: i32) -> QueryResult<usize> {
fn delete_podcast(con: &SqliteConnection, podcast_id: i32) -> QueryResult<usize> {
use schema::podcast::dsl::*;
diesel::delete(podcast.filter(id.eq(podcast_id))).execute(connection)
diesel::delete(podcast.filter(id.eq(podcast_id))).execute(con)
}
pub fn delete_podcast_episodes(
connection: &SqliteConnection,
parent_id: i32,
) -> QueryResult<usize> {
fn delete_podcast_episodes(con: &SqliteConnection, parent_id: i32) -> QueryResult<usize> {
use schema::episode::dsl::*;
diesel::delete(episode.filter(podcast_id.eq(parent_id))).execute(connection)
diesel::delete(episode.filter(podcast_id.eq(parent_id))).execute(con)
}
pub fn update_none_to_played_now(
connection: &SqliteConnection,
parent: &Podcast,
) -> QueryResult<usize> {
pub fn source_exists(url: &str) -> Result<bool, DataError> {
use schema::source::dsl::*;
let db = connection();
let con = db.get()?;
select(exists(source.filter(uri.eq(url))))
.get_result(&con)
.map_err(From::from)
}
pub(crate) fn podcast_exists(source_id_: i32) -> Result<bool, DataError> {
use schema::podcast::dsl::*;
let db = connection();
let con = db.get()?;
select(exists(podcast.filter(source_id.eq(source_id_))))
.get_result(&con)
.map_err(From::from)
}
#[cfg_attr(rustfmt, rustfmt_skip)]
pub(crate) fn episode_exists(title_: &str, podcast_id_: i32) -> Result<bool, DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
select(exists(episode.filter(podcast_id.eq(podcast_id_)).filter(title.eq(title_))))
.get_result(&con)
.map_err(From::from)
}
pub(crate) fn index_new_episodes(eps: &[NewEpisode]) -> Result<(), DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
diesel::insert_into(episode)
.values(eps)
.execute(&*con)
.map_err(From::from)
.map(|_| ())
}
pub fn update_none_to_played_now(parent: &Podcast) -> Result<usize, DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
let epoch_now = Utc::now().timestamp() as i32;
connection.transaction(|| -> QueryResult<usize> {
con.transaction(|| {
diesel::update(Episode::belonging_to(parent).filter(played.is_null()))
.set(played.eq(Some(epoch_now)))
.execute(connection)
.execute(&con)
.map_err(From::from)
})
}
+102 -9
View File
@@ -1,14 +1,107 @@
use diesel::result;
use rss;
use reqwest;
use diesel;
use diesel::r2d2;
use diesel_migrations::RunMigrationsError;
use hyper;
use native_tls;
// use rss;
use url;
use std::io;
// use std::fmt;
error_chain! {
foreign_links {
DieselResultError(result::Error);
RSSError(rss::Error);
ReqError(reqwest::Error);
IoError(io::Error);
// fadsadfs NOT SYNC
// #[derive(Fail, Debug)]
// #[fail(display = "RSS Error: {}", _0)]
// struct RSSError(rss::Error);
#[derive(Fail, Debug)]
pub enum DataError {
#[fail(display = "SQL Query failed: {}", _0)]
DieselResultError(#[cause] diesel::result::Error),
#[fail(display = "Database Migration error: {}", _0)]
DieselMigrationError(#[cause] RunMigrationsError),
#[fail(display = "R2D2 error: {}", _0)]
R2D2Error(#[cause] r2d2::Error),
#[fail(display = "R2D2 Pool error: {}", _0)]
R2D2PoolError(#[cause] r2d2::PoolError),
#[fail(display = "Hyper Error: {}", _0)]
HyperError(#[cause] hyper::Error),
#[fail(display = "Failed to parse a url: {}", _0)]
// TODO: print the url too
UrlError(#[cause] url::ParseError),
#[fail(display = "TLS Error: {}", _0)]
TLSError(#[cause] native_tls::Error),
#[fail(display = "IO Error: {}", _0)]
IOError(#[cause] io::Error),
#[fail(display = "RSS Error: {}", _0)]
// Rss::Error is not yet Sync
RssCrateError(String),
#[fail(display = "Error: {}", _0)]
Bail(String),
#[fail(display = "Request to {} returned {}. Context: {}", url, status_code, context)]
HttpStatusError {
url: String,
status_code: hyper::StatusCode,
context: String,
},
#[fail(display = "Error occured while Parsing an Episode. Reason: {}", reason)]
ParseEpisodeError { reason: String, parent_id: i32 },
#[fail(display = "No Futures where produced to be run.")]
EmptyFuturesList,
#[fail(display = "Episode was not changed and thus skipped.")]
EpisodeNotChanged,
}
impl From<RunMigrationsError> for DataError {
fn from(err: RunMigrationsError) -> Self {
DataError::DieselMigrationError(err)
}
}
impl From<diesel::result::Error> for DataError {
fn from(err: diesel::result::Error) -> Self {
DataError::DieselResultError(err)
}
}
impl From<r2d2::Error> for DataError {
fn from(err: r2d2::Error) -> Self {
DataError::R2D2Error(err)
}
}
impl From<r2d2::PoolError> for DataError {
fn from(err: r2d2::PoolError) -> Self {
DataError::R2D2PoolError(err)
}
}
impl From<hyper::Error> for DataError {
fn from(err: hyper::Error) -> Self {
DataError::HyperError(err)
}
}
impl From<url::ParseError> for DataError {
fn from(err: url::ParseError) -> Self {
DataError::UrlError(err)
}
}
impl From<native_tls::Error> for DataError {
fn from(err: native_tls::Error) -> Self {
DataError::TLSError(err)
}
}
impl From<io::Error> for DataError {
fn from(err: io::Error) -> Self {
DataError::IOError(err)
}
}
impl From<String> for DataError {
fn from(err: String) -> Self {
DataError::Bail(err)
}
}
+232
View File
@@ -0,0 +1,232 @@
//! Index Feeds.
use futures::future::*;
use itertools::{Either, Itertools};
use rss;
use dbqueries;
use errors::DataError;
use models::{Index, IndexState, Update};
use models::{NewEpisode, NewPodcast, Podcast};
use pipeline::*;
type InsertUpdate = (Vec<NewEpisode>, Vec<Option<(NewEpisode, i32)>>);
/// Wrapper struct that hold a `Source` id and the `rss::Channel`
/// that corresponds to the `Source.uri` field.
#[derive(Debug, Clone, Builder, PartialEq)]
#[builder(derive(Debug))]
#[builder(setter(into))]
pub struct Feed {
/// The `rss::Channel` parsed from the `Source` uri.
channel: rss::Channel,
/// The `Source` id where the xml `rss::Channel` came from.
source_id: i32,
}
impl Feed {
/// Index the contents of the RSS `Feed` into the database.
pub fn index(self) -> Box<Future<Item = (), Error = DataError> + Send> {
let fut = self.parse_podcast_async()
.and_then(|pd| pd.to_podcast())
.and_then(move |pd| self.index_channel_items(&pd));
Box::new(fut)
}
fn parse_podcast(&self) -> NewPodcast {
NewPodcast::new(&self.channel, self.source_id)
}
fn parse_podcast_async(&self) -> Box<Future<Item = NewPodcast, Error = DataError> + Send> {
Box::new(ok(self.parse_podcast()))
}
fn index_channel_items(
&self,
pd: &Podcast,
) -> Box<Future<Item = (), Error = DataError> + Send> {
let fut = self.get_stuff(pd)
.and_then(|(insert, update)| {
if !insert.is_empty() {
info!("Indexing {} episodes.", insert.len());
if let Err(err) = dbqueries::index_new_episodes(insert.as_slice()) {
error!("Failed batch indexng, Fallign back to individual indexing.");
error!("{}", err);
insert.iter().for_each(|ep| {
if let Err(err) = ep.index() {
error!("Failed to index episode: {:?}.", ep.title());
error!("{}", err);
};
})
}
}
Ok((insert, update))
})
.map(|(_, update)| {
if !update.is_empty() {
info!("Updating {} episodes.", update.len());
// see get_stuff for more
update
.into_iter()
.filter_map(|x| x)
.for_each(|(ref ep, rowid)| {
if let Err(err) = ep.update(rowid) {
error!("Failed to index episode: {:?}.", ep.title());
error!("{}", err);
};
})
}
});
Box::new(fut)
}
fn get_stuff(
&self,
pd: &Podcast,
) -> Box<Future<Item = InsertUpdate, Error = DataError> + Send> {
let (insert, update): (Vec<_>, Vec<_>) = self.channel
.items()
.into_iter()
.map(|item| glue_async(item, pd.id()))
// This is sort of ugly but I think it's cheaper than pushing None
// to updated and filtering it out later.
// Even though we already map_filter in index_channel_items.
// I am not sure what the optimizations are on match vs allocating None.
.map(|fut| {
fut.and_then(|x| match x {
IndexState::NotChanged => return Err(DataError::EpisodeNotChanged),
_ => Ok(x),
})
})
.flat_map(|fut| fut.wait())
.partition_map(|state| match state {
IndexState::Index(e) => Either::Left(e),
IndexState::Update(e) => Either::Right(Some(e)),
// This should never occur
IndexState::NotChanged => Either::Right(None),
});
Box::new(ok((insert, update)))
}
}
#[cfg(test)]
mod tests {
use rss::Channel;
use tokio_core::reactor::Core;
use Source;
use database::truncate_db;
use dbqueries;
use utils::get_feed;
use std::fs;
use std::io::BufReader;
use super::*;
// (path, url) tuples.
const URLS: &[(&str, &str)] = {
&[
(
"tests/feeds/2018-01-20-Intercepted.xml",
"https://web.archive.org/web/20180120083840if_/https://feeds.feedburner.\
com/InterceptedWithJeremyScahill",
),
(
"tests/feeds/2018-01-20-LinuxUnplugged.xml",
"https://web.archive.org/web/20180120110314if_/https://feeds.feedburner.\
com/linuxunplugged",
),
(
"tests/feeds/2018-01-20-TheTipOff.xml",
"https://web.archive.org/web/20180120110727if_/https://rss.acast.com/thetipoff",
),
(
"tests/feeds/2018-01-20-StealTheStars.xml",
"https://web.archive.org/web/20180120104957if_/https://rss.art19.\
com/steal-the-stars",
),
(
"tests/feeds/2018-01-20-GreaterThanCode.xml",
"https://web.archive.org/web/20180120104741if_/https://www.greaterthancode.\
com/feed/podcast",
),
]
};
#[test]
fn test_complete_index() {
truncate_db().unwrap();
let feeds: Vec<_> = URLS.iter()
.map(|&(path, url)| {
// Create and insert a Source into db
let s = Source::from_url(url).unwrap();
get_feed(path, s.id())
})
.collect();
let mut core = Core::new().unwrap();
// Index the channels
let list: Vec<_> = feeds.into_iter().map(|x| x.index()).collect();
let _foo = core.run(join_all(list));
// Assert the index rows equal the controlled results
assert_eq!(dbqueries::get_sources().unwrap().len(), 5);
assert_eq!(dbqueries::get_podcasts().unwrap().len(), 5);
assert_eq!(dbqueries::get_episodes().unwrap().len(), 354);
}
#[test]
fn test_feed_parse_podcast() {
truncate_db().unwrap();
let path = "tests/feeds/2018-01-20-Intercepted.xml";
let feed = get_feed(path, 42);
let file = fs::File::open(path).unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let pd = NewPodcast::new(&channel, 42);
assert_eq!(feed.parse_podcast(), pd);
}
#[test]
fn test_feed_index_channel_items() {
truncate_db().unwrap();
let path = "tests/feeds/2018-01-20-Intercepted.xml";
let feed = get_feed(path, 42);
let pd = feed.parse_podcast().to_podcast().unwrap();
feed.index_channel_items(&pd).wait().unwrap();
assert_eq!(dbqueries::get_podcasts().unwrap().len(), 1);
assert_eq!(dbqueries::get_episodes().unwrap().len(), 43);
}
#[test]
fn test_feed_get_stuff() {
truncate_db().unwrap();
let path = "tests/feeds/2018-01-20-Intercepted.xml";
let feed = get_feed(path, 42);
let pd = feed.parse_podcast().to_podcast().unwrap();
let (insert, update) = feed.get_stuff(&pd).wait().unwrap();
assert_eq!(43, insert.len());
assert_eq!(0, update.len());
feed.index().wait().unwrap();
let path = "tests/feeds/2018-02-03-Intercepted.xml";
let feed = get_feed(path, 42);
let pd = feed.parse_podcast().to_podcast().unwrap();
let (insert, update) = feed.get_stuff(&pd).wait().unwrap();
assert_eq!(4, insert.len());
assert_eq!(43, update.len());
}
}
-389
View File
@@ -1,389 +0,0 @@
use rss::{Channel, Item};
use rfc822_sanitizer::parse_from_rfc2822_with_fallback;
use models;
// TODO: Extend the support for parsing itunes extensions
/// Parses a `rss::Channel` into a `NewPodcast` Struct.
pub fn parse_podcast(chan: &Channel, source_id: i32) -> models::NewPodcast {
let title = chan.title().trim().to_owned();
let link = chan.link().trim().to_owned();
let description = chan.description().trim().to_owned();
// Some feeds miss baseurl and/or http://
// TODO: Sanitize the url,
// could also be reuse to sanitize the new-url gui entrybox.
let x = chan.itunes_ext().map(|s| s.image());
let image_uri = if let Some(img) = x {
img.map(|s| s.to_string())
} else {
chan.image().map(|foo| foo.url().to_owned())
};
models::NewPodcast {
title,
link,
description,
image_uri,
source_id,
}
}
/// Parses an `rss::Item` into a `NewEpisode` Struct.
pub fn parse_episode(item: &Item, parent_id: i32) -> models::NewEpisode {
let title = item.title().map(|s| s.trim());
let description = item.description().map(|s| s.trim());
let guid = item.guid().map(|x| x.value().trim());
// Its kinda weird this being an Option type.
// Rss 2.0 specified that it's optional.
// Though the db scema has a requirment of episode uri being Unique && Not Null.
// TODO: Restructure
let x = item.enclosure().map(|x| x.url().trim());
let uri = if x.is_some() {
x
} else if item.link().is_some() {
item.link()
} else {
None
};
let date = parse_from_rfc2822_with_fallback(
// Default to rfc2822 represantation of epoch 0.
item.pub_date().unwrap_or("Thu, 1 Jan 1970 00:00:00 +0000"),
);
// Should treat information from the rss feeds as invalid by default.
// Case: Thu, 05 Aug 2016 06:00:00 -0400 <-- Actually that was friday.
let pub_date = date.map(|x| x.to_rfc2822()).ok();
let epoch = date.map(|x| x.timestamp() as i32).unwrap_or(0);
let length = item.enclosure().map(|x| x.length().parse().unwrap_or(0));
models::NewEpisode {
title,
uri,
description,
length,
published_date: pub_date,
epoch,
guid,
podcast_id: parent_id,
}
}
#[cfg(test)]
mod tests {
use std::fs::File;
use std::io::BufReader;
use rss::Channel;
use super::*;
#[test]
fn test_parse_podcast_intercepted() {
let file = File::open("tests/feeds/Intercepted.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let descr = "The people behind The Intercepts fearless reporting and incisive \
commentary—Jeremy Scahill, Glenn Greenwald, Betsy Reed and others—discuss \
the crucial issues of our time: national security, civil liberties, foreign \
policy, and criminal justice. Plus interviews with artists, thinkers, and \
newsmakers who challenge our preconceptions about the world we live in.";
let pd = parse_podcast(&channel, 0);
assert_eq!(pd.title, "Intercepted with Jeremy Scahill".to_string());
assert_eq!(pd.link, "https://theintercept.com/podcasts".to_string());
assert_eq!(pd.description, descr.to_string());
assert_eq!(
pd.image_uri,
Some(
"http://static.megaphone.fm/podcasts/d5735a50-d904-11e6-8532-73c7de466ea6/image/\
uploads_2F1484252190700-qhn5krasklbce3dh-a797539282700ea0298a3a26f7e49b0b_\
2FIntercepted_COVER%2B_281_29.png"
.to_string()
)
);
}
#[test]
fn test_parse_podcast_breakthrough() {
let file = File::open("tests/feeds/TheBreakthrough.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let descr = "Latest Articles and Investigations from ProPublica, an independent, \
non-profit newsroom that produces investigative journalism in the public \
interest.";
let pd = parse_podcast(&channel, 0);
assert_eq!(pd.title, "The Breakthrough".to_string());
assert_eq!(pd.link, "http://www.propublica.org/podcast".to_string());
assert_eq!(pd.description, descr.to_string());
assert_eq!(
pd.image_uri,
Some("http://www.propublica.org/images/podcast_logo_2.png".to_string())
);
}
#[test]
fn test_parse_podcast_lup() {
let file = File::open("tests/feeds/LinuxUnplugged.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let descr = "An open show powered by community LINUX Unplugged takes the best attributes \
of open collaboration and focuses them into a weekly lifestyle show about \
Linux.";
let pd = parse_podcast(&channel, 0);
assert_eq!(pd.title, "LINUX Unplugged Podcast".to_string());
assert_eq!(pd.link, "http://www.jupiterbroadcasting.com/".to_string());
assert_eq!(pd.description, descr.to_string());
assert_eq!(
pd.image_uri,
Some("http://www.jupiterbroadcasting.com/images/LASUN-Badge1400.jpg".to_string(),)
);
}
#[test]
fn test_parse_podcast_r4explanation() {
let file = File::open("tests/feeds/R4Explanation.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let pd = parse_podcast(&channel, 0);
let descr = "A weekly discussion of Rust RFCs";
assert_eq!(pd.title, "Request For Explanation".to_string());
assert_eq!(
pd.link,
"https://request-for-explanation.github.io/podcast/".to_string()
);
assert_eq!(pd.description, descr.to_string());
assert_eq!(
pd.image_uri,
Some("https://request-for-explanation.github.io/podcast/podcast.png".to_string(),)
);
}
#[test]
fn test_parse_episode_intercepted() {
let file = File::open("tests/feeds/Intercepted.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let firstitem = channel.items().first().unwrap();
let descr = "NSA whistleblower Edward Snowden discusses the massive Equifax data breach \
and allegations of Russian interference in the US election. Commentator \
Shaun King explains his call for a boycott of the NFL and talks about his \
campaign to bring violent neo-Nazis to justice. Rapper Open Mike Eagle \
performs.";
let i = parse_episode(&firstitem, 0);
assert_eq!(i.title, Some("The Super Bowl of Racism"));
assert_eq!(i.uri, Some("http://traffic.megaphone.fm/PPY6458293736.mp3"));
assert_eq!(i.description, Some(descr));
assert_eq!(i.length, Some(66738886));
assert_eq!(i.guid, Some("7df4070a-9832-11e7-adac-cb37b05d5e24"));
assert_eq!(
i.published_date,
Some("Wed, 13 Sep 2017 10:00:00 +0000".to_string())
);
assert_eq!(i.epoch, 1505296800);
let second = channel.items().iter().nth(1).unwrap();
let i2 = parse_episode(&second, 0);
let descr2 = "This week on Intercepted: Jeremy gives an update on the aftermath of \
Blackwaters 2007 massacre of Iraqi civilians. Intercept reporter Lee Fang \
lays out how a network of libertarian think tanks called the Atlas Network \
is insidiously shaping political infrastructure in Latin America. We speak \
with attorney and former Hugo Chavez adviser Eva Golinger about the \
Venezuela\'s political turmoil.And we hear Claudia Lizardo of the \
Caracas-based band, La Pequeña Revancha, talk about her music and hopes for \
Venezuela.";
assert_eq!(
i2.title,
Some("Atlas Golfed — U.S.-Backed Think Tanks Target Latin America",)
);
assert_eq!(i2.uri, Some("http://traffic.megaphone.fm/FL5331443769.mp3"));
assert_eq!(i2.description, Some(descr2));
assert_eq!(i2.length, Some(67527575));
assert_eq!(i2.guid, Some("7c207a24-e33f-11e6-9438-eb45dcf36a1d"));
assert_eq!(
i2.published_date,
Some("Wed, 9 Aug 2017 10:00:00 +0000".to_string())
);
assert_eq!(i2.epoch, 1502272800);
}
#[test]
fn test_parse_episode_breakthrough() {
let file = File::open("tests/feeds/TheBreakthrough.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let firstitem = channel.items().first().unwrap();
let descr = "<p>A reporter finds that homes meant to replace New Yorks troubled \
psychiatric hospitals might be just as bad.</p>";
let i = parse_episode(&firstitem, 0);
assert_eq!(
i.title,
Some("The Breakthrough: Hopelessness and Exploitation Inside Homes for Mentally Ill",)
);
assert_eq!(
i.uri,
Some("http://tracking.feedpress.it/link/10581/6726758/20170908-cliff-levy.mp3",)
);
assert_eq!(i.description, Some(descr));
assert_eq!(i.length, Some(33396551));
assert_eq!(
i.guid,
Some(
"https://www.propublica.org/podcast/\
the-breakthrough-hopelessness-exploitation-homes-for-mentally-ill#134472",
)
);
assert_eq!(
i.published_date,
Some("Fri, 8 Sep 2017 12:00:00 +0000".to_string())
);
assert_eq!(i.epoch, 1504872000);
let second = channel.items().iter().nth(1).unwrap();
let i2 = parse_episode(&second, 0);
let descr2 = "<p>Jonathan Allen and Amie Parnes didnt know their book would be called \
Shattered, or that their extraordinary access would let them chronicle \
the mounting signs of a doomed campaign.</p>";
assert_eq!(
i2.title,
Some(
"The Breakthrough: Behind the Scenes of Hillary Clintons Failed Bid for President",
)
);
assert_eq!(
i2.uri,
Some("http://tracking.feedpress.it/link/10581/6726759/16_JohnAllen-CRAFT.mp3",)
);
assert_eq!(i2.description, Some(descr2));
assert_eq!(i2.length, Some(17964071));
assert_eq!(
i2.guid,
Some(
"https://www.propublica.\
org/podcast/the-breakthrough-hillary-clinton-failed-presidential-bid#133721",
)
);
assert_eq!(
i2.published_date,
Some("Fri, 25 Aug 2017 12:00:00 +0000".to_string())
);
assert_eq!(i2.epoch, 1503662400);
}
#[test]
fn test_parse_episode_lup() {
let file = File::open("tests/feeds/LinuxUnplugged.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let firstitem = channel.items().first().unwrap();
let descr =
"Audit your network with a couple of easy commands on Kali Linux. Chris decides to \
blow off a little steam by attacking his IoT devices, Wes has the scope on Equifax \
blaming open source & the Beard just saved the show. Its a really packed episode!";
let i = parse_episode(&firstitem, 0);
assert_eq!(i.title, Some("Hacking Devices with Kali Linux | LUP 214"));
assert_eq!(
i.uri,
Some("http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0214.mp3",)
);
assert_eq!(i.description, Some(descr));
assert_eq!(i.length, Some(46479789));
assert_eq!(i.guid, Some("78A682B4-73E8-47B8-88C0-1BE62DD4EF9D"));
assert_eq!(
i.published_date,
Some("Tue, 12 Sep 2017 22:24:42 -0700".to_string())
);
assert_eq!(i.epoch, 1505280282);
let second = channel.items().iter().nth(1).unwrap();
let i2 = parse_episode(&second, 0);
let descr2 = "<p>The Gnome project is about to solve one of our audience's biggest \
Waylands concerns. But as the project takes on a new level of relevance, \
decisions for the next version of Gnome have us worried about the \
future.</p>\n\n<p>Plus we chat with Wimpy about the Ubuntu Rally in NYC, \
Microsofts sneaky move to turn Windows 10 into the “ULTIMATE LINUX \
RUNTIME”, community news & more!</p>";
assert_eq!(i2.title, Some("Gnome Does it Again | LUP 213"));
assert_eq!(
i2.uri,
Some("http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0213.mp3",)
);
assert_eq!(i2.description, Some(descr2));
assert_eq!(i2.length, Some(36544272));
assert_eq!(i2.guid, Some("1CE57548-B36C-4F14-832A-5D5E0A24E35B"));
assert_eq!(
i2.published_date,
Some("Tue, 5 Sep 2017 20:57:27 -0700".to_string())
);
assert_eq!(i2.epoch, 1504670247);
}
#[test]
fn test_parse_episode_r4expanation() {
let file = File::open("tests/feeds/R4Explanation.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let firstitem = channel.items().iter().nth(9).unwrap();
let descr = "This week we look at <a \
href=\"https://github.com/rust-lang/rfcs/pull/2094\">RFC 2094</a> \
\"Non-lexical lifetimes\"";
let i = parse_episode(&firstitem, 0);
assert_eq!(i.title, Some("Episode #9 - A Once in a Lifetime RFC"));
assert_eq!(
i.uri,
Some(
"http://request-for-explanation.github.\
io/podcast/ep9-a-once-in-a-lifetime-rfc/episode.mp3",
)
);
assert_eq!(i.description, Some(descr));
assert_eq!(i.length, Some(15077388));
assert_eq!(
i.guid,
Some("https://request-for-explanation.github.io/podcast/ep9-a-once-in-a-lifetime-rfc/",)
);
assert_eq!(
i.published_date,
Some("Mon, 28 Aug 2017 15:00:00 -0700".to_string())
);
assert_eq!(i.epoch, 1503957600);
let second = channel.items().iter().nth(8).unwrap();
let i2 = parse_episode(&second, 0);
let descr2 = "This week we look at <a \
href=\"https://github.com/rust-lang/rfcs/pull/2071\">RFC 2071</a> \"Add \
impl Trait type alias and variable declarations\"";
assert_eq!(i2.title, Some("Episode #8 - An Existential Crisis"));
assert_eq!(
i2.uri,
Some(
"http://request-for-explanation.github.\
io/podcast/ep8-an-existential-crisis/episode.mp3",
)
);
assert_eq!(i2.description, Some(descr2));
assert_eq!(i2.length, Some(13713219));
assert_eq!(
i2.guid,
Some("https://request-for-explanation.github.io/podcast/ep8-an-existential-crisis/",)
);
assert_eq!(
i2.published_date,
Some("Tue, 15 Aug 2017 17:00:00 -0700".to_string())
);
assert_eq!(i2.epoch, 1502841600);
}
}
-329
View File
@@ -1,329 +0,0 @@
use diesel::prelude::*;
use diesel;
use rss;
use reqwest;
use rayon::prelude::*;
use schema;
use dbqueries;
use models::*;
use errors::*;
use feedparser;
use std::sync::{Arc, Mutex};
#[derive(Debug)]
pub struct Feed(pub reqwest::Response, pub Source);
pub type Database = Arc<Mutex<SqliteConnection>>;
fn index_source(con: &SqliteConnection, foo: &NewSource) -> QueryResult<usize> {
match dbqueries::get_source_from_uri(con, foo.uri) {
Ok(_) => Ok(1),
Err(_) => diesel::insert(foo).into(schema::source::table).execute(con),
}
}
fn index_podcast(con: &SqliteConnection, pd: &NewPodcast) -> Result<()> {
match dbqueries::get_podcast_from_title(con, &pd.title) {
Ok(mut foo) => if foo.link() != pd.link || foo.description() != pd.description {
foo.set_link(&pd.link);
foo.set_description(&pd.description);
foo.set_image_uri(pd.image_uri.as_ref().map(|s| s.as_str()));
foo.save_changes::<Podcast>(con)?;
},
Err(_) => {
diesel::insert(pd)
.into(schema::podcast::table)
.execute(con)?;
}
}
Ok(())
}
fn index_episode(con: &SqliteConnection, ep: &NewEpisode) -> Result<()> {
match dbqueries::get_episode_from_uri(con, ep.uri.unwrap()) {
Ok(mut foo) => if foo.title() != ep.title
|| foo.published_date() != ep.published_date.as_ref().map(|x| x.as_str())
{
foo.set_title(ep.title);
foo.set_description(ep.description);
foo.set_published_date(ep.published_date.as_ref().map(|x| x.as_str()));
foo.set_guid(ep.guid);
foo.set_length(ep.length);
foo.set_epoch(ep.epoch);
foo.save_changes::<Episode>(con)?;
},
Err(_) => {
diesel::insert(ep)
.into(schema::episode::table)
.execute(con)?;
}
}
Ok(())
}
pub fn insert_return_source(con: &SqliteConnection, url: &str) -> Result<Source> {
let foo = NewSource::new_with_uri(url);
index_source(con, &foo)?;
Ok(dbqueries::get_source_from_uri(con, foo.uri)?)
}
fn insert_return_podcast(con: &SqliteConnection, pd: &NewPodcast) -> Result<Podcast> {
index_podcast(con, pd)?;
Ok(dbqueries::get_podcast_from_title(con, &pd.title)?)
}
// fn insert_return_episode(con: &SqliteConnection, ep: &NewEpisode) -> Result<Episode> {
// index_episode(con, ep)?;
// Ok(dbqueries::get_episode_from_uri(con, ep.uri.unwrap())?)
// }
pub fn full_index_loop(db: &Database) -> Result<()> {
let mut f = fetch_all_feeds(db)?;
index_feed(db, &mut f);
info!("Indexing done.");
Ok(())
}
pub fn index_feed(db: &Database, f: &mut [Feed]) {
f.par_iter_mut()
.for_each(|&mut Feed(ref mut req, ref source)| {
let e = complete_index_from_source(req, source, db);
if e.is_err() {
error!("Error While trying to update the database.");
error!("Error msg: {}", e.unwrap_err());
};
});
}
pub fn complete_index_from_source(
req: &mut reqwest::Response,
source: &Source,
db: &Database,
) -> Result<()> {
use std::io::Read;
use std::str::FromStr;
let mut buf = String::new();
req.read_to_string(&mut buf)?;
let chan = rss::Channel::from_str(&buf)?;
complete_index(db, &chan, source)
}
fn complete_index(db: &Database, chan: &rss::Channel, parent: &Source) -> Result<()> {
let pd = {
let conn = db.lock().unwrap();
index_channel(&conn, chan, parent)?
};
index_channel_items(db, chan.items(), &pd);
Ok(())
}
fn index_channel(con: &SqliteConnection, chan: &rss::Channel, parent: &Source) -> Result<Podcast> {
let pd = feedparser::parse_podcast(chan, parent.id());
// Convert NewPodcast to Podcast
insert_return_podcast(con, &pd)
}
fn index_channel_items(db: &Database, it: &[rss::Item], pd: &Podcast) {
let episodes: Vec<_> = it.par_iter()
.map(|x| feedparser::parse_episode(x, pd.id()))
.collect();
let conn = db.lock().unwrap();
let e = conn.transaction::<(), Error, _>(|| {
episodes.iter().for_each(|x| {
let e = index_episode(&conn, x);
if let Err(err) = e {
error!("Failed to index episode: {:?}.", x);
error!("Error msg: {}", err);
};
});
Ok(())
});
drop(conn);
if let Err(err) = e {
error!("Episodes Transcaction Failed.");
error!("Error msg: {}", err);
};
}
// Maybe this can be refactored into an Iterator for lazy evaluation.
pub fn fetch_all_feeds(db: &Database) -> Result<Vec<Feed>> {
let mut feeds = {
let conn = db.lock().unwrap();
dbqueries::get_sources(&conn)?
};
let results = fetch_feeds(db, &mut feeds);
Ok(results)
}
pub fn fetch_feeds(db: &Database, feeds: &mut [Source]) -> Vec<Feed> {
let results: Vec<Feed> = feeds
.par_iter_mut()
.filter_map(|x| {
let l = refresh_source(db, x);
if l.is_ok() {
l.ok()
} else {
error!("Error While trying to fetch from source: {}.", x.uri());
error!("Error msg: {}", l.unwrap_err());
None
}
})
.collect();
results
}
pub fn refresh_source(db: &Database, feed: &mut Source) -> Result<Feed> {
use reqwest::header::{ETag, EntityTag, Headers, HttpDate, LastModified};
let mut headers = Headers::new();
if let Some(foo) = feed.http_etag() {
headers.set(ETag(EntityTag::new(true, foo.to_owned())));
}
if let Some(foo) = feed.last_modified() {
if let Ok(x) = foo.parse::<HttpDate>() {
headers.set(LastModified(x));
}
}
// FIXME: I have fucked up somewhere here.
// Getting back 200 codes even though I supposedly sent etags.
// info!("Headers: {:?}", headers);
let client = reqwest::Client::builder().referer(false).build()?;
let req = client.get(feed.uri()).headers(headers).send()?;
info!("GET to {} , returned: {}", feed.uri(), req.status());
// TODO match on more stuff
// 301: Permanent redirect of the url
// 302: Temporary redirect of the url
// 304: Up to date Feed, checked with the Etag
// 410: Feed deleted
// match req.status() {
// reqwest::StatusCode::NotModified => (),
// _ => (),
// };
feed.update_etag(db, &req)?;
Ok(Feed(req, feed.clone()))
}
#[cfg(test)]
mod tests {
extern crate rand;
extern crate tempdir;
use diesel::prelude::*;
use rss;
use self::rand::Rng;
use std::io::BufReader;
use std::path::PathBuf;
use std::fs;
use super::*;
struct TempDB(tempdir::TempDir, PathBuf, SqliteConnection);
/// Create and return a Temporary DB.
/// Will be destroed once the returned variable(s) is dropped.
fn get_temp_db() -> TempDB {
let mut rng = rand::thread_rng();
let tmp_dir = tempdir::TempDir::new("hammond_unit_test").unwrap();
let db_path = tmp_dir
.path()
.join(format!("hammonddb_{}.db", rng.gen::<usize>()));
let db = SqliteConnection::establish(db_path.to_str().unwrap()).unwrap();
::run_migration_on(&db).unwrap();
TempDB(tmp_dir, db_path, db)
}
#[test]
/// Insert feeds and update/index them.
fn test_index_loop() {
let TempDB(_tmp_dir, _db_path, db) = get_temp_db();
let db = Arc::new(Mutex::new(db));
let inpt = vec![
"https://request-for-explanation.github.io/podcast/rss.xml",
"https://feeds.feedburner.com/InterceptedWithJeremyScahill",
"http://feeds.propublica.org/propublica/podcast",
"http://feeds.feedburner.com/linuxunplugged",
];
inpt.iter().for_each(|feed| {
let tempdb = db.lock().unwrap();
index_source(&tempdb, &NewSource::new_with_uri(feed)).unwrap();
});
full_index_loop(&db).unwrap();
// Run again to cover Unique constrains erros.
full_index_loop(&db).unwrap();
}
#[test]
fn test_complete_index() {
let TempDB(_tmp_dir, _db_path, db) = get_temp_db();
// complete_index runs in parallel so it requires a mutex as argument.
let m = Arc::new(Mutex::new(db));
// vec of (path, url) tuples.
let urls = vec![
(
"tests/feeds/Intercepted.xml",
"https://feeds.feedburner.com/InterceptedWithJeremyScahill",
),
(
"tests/feeds/LinuxUnplugged.xml",
"http://feeds.feedburner.com/linuxunplugged",
),
(
"tests/feeds/TheBreakthrough.xml",
"http://feeds.feedburner.com/propublica/podcast",
),
(
"tests/feeds/R4Explanation.xml",
"https://request-for-explanation.github.io/podcast/rss.xml",
),
];
urls.iter().for_each(|&(path, url)| {
let tempdb = m.lock().unwrap();
// Create and insert a Source into db
let s = insert_return_source(&tempdb, url).unwrap();
drop(tempdb);
// open the xml file
let feed = fs::File::open(path).unwrap();
// parse it into a channel
let chan = rss::Channel::read_from(BufReader::new(feed)).unwrap();
// Index the channel
complete_index(&m, &chan, &s).unwrap();
});
// Assert the index rows equal the controlled results
let tempdb = m.lock().unwrap();
assert_eq!(dbqueries::get_sources(&tempdb).unwrap().len(), 4);
assert_eq!(dbqueries::get_podcasts(&tempdb).unwrap().len(), 4);
assert_eq!(dbqueries::get_episodes(&tempdb).unwrap().len(), 274);
}
}
+74 -62
View File
@@ -1,89 +1,101 @@
#![recursion_limit = "1024"]
#![cfg_attr(all(test, feature = "clippy"), allow(option_unwrap_used, result_unwrap_used))]
#![cfg_attr(feature = "cargo-clippy", allow(blacklisted_name))]
#![cfg_attr(feature = "clippy",
warn(option_unwrap_used, result_unwrap_used, print_stdout,
wrong_pub_self_convention, mut_mut, non_ascii_literal, similar_names,
unicode_not_nfc, enum_glob_use, if_not_else, items_after_statements,
used_underscore_binding))]
#![allow(unknown_lints)]
#![deny(bad_style, const_err, dead_code, improper_ctypes, legacy_directory_ownership,
non_shorthand_field_patterns, no_mangle_generic_items, overflowing_literals,
path_statements, patterns_in_fns_without_body, plugin_as_library, private_in_public,
private_no_mangle_fns, private_no_mangle_statics, safe_extern_statics,
unconditional_recursion, unions_with_drop_fields, unused_allocation, unused_comparisons,
unused_parens, while_true)]
#![deny(missing_debug_implementations, missing_docs, trivial_casts, trivial_numeric_casts)]
#![deny(unused_extern_crates, unused)]
// #![feature(conservative_impl_trait)]
//! FIXME: Docs
#[macro_use]
extern crate error_chain;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate log;
extern crate derive_builder;
#[macro_use]
extern crate diesel;
#[macro_use]
extern crate diesel_codegen;
extern crate diesel_migrations;
// #[macro_use]
extern crate failure;
#[macro_use]
extern crate failure_derive;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate log;
extern crate ammonia;
extern crate chrono;
extern crate futures;
extern crate futures_cpupool;
extern crate hyper;
extern crate hyper_tls;
extern crate itertools;
extern crate native_tls;
extern crate num_cpus;
extern crate rayon;
extern crate reqwest;
extern crate rfc822_sanitizer;
extern crate rss;
extern crate tokio_core;
extern crate url;
extern crate xdg;
#[allow(missing_docs)]
pub mod dbqueries;
pub mod dbcheckup;
pub mod models;
pub mod index_feed;
#[allow(missing_docs)]
pub mod errors;
mod feedparser;
pub mod utils;
pub mod database;
pub mod pipeline;
pub(crate) mod models;
mod feed;
mod parser;
mod schema;
use diesel::migrations::RunMigrationsError;
use diesel::prelude::*;
use std::path::PathBuf;
pub use feed::{Feed, FeedBuilder};
pub use models::{Episode, EpisodeWidgetQuery, Podcast, PodcastCoverQuery, Source};
pub use models::Save;
embed_migrations!("migrations/");
/// [XDG Base Direcotory](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) Paths.
#[allow(missing_debug_implementations)]
pub mod xdg_dirs {
use std::path::PathBuf;
use xdg;
lazy_static!{
#[allow(dead_code)]
static ref HAMMOND_XDG: xdg::BaseDirectories = {
xdg::BaseDirectories::with_prefix("hammond").unwrap()
};
static ref _HAMMOND_DATA: PathBuf = {
HAMMOND_XDG.create_data_directory(HAMMOND_XDG.get_data_home()).unwrap()
};
static ref _HAMMOND_CONFIG: PathBuf = {
HAMMOND_XDG.create_config_directory(HAMMOND_XDG.get_config_home()).unwrap()
};
pub static ref HAMMOND_CACHE: PathBuf = {
HAMMOND_XDG.create_cache_directory(HAMMOND_XDG.get_cache_home()).unwrap()
};
static ref DB_PATH: PathBuf = {
HAMMOND_XDG.place_data_file("hammond.db").unwrap()
lazy_static!{
pub(crate) static ref HAMMOND_XDG: xdg::BaseDirectories = {
xdg::BaseDirectories::with_prefix("hammond").unwrap()
};
pub static ref DL_DIR: PathBuf = {
HAMMOND_XDG.create_data_directory("Downloads").unwrap()
};
}
/// XDG_DATA Directory `Pathbuf`.
pub static ref HAMMOND_DATA: PathBuf = {
HAMMOND_XDG.create_data_directory(HAMMOND_XDG.get_data_home()).unwrap()
};
pub fn init() -> Result<(), RunMigrationsError> {
let conn = establish_connection();
run_migration_on(&conn)
}
/// XDG_CONFIG Directory `Pathbuf`.
pub static ref HAMMOND_CONFIG: PathBuf = {
HAMMOND_XDG.create_config_directory(HAMMOND_XDG.get_config_home()).unwrap()
};
pub fn run_migration_on(connection: &SqliteConnection) -> Result<(), RunMigrationsError> {
info!("Running DB Migrations...");
embedded_migrations::run(connection)
// embedded_migrations::run_with_output(connection, &mut std::io::stdout())
}
/// XDG_CACHE Directory `Pathbuf`.
pub static ref HAMMOND_CACHE: PathBuf = {
HAMMOND_XDG.create_cache_directory(HAMMOND_XDG.get_cache_home()).unwrap()
};
pub fn establish_connection() -> SqliteConnection {
let database_url = DB_PATH.to_str().unwrap();
SqliteConnection::establish(database_url)
.expect(&format!("Error connecting to {}", database_url))
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
/// Hammond Download Direcotry `PathBuf`.
pub static ref DL_DIR: PathBuf = {
HAMMOND_XDG.create_data_directory("Downloads").unwrap()
};
}
}
-290
View File
@@ -1,290 +0,0 @@
use reqwest;
use diesel::SaveChangesDsl;
use diesel::result::QueryResult;
use reqwest::header::{ETag, LastModified};
use schema::{episode, podcast, source};
use index_feed::Database;
use errors::*;
#[derive(Queryable, Identifiable, AsChangeset, Associations)]
#[table_name = "episode"]
#[changeset_options(treat_none_as_null = "true")]
#[belongs_to(Podcast, foreign_key = "podcast_id")]
#[derive(Debug, Clone)]
pub struct Episode {
id: i32,
title: Option<String>,
uri: String,
local_uri: Option<String>,
description: Option<String>,
published_date: Option<String>,
/// Representation of system time. Should be in UTC.
epoch: i32,
length: Option<i32>,
guid: Option<String>,
/// Represent the epoch value of when the episode was last played.
played: Option<i32>,
podcast_id: i32,
}
impl Episode {
pub fn id(&self) -> i32 {
self.id
}
pub fn title(&self) -> Option<&str> {
self.title.as_ref().map(|s| s.as_str())
}
pub fn set_title(&mut self, value: Option<&str>) {
self.title = value.map(|x| x.to_string());
}
/// uri is guaranted to exist based on the db rules
pub fn uri(&self) -> &str {
self.uri.as_ref()
}
pub fn set_uri(&mut self, value: &str) {
self.uri = value.to_string();
}
pub fn local_uri(&self) -> Option<&str> {
self.local_uri.as_ref().map(|s| s.as_str())
}
pub fn set_local_uri(&mut self, value: Option<&str>) {
self.local_uri = value.map(|x| x.to_string());
}
pub fn description(&self) -> Option<&str> {
self.description.as_ref().map(|s| s.as_str())
}
pub fn set_description(&mut self, value: Option<&str>) {
self.description = value.map(|x| x.to_string());
}
pub fn published_date(&self) -> Option<&str> {
self.published_date.as_ref().map(|s| s.as_str())
}
pub fn set_published_date(&mut self, value: Option<&str>) {
self.published_date = value.map(|x| x.to_string().to_owned());
}
pub fn guid(&self) -> Option<&str> {
self.guid.as_ref().map(|s| s.as_str())
}
pub fn set_guid(&mut self, value: Option<&str>) {
self.guid = value.map(|x| x.to_string());
}
pub fn epoch(&self) -> i32 {
self.epoch
}
pub fn set_epoch(&mut self, value: i32) {
self.epoch = value;
}
pub fn length(&self) -> Option<i32> {
self.length
}
pub fn set_length(&mut self, value: Option<i32>) {
self.length = value;
}
pub fn played(&self) -> Option<i32> {
self.played
}
pub fn set_played(&mut self, value: Option<i32>) {
self.played = value;
}
pub fn save(&self, db: &Database) -> QueryResult<Episode> {
let tempdb = db.lock().unwrap();
self.save_changes::<Episode>(&*tempdb)
}
}
#[derive(Queryable, Identifiable, AsChangeset, Associations)]
#[belongs_to(Source, foreign_key = "source_id")]
#[changeset_options(treat_none_as_null = "true")]
#[table_name = "podcast"]
#[derive(Debug, Clone)]
pub struct Podcast {
id: i32,
title: String,
link: String,
description: String,
image_uri: Option<String>,
source_id: i32,
}
impl Podcast {
pub fn id(&self) -> i32 {
self.id
}
pub fn source_id(&self) -> i32 {
self.source_id
}
pub fn title(&self) -> &str {
&self.title
}
pub fn link(&self) -> &str {
&self.link
}
pub fn set_link(&mut self, value: &str) {
self.link = value.to_string();
}
pub fn description(&self) -> &str {
&self.description
}
pub fn set_description(&mut self, value: &str) {
self.description = value.to_string();
}
pub fn image_uri(&self) -> Option<&str> {
self.image_uri.as_ref().map(|s| s.as_str())
}
pub fn set_image_uri(&mut self, value: Option<&str>) {
self.image_uri = value.map(|x| x.to_string());
}
pub fn save(&self, db: &Database) -> QueryResult<Podcast> {
let tempdb = db.lock().unwrap();
self.save_changes::<Podcast>(&*tempdb)
}
}
#[derive(Queryable, Identifiable, AsChangeset)]
#[table_name = "source"]
#[changeset_options(treat_none_as_null = "true")]
#[derive(Debug, Clone)]
pub struct Source {
id: i32,
uri: String,
last_modified: Option<String>,
http_etag: Option<String>,
}
impl<'a> Source {
pub fn id(&self) -> i32 {
self.id
}
pub fn uri(&self) -> &str {
&self.uri
}
pub fn last_modified(&self) -> Option<&str> {
self.last_modified.as_ref().map(|s| s.as_str())
}
pub fn set_last_modified(&mut self, value: Option<&str>) {
self.last_modified = value.map(|x| x.to_string());
}
pub fn http_etag(&self) -> Option<&str> {
self.http_etag.as_ref().map(|s| s.as_str())
}
pub fn set_http_etag(&mut self, value: Option<&str>) {
self.http_etag = value.map(|x| x.to_string());
}
/// Extract Etag and LastModifier from req, and update self and the
/// corresponding db row.
pub fn update_etag(&mut self, db: &Database, req: &reqwest::Response) -> Result<()> {
let headers = req.headers();
// let etag = headers.get_raw("ETag").unwrap();
let etag = headers.get::<ETag>();
let lmod = headers.get::<LastModified>();
// FIXME: This dsnt work most of the time apparently
if self.http_etag() != etag.map(|x| x.tag())
|| self.last_modified != lmod.map(|x| format!("{}", x))
{
self.http_etag = etag.map(|x| x.tag().to_string().to_owned());
self.last_modified = lmod.map(|x| format!("{}", x));
self.save(db)?;
}
Ok(())
}
pub fn save(&self, db: &Database) -> QueryResult<Source> {
let tempdb = db.lock().unwrap();
self.save_changes::<Source>(&*tempdb)
}
}
#[derive(Insertable)]
#[table_name = "source"]
#[derive(Debug, Clone)]
pub struct NewSource<'a> {
pub uri: &'a str,
pub last_modified: Option<&'a str>,
pub http_etag: Option<&'a str>,
}
impl<'a> NewSource<'a> {
pub fn new_with_uri(uri: &'a str) -> NewSource {
NewSource {
uri,
last_modified: None,
http_etag: None,
}
}
}
#[derive(Insertable)]
#[table_name = "episode"]
#[derive(Debug, Clone)]
pub struct NewEpisode<'a> {
pub title: Option<&'a str>,
pub uri: Option<&'a str>,
pub description: Option<&'a str>,
pub published_date: Option<String>,
pub length: Option<i32>,
pub guid: Option<&'a str>,
pub epoch: i32,
pub podcast_id: i32,
}
#[derive(Insertable)]
#[table_name = "podcast"]
#[derive(Debug, Clone)]
pub struct NewPodcast {
pub title: String,
pub link: String,
pub description: String,
pub image_uri: Option<String>,
pub source_id: i32,
}
impl NewPodcast {
pub fn into_podcast(self) -> Podcast {
Podcast {
id: 0,
title: self.title,
link: self.link,
description: self.description,
image_uri: self.image_uri,
source_id: self.source_id,
}
}
}
+493
View File
@@ -0,0 +1,493 @@
use chrono::prelude::*;
use diesel;
use diesel::SaveChangesDsl;
use diesel::prelude::*;
use database::connection;
use errors::DataError;
use models::{Podcast, Save};
use schema::episode;
#[derive(Queryable, Identifiable, AsChangeset, Associations, PartialEq)]
#[table_name = "episode"]
#[changeset_options(treat_none_as_null = "true")]
#[primary_key(title, podcast_id)]
#[belongs_to(Podcast, foreign_key = "podcast_id")]
#[derive(Debug, Clone)]
/// Diesel Model of the episode table.
pub struct Episode {
rowid: i32,
title: String,
uri: Option<String>,
local_uri: Option<String>,
description: Option<String>,
epoch: i32,
length: Option<i32>,
duration: Option<i32>,
guid: Option<String>,
played: Option<i32>,
favorite: bool,
archive: bool,
podcast_id: i32,
}
impl Save<Episode, DataError> for Episode {
/// Helper method to easily save/"sync" current state of self to the Database.
fn save(&self) -> Result<Episode, DataError> {
let db = connection();
let tempdb = db.get()?;
self.save_changes::<Episode>(&*tempdb).map_err(From::from)
}
}
impl Episode {
/// Get the value of the sqlite's `ROW_ID`
pub fn rowid(&self) -> i32 {
self.rowid
}
/// Get the value of the `title` field.
pub fn title(&self) -> &str {
&self.title
}
/// Set the `title`.
pub fn set_title(&mut self, value: &str) {
self.title = value.to_string();
}
/// Get the value of the `uri`.
///
/// Represents the url(usually) that the media file will be located at.
pub fn uri(&self) -> Option<&str> {
self.uri.as_ref().map(|s| s.as_str())
}
/// Set the `uri`.
pub fn set_uri(&mut self, value: Option<&str>) {
self.uri = value.map(|x| x.to_string());
}
/// Get the value of the `local_uri`.
///
/// Represents the local uri,usually filesystem path,
/// that the media file will be located at.
pub fn local_uri(&self) -> Option<&str> {
self.local_uri.as_ref().map(|s| s.as_str())
}
/// Set the `local_uri`.
pub fn set_local_uri(&mut self, value: Option<&str>) {
self.local_uri = value.map(|x| x.to_string());
}
/// Get the `description`.
pub fn description(&self) -> Option<&str> {
self.description.as_ref().map(|s| s.as_str())
}
/// Set the `description`.
pub fn set_description(&mut self, value: Option<&str>) {
self.description = value.map(|x| x.to_string());
}
/// Get the Episode's `guid`.
pub fn guid(&self) -> Option<&str> {
self.guid.as_ref().map(|s| s.as_str())
}
/// Set the `guid`.
pub fn set_guid(&mut self, value: Option<&str>) {
self.guid = value.map(|x| x.to_string());
}
/// Get the `epoch` value.
///
/// Retrieved from the rss Item publish date.
/// Value is set to Utc whenever possible.
pub fn epoch(&self) -> i32 {
self.epoch
}
/// Set the `epoch`.
pub fn set_epoch(&mut self, value: i32) {
self.epoch = value;
}
/// Get the `length`.
///
/// The number represents the size of the file in bytes.
pub fn length(&self) -> Option<i32> {
self.length
}
/// Set the `length`.
pub fn set_length(&mut self, value: Option<i32>) {
self.length = value;
}
/// Get the `duration` value.
///
/// The number represents the duration of the item/episode in seconds.
pub fn duration(&self) -> Option<i32> {
self.duration
}
/// Set the `duration`.
pub fn set_duration(&mut self, value: Option<i32>) {
self.duration = value;
}
/// Epoch representation of the last time the episode was played.
///
/// None/Null for unplayed.
pub fn played(&self) -> Option<i32> {
self.played
}
/// Set the `played` value.
pub fn set_played(&mut self, value: Option<i32>) {
self.played = value;
}
/// Represents the archiving policy for the episode.
pub fn archive(&self) -> bool {
self.archive
}
/// Set the `archive` policy.
///
/// If true, the download cleanr will ignore the episode
/// and the corresponding media value will never be automaticly deleted.
pub fn set_archive(&mut self, b: bool) {
self.archive = b
}
/// Get the `favorite` status of the `Episode`.
pub fn favorite(&self) -> bool {
self.favorite
}
/// Set `favorite` status.
pub fn set_favorite(&mut self, b: bool) {
self.favorite = b
}
/// `Podcast` table foreign key.
pub fn podcast_id(&self) -> i32 {
self.podcast_id
}
/// Sets the `played` value with the current `epoch` timestap and save it.
pub fn set_played_now(&mut self) -> Result<(), DataError> {
let epoch = Utc::now().timestamp() as i32;
self.set_played(Some(epoch));
self.save().map(|_| ())
}
}
#[derive(Queryable, AsChangeset, PartialEq)]
#[table_name = "episode"]
#[changeset_options(treat_none_as_null = "true")]
#[primary_key(title, podcast_id)]
#[derive(Debug, Clone)]
/// Diesel Model to be used for constructing `EpisodeWidgets`.
pub struct EpisodeWidgetQuery {
rowid: i32,
title: String,
uri: Option<String>,
local_uri: Option<String>,
epoch: i32,
length: Option<i32>,
duration: Option<i32>,
played: Option<i32>,
// favorite: bool,
// archive: bool,
podcast_id: i32,
}
impl From<Episode> for EpisodeWidgetQuery {
fn from(e: Episode) -> EpisodeWidgetQuery {
EpisodeWidgetQuery {
rowid: e.rowid,
title: e.title,
uri: e.uri,
local_uri: e.local_uri,
epoch: e.epoch,
length: e.length,
duration: e.duration,
played: e.played,
podcast_id: e.podcast_id,
}
}
}
impl Save<usize, DataError> for EpisodeWidgetQuery {
/// Helper method to easily save/"sync" current state of self to the Database.
fn save(&self) -> Result<usize, DataError> {
use schema::episode::dsl::*;
let db = connection();
let tempdb = db.get()?;
diesel::update(episode.filter(rowid.eq(self.rowid)))
.set(self)
.execute(&*tempdb)
.map_err(From::from)
}
}
impl EpisodeWidgetQuery {
/// Get the value of the sqlite's `ROW_ID`
pub fn rowid(&self) -> i32 {
self.rowid
}
/// Get the value of the `title` field.
pub fn title(&self) -> &str {
&self.title
}
/// Get the value of the `uri`.
///
/// Represents the url(usually) that the media file will be located at.
pub fn uri(&self) -> Option<&str> {
self.uri.as_ref().map(|s| s.as_str())
}
/// Get the value of the `local_uri`.
///
/// Represents the local uri,usually filesystem path,
/// that the media file will be located at.
pub fn local_uri(&self) -> Option<&str> {
self.local_uri.as_ref().map(|s| s.as_str())
}
/// Set the `local_uri`.
pub fn set_local_uri(&mut self, value: Option<&str>) {
self.local_uri = value.map(|x| x.to_string());
}
/// Get the `epoch` value.
///
/// Retrieved from the rss Item publish date.
/// Value is set to Utc whenever possible.
pub fn epoch(&self) -> i32 {
self.epoch
}
/// Get the `length`.
///
/// The number represents the size of the file in bytes.
pub fn length(&self) -> Option<i32> {
self.length
}
/// Set the `length`.
pub fn set_length(&mut self, value: Option<i32>) {
self.length = value;
}
/// Get the `duration` value.
///
/// The number represents the duration of the item/episode in seconds.
pub fn duration(&self) -> Option<i32> {
self.duration
}
/// Set the `duration`.
pub fn set_duration(&mut self, value: Option<i32>) {
self.duration = value;
}
/// Epoch representation of the last time the episode was played.
///
/// None/Null for unplayed.
pub fn played(&self) -> Option<i32> {
self.played
}
/// Set the `played` value.
pub fn set_played(&mut self, value: Option<i32>) {
self.played = value;
}
// /// Represents the archiving policy for the episode.
// pub fn archive(&self) -> bool {
// self.archive
// }
// /// Set the `archive` policy.
// ///
// /// If true, the download cleanr will ignore the episode
// /// and the corresponding media value will never be automaticly deleted.
// pub fn set_archive(&mut self, b: bool) {
// self.archive = b
// }
// /// Get the `favorite` status of the `Episode`.
// pub fn favorite(&self) -> bool {
// self.favorite
// }
// /// Set `favorite` status.
// pub fn set_favorite(&mut self, b: bool) {
// self.favorite = b
// }
/// `Podcast` table foreign key.
pub fn podcast_id(&self) -> i32 {
self.podcast_id
}
/// Sets the `played` value with the current `epoch` timestap and save it.
pub fn set_played_now(&mut self) -> Result<(), DataError> {
let epoch = Utc::now().timestamp() as i32;
self.set_played(Some(epoch));
self.save().map(|_| ())
}
}
#[derive(Queryable, AsChangeset, PartialEq)]
#[table_name = "episode"]
#[changeset_options(treat_none_as_null = "true")]
#[primary_key(title, podcast_id)]
#[derive(Debug, Clone)]
/// Diesel Model to be used internal with the `utils::checkup` function.
pub struct EpisodeCleanerQuery {
rowid: i32,
local_uri: Option<String>,
played: Option<i32>,
}
impl Save<usize, DataError> for EpisodeCleanerQuery {
/// Helper method to easily save/"sync" current state of self to the Database.
fn save(&self) -> Result<usize, DataError> {
use schema::episode::dsl::*;
let db = connection();
let tempdb = db.get()?;
diesel::update(episode.filter(rowid.eq(self.rowid)))
.set(self)
.execute(&*tempdb)
.map_err(From::from)
}
}
impl From<Episode> for EpisodeCleanerQuery {
fn from(e: Episode) -> EpisodeCleanerQuery {
EpisodeCleanerQuery {
rowid: e.rowid(),
local_uri: e.local_uri,
played: e.played,
}
}
}
impl EpisodeCleanerQuery {
/// Get the value of the sqlite's `ROW_ID`
pub fn rowid(&self) -> i32 {
self.rowid
}
/// Get the value of the `local_uri`.
///
/// Represents the local uri,usually filesystem path,
/// that the media file will be located at.
pub fn local_uri(&self) -> Option<&str> {
self.local_uri.as_ref().map(|s| s.as_str())
}
/// Set the `local_uri`.
pub fn set_local_uri(&mut self, value: Option<&str>) {
self.local_uri = value.map(|x| x.to_string());
}
/// Epoch representation of the last time the episode was played.
///
/// None/Null for unplayed.
pub fn played(&self) -> Option<i32> {
self.played
}
/// Set the `played` value.
pub fn set_played(&mut self, value: Option<i32>) {
self.played = value;
}
}
#[derive(Queryable, AsChangeset, PartialEq)]
#[table_name = "episode"]
#[changeset_options(treat_none_as_null = "true")]
#[primary_key(title, podcast_id)]
#[derive(Debug, Clone)]
/// Diesel Model to be used for FIXME.
pub struct EpisodeMinimal {
rowid: i32,
title: String,
uri: Option<String>,
epoch: i32,
duration: Option<i32>,
guid: Option<String>,
podcast_id: i32,
}
impl From<Episode> for EpisodeMinimal {
fn from(e: Episode) -> Self {
EpisodeMinimal {
rowid: e.rowid,
title: e.title,
uri: e.uri,
guid: e.guid,
epoch: e.epoch,
duration: e.duration,
podcast_id: e.podcast_id,
}
}
}
impl EpisodeMinimal {
/// Get the value of the sqlite's `ROW_ID`
pub fn rowid(&self) -> i32 {
self.rowid
}
/// Get the value of the `title` field.
pub fn title(&self) -> &str {
&self.title
}
/// Get the value of the `uri`.
///
/// Represents the url(usually) that the media file will be located at.
pub fn uri(&self) -> Option<&str> {
self.uri.as_ref().map(|s| s.as_str())
}
/// Get the Episode's `guid`.
pub fn guid(&self) -> Option<&str> {
self.guid.as_ref().map(|s| s.as_str())
}
/// Get the `epoch` value.
///
/// Retrieved from the rss Item publish date.
/// Value is set to Utc whenever possible.
pub fn epoch(&self) -> i32 {
self.epoch
}
/// Get the `duration` value.
///
/// The number represents the duration of the item/episode in seconds.
pub fn duration(&self) -> Option<i32> {
self.duration
}
/// `Podcast` table foreign key.
pub fn podcast_id(&self) -> i32 {
self.podcast_id
}
}
+50
View File
@@ -0,0 +1,50 @@
mod new_episode;
mod new_podcast;
mod new_source;
mod episode;
mod podcast;
mod source;
// use futures::prelude::*;
// use futures::future::*;
pub(crate) use self::episode::EpisodeCleanerQuery;
pub(crate) use self::new_episode::{NewEpisode, NewEpisodeMinimal};
pub(crate) use self::new_podcast::NewPodcast;
pub(crate) use self::new_source::NewSource;
#[cfg(test)]
pub(crate) use self::new_episode::NewEpisodeBuilder;
#[cfg(test)]
pub(crate) use self::new_podcast::NewPodcastBuilder;
pub use self::episode::{Episode, EpisodeMinimal, EpisodeWidgetQuery};
pub use self::podcast::{Podcast, PodcastCoverQuery};
pub use self::source::Source;
#[derive(Debug, Clone, PartialEq)]
pub enum IndexState<T> {
Index(T),
Update((T, i32)),
NotChanged,
}
pub trait Insert<T, E> {
fn insert(&self) -> Result<T, E>;
}
pub trait Update<T, E> {
fn update(&self, i32) -> Result<T, E>;
}
// This might need to change in the future
pub trait Index<T, E>: Insert<T, E> + Update<T, E> {
fn index(&self) -> Result<T, E>;
}
/// FIXME: DOCS
pub trait Save<T, E> {
/// Helper method to easily save/"sync" current state of a diesel model to the Database.
fn save(&self) -> Result<T, E>;
}
+647
View File
@@ -0,0 +1,647 @@
use ammonia;
use diesel;
use diesel::prelude::*;
use rfc822_sanitizer::parse_from_rfc2822_with_fallback as parse_rfc822;
use rss;
use database::connection;
use dbqueries;
use errors::DataError;
use models::{Episode, EpisodeMinimal, Index, Insert, Update};
use parser;
use schema::episode;
use utils::{replace_extra_spaces, url_cleaner};
#[derive(Insertable, AsChangeset)]
#[table_name = "episode"]
#[derive(Debug, Clone, Default, Builder, PartialEq)]
#[builder(default)]
#[builder(derive(Debug))]
#[builder(setter(into))]
pub(crate) struct NewEpisode {
title: String,
uri: Option<String>,
description: Option<String>,
length: Option<i32>,
duration: Option<i32>,
guid: Option<String>,
epoch: i32,
podcast_id: i32,
}
impl From<NewEpisodeMinimal> for NewEpisode {
fn from(e: NewEpisodeMinimal) -> Self {
NewEpisodeBuilder::default()
.title(e.title)
.uri(e.uri)
.duration(e.duration)
.epoch(e.epoch)
.podcast_id(e.podcast_id)
.guid(e.guid)
.build()
.unwrap()
}
}
impl Insert<(), DataError> for NewEpisode {
fn insert(&self) -> Result<(), DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
info!("Inserting {:?}", self.title);
diesel::insert_into(episode)
.values(self)
.execute(&con)
.map_err(From::from)
.map(|_| ())
}
}
impl Update<(), DataError> for NewEpisode {
fn update(&self, episode_id: i32) -> Result<(), DataError> {
use schema::episode::dsl::*;
let db = connection();
let con = db.get()?;
info!("Updating {:?}", self.title);
diesel::update(episode.filter(rowid.eq(episode_id)))
.set(self)
.execute(&con)
.map_err(From::from)
.map(|_| ())
}
}
impl Index<(), DataError> for NewEpisode {
// Does not update the episode description if it's the only thing that has changed.
fn index(&self) -> Result<(), DataError> {
let exists = dbqueries::episode_exists(self.title(), self.podcast_id())?;
if exists {
let other = dbqueries::get_episode_minimal_from_pk(self.title(), self.podcast_id())?;
if self != &other {
self.update(other.rowid())
} else {
Ok(())
}
} else {
self.insert()
}
}
}
impl PartialEq<EpisodeMinimal> for NewEpisode {
fn eq(&self, other: &EpisodeMinimal) -> bool {
(self.title() == other.title()) && (self.uri() == other.uri())
&& (self.duration() == other.duration()) && (self.epoch() == other.epoch())
&& (self.guid() == other.guid()) && (self.podcast_id() == other.podcast_id())
}
}
impl PartialEq<Episode> for NewEpisode {
fn eq(&self, other: &Episode) -> bool {
(self.title() == other.title()) && (self.uri() == other.uri())
&& (self.duration() == other.duration()) && (self.epoch() == other.epoch())
&& (self.guid() == other.guid()) && (self.podcast_id() == other.podcast_id())
&& (self.description() == other.description())
&& (self.length() == other.length())
}
}
impl NewEpisode {
/// Parses an `rss::Item` into a `NewEpisode` Struct.
#[allow(dead_code)]
pub(crate) fn new(item: &rss::Item, podcast_id: i32) -> Result<Self, DataError> {
NewEpisodeMinimal::new(item, podcast_id).map(|ep| ep.into_new_episode(item))
}
#[allow(dead_code)]
pub(crate) fn to_episode(&self) -> Result<Episode, DataError> {
self.index()?;
dbqueries::get_episode_from_pk(&self.title, self.podcast_id).map_err(From::from)
}
}
// Ignore the following getters. They are used in unit tests mainly.
impl NewEpisode {
pub(crate) fn title(&self) -> &str {
self.title.as_ref()
}
pub(crate) fn uri(&self) -> Option<&str> {
self.uri.as_ref().map(|s| s.as_str())
}
pub(crate) fn description(&self) -> Option<&str> {
self.description.as_ref().map(|s| s.as_str())
}
pub(crate) fn guid(&self) -> Option<&str> {
self.guid.as_ref().map(|s| s.as_str())
}
pub(crate) fn epoch(&self) -> i32 {
self.epoch
}
pub(crate) fn duration(&self) -> Option<i32> {
self.duration
}
pub(crate) fn length(&self) -> Option<i32> {
self.length
}
pub(crate) fn podcast_id(&self) -> i32 {
self.podcast_id
}
}
#[derive(Insertable, AsChangeset)]
#[table_name = "episode"]
#[derive(Debug, Clone, Builder, PartialEq)]
#[builder(derive(Debug))]
#[builder(setter(into))]
pub(crate) struct NewEpisodeMinimal {
title: String,
uri: Option<String>,
duration: Option<i32>,
epoch: i32,
guid: Option<String>,
podcast_id: i32,
}
impl PartialEq<EpisodeMinimal> for NewEpisodeMinimal {
fn eq(&self, other: &EpisodeMinimal) -> bool {
(self.title() == other.title()) && (self.uri() == other.uri())
&& (self.duration() == other.duration()) && (self.epoch() == other.epoch())
&& (self.guid() == other.guid()) && (self.podcast_id() == other.podcast_id())
}
}
impl NewEpisodeMinimal {
pub(crate) fn new(item: &rss::Item, parent_id: i32) -> Result<Self, DataError> {
if item.title().is_none() {
let err = DataError::ParseEpisodeError {
reason: format!("No title specified for this Episode."),
parent_id,
};
return Err(err);
}
let title = item.title().unwrap().trim().to_owned();
let guid = item.guid().map(|s| s.value().trim().to_owned());
let uri = if let Some(url) = item.enclosure().map(|s| url_cleaner(s.url())) {
Some(url)
} else if item.link().is_some() {
item.link().map(|s| url_cleaner(s))
} else {
let err = DataError::ParseEpisodeError {
reason: format!("No url specified for the item."),
parent_id,
};
return Err(err);
};
// Default to rfc2822 represantation of epoch 0.
let date = parse_rfc822(item.pub_date().unwrap_or("Thu, 1 Jan 1970 00:00:00 +0000"));
// Should treat information from the rss feeds as invalid by default.
// Case: Thu, 05 Aug 2016 06:00:00 -0400 <-- Actually that was friday.
let epoch = date.map(|x| x.timestamp() as i32).unwrap_or(0);
let duration = parser::parse_itunes_duration(item.itunes_ext());
NewEpisodeMinimalBuilder::default()
.title(title)
.uri(uri)
.duration(duration)
.epoch(epoch)
.guid(guid)
.podcast_id(parent_id)
.build()
.map_err(From::from)
}
pub(crate) fn into_new_episode(self, item: &rss::Item) -> NewEpisode {
let length = || -> Option<i32> { item.enclosure().map(|x| x.length().parse().ok())? }();
// Prefer itunes summary over rss.description since many feeds put html into
// rss.description.
let summary = item.itunes_ext().map(|s| s.summary()).and_then(|s| s);
let description = if summary.is_some() {
summary.map(|s| replace_extra_spaces(&ammonia::clean(s)))
} else {
item.description()
.map(|s| replace_extra_spaces(&ammonia::clean(s)))
};
NewEpisodeBuilder::default()
.title(self.title)
.uri(self.uri)
.duration(self.duration)
.epoch(self.epoch)
.podcast_id(self.podcast_id)
.guid(self.guid)
.length(length)
.description(description)
.build()
.unwrap()
}
}
// Ignore the following getters. They are used in unit tests mainly.
impl NewEpisodeMinimal {
pub(crate) fn title(&self) -> &str {
self.title.as_ref()
}
pub(crate) fn uri(&self) -> Option<&str> {
self.uri.as_ref().map(|s| s.as_str())
}
pub(crate) fn guid(&self) -> Option<&str> {
self.guid.as_ref().map(|s| s.as_str())
}
pub(crate) fn duration(&self) -> Option<i32> {
self.duration
}
pub(crate) fn epoch(&self) -> i32 {
self.epoch
}
pub(crate) fn podcast_id(&self) -> i32 {
self.podcast_id
}
}
#[cfg(test)]
mod tests {
use database::truncate_db;
use dbqueries;
use models::*;
use models::new_episode::{NewEpisodeMinimal, NewEpisodeMinimalBuilder};
use rss::Channel;
use std::fs::File;
use std::io::BufReader;
// TODO: Add tests for other feeds too.
// Especially if you find an *intresting* generated feed.
// Known prebuilt expected objects.
lazy_static! {
static ref EXPECTED_MINIMAL_INTERCEPTED_1: NewEpisodeMinimal = {
NewEpisodeMinimalBuilder::default()
.title("The Super Bowl of Racism")
.uri(Some(String::from(
"http://traffic.megaphone.fm/PPY6458293736.mp3",
)))
.guid(Some(String::from("7df4070a-9832-11e7-adac-cb37b05d5e24")))
.epoch(1505296800)
.duration(Some(4171))
.podcast_id(42)
.build()
.unwrap()
};
static ref EXPECTED_MINIMAL_INTERCEPTED_2: NewEpisodeMinimal = {
NewEpisodeMinimalBuilder::default()
.title("Atlas Golfed — U.S.-Backed Think Tanks Target Latin America")
.uri(Some(String::from(
"http://traffic.megaphone.fm/FL5331443769.mp3",
)))
.guid(Some(String::from("7c207a24-e33f-11e6-9438-eb45dcf36a1d")))
.epoch(1502272800)
.duration(Some(4415))
.podcast_id(42)
.build()
.unwrap()
};
static ref EXPECTED_INTERCEPTED_1: NewEpisode = {
let descr = "NSA whistleblower Edward Snowden discusses the massive Equifax data breach \
and allegations of Russian interference in the US election. Commentator \
Shaun King explains his call for a boycott of the NFL and talks about his \
campaign to bring violent neo-Nazis to justice. Rapper Open Mike Eagle \
performs.";
NewEpisodeBuilder::default()
.title("The Super Bowl of Racism")
.uri(Some(String::from(
"http://traffic.megaphone.fm/PPY6458293736.mp3",
)))
.description(Some(String::from(descr)))
.guid(Some(String::from("7df4070a-9832-11e7-adac-cb37b05d5e24")))
.length(Some(66738886))
.epoch(1505296800)
.duration(Some(4171))
.podcast_id(42)
.build()
.unwrap()
};
static ref EXPECTED_INTERCEPTED_2: NewEpisode = {
let descr = "This week on Intercepted: Jeremy gives an update on the aftermath of \
Blackwaters 2007 massacre of Iraqi civilians. Intercept reporter Lee Fang \
lays out how a network of libertarian think tanks called the Atlas Network \
is insidiously shaping political infrastructure in Latin America. We speak \
with attorney and former Hugo Chavez adviser Eva Golinger about the \
Venezuela\'s political turmoil.And we hear Claudia Lizardo of the \
Caracas-based band, La Pequeña Revancha, talk about her music and hopes for \
Venezuela.";
NewEpisodeBuilder::default()
.title("Atlas Golfed — U.S.-Backed Think Tanks Target Latin America")
.uri(Some(String::from(
"http://traffic.megaphone.fm/FL5331443769.mp3",
)))
.description(Some(String::from(descr)))
.guid(Some(String::from("7c207a24-e33f-11e6-9438-eb45dcf36a1d")))
.length(Some(67527575))
.epoch(1502272800)
.duration(Some(4415))
.podcast_id(42)
.build()
.unwrap()
};
static ref UPDATED_DURATION_INTERCEPTED_1: NewEpisode = {
NewEpisodeBuilder::default()
.title("The Super Bowl of Racism")
.uri(Some(String::from(
"http://traffic.megaphone.fm/PPY6458293736.mp3",
)))
.description(Some(String::from("New description")))
.guid(Some(String::from("7df4070a-9832-11e7-adac-cb37b05d5e24")))
.length(Some(66738886))
.epoch(1505296800)
.duration(Some(424242))
.podcast_id(42)
.build()
.unwrap()
};
static ref EXPECTED_MINIMAL_LUP_1: NewEpisodeMinimal = {
NewEpisodeMinimalBuilder::default()
.title("Hacking Devices with Kali Linux | LUP 214")
.uri(Some(String::from(
"http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0214.mp3",
)))
.guid(Some(String::from("78A682B4-73E8-47B8-88C0-1BE62DD4EF9D")))
.epoch(1505280282)
.duration(Some(5733))
.podcast_id(42)
.build()
.unwrap()
};
static ref EXPECTED_MINIMAL_LUP_2: NewEpisodeMinimal = {
NewEpisodeMinimalBuilder::default()
.title("Gnome Does it Again | LUP 213")
.uri(Some(String::from(
"http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0213.mp3",
)))
.guid(Some(String::from("1CE57548-B36C-4F14-832A-5D5E0A24E35B")))
.epoch(1504670247)
.duration(Some(4491))
.podcast_id(42)
.build()
.unwrap()
};
static ref EXPECTED_LUP_1: NewEpisode = {
let descr = "Audit your network with a couple of easy commands on Kali Linux. Chris \
decides to blow off a little steam by attacking his IoT devices, Wes has the \
scope on Equifax blaming open source &amp; the Beard just saved the show. \
Its a really packed episode!";
NewEpisodeBuilder::default()
.title("Hacking Devices with Kali Linux | LUP 214")
.uri(Some(String::from(
"http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0214.mp3",
)))
.description(Some(String::from(descr)))
.guid(Some(String::from("78A682B4-73E8-47B8-88C0-1BE62DD4EF9D")))
.length(Some(46479789))
.epoch(1505280282)
.duration(Some(5733))
.podcast_id(42)
.build()
.unwrap()
};
static ref EXPECTED_LUP_2: NewEpisode = {
let descr = "The Gnome project is about to solve one of our audience's biggest Waylands \
concerns. But as the project takes on a new level of relevance, decisions for the \
next version of Gnome have us worried about the future.\nPlus we chat with Wimpy \
about the Ubuntu Rally in NYC, Microsofts sneaky move to turn Windows 10 into the \
“ULTIMATE LINUX RUNTIME”, community news &amp; more!";
NewEpisodeBuilder::default()
.title("Gnome Does it Again | LUP 213")
.uri(Some(String::from(
"http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0213.mp3",
)))
.description(Some(String::from(descr)))
.guid(Some(String::from("1CE57548-B36C-4F14-832A-5D5E0A24E35B")))
.length(Some(36544272))
.epoch(1504670247)
.duration(Some(4491))
.podcast_id(42)
.build()
.unwrap()
};
}
#[test]
fn test_new_episode_minimal_intercepted() {
let file = File::open("tests/feeds/2018-01-20-Intercepted.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let episode = channel.items().iter().nth(14).unwrap();
let ep = NewEpisodeMinimal::new(&episode, 42).unwrap();
assert_eq!(ep, *EXPECTED_MINIMAL_INTERCEPTED_1);
let episode = channel.items().iter().nth(15).unwrap();
let ep = NewEpisodeMinimal::new(&episode, 42).unwrap();
assert_eq!(ep, *EXPECTED_MINIMAL_INTERCEPTED_2);
}
#[test]
fn test_new_episode_intercepted() {
let file = File::open("tests/feeds/2018-01-20-Intercepted.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let episode = channel.items().iter().nth(14).unwrap();
let ep = NewEpisode::new(&episode, 42).unwrap();
assert_eq!(ep, *EXPECTED_INTERCEPTED_1);
let episode = channel.items().iter().nth(15).unwrap();
let ep = NewEpisode::new(&episode, 42).unwrap();
assert_eq!(ep, *EXPECTED_INTERCEPTED_2);
}
#[test]
fn test_new_episode_minimal_lup() {
let file = File::open("tests/feeds/2018-01-20-LinuxUnplugged.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let episode = channel.items().iter().nth(18).unwrap();
let ep = NewEpisodeMinimal::new(&episode, 42).unwrap();
assert_eq!(ep, *EXPECTED_MINIMAL_LUP_1);
let episode = channel.items().iter().nth(19).unwrap();
let ep = NewEpisodeMinimal::new(&episode, 42).unwrap();
assert_eq!(ep, *EXPECTED_MINIMAL_LUP_2);
}
#[test]
fn test_new_episode_lup() {
let file = File::open("tests/feeds/2018-01-20-LinuxUnplugged.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let episode = channel.items().iter().nth(18).unwrap();
let ep = NewEpisode::new(&episode, 42).unwrap();
assert_eq!(ep, *EXPECTED_LUP_1);
let episode = channel.items().iter().nth(19).unwrap();
let ep = NewEpisode::new(&episode, 42).unwrap();
assert_eq!(ep, *EXPECTED_LUP_2);
}
#[test]
fn test_minimal_into_new_episode() {
truncate_db().unwrap();
let file = File::open("tests/feeds/2018-01-20-Intercepted.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let item = channel.items().iter().nth(14).unwrap();
let ep = EXPECTED_MINIMAL_INTERCEPTED_1
.clone()
.into_new_episode(&item);
assert_eq!(ep, *EXPECTED_INTERCEPTED_1);
let item = channel.items().iter().nth(15).unwrap();
let ep = EXPECTED_MINIMAL_INTERCEPTED_2
.clone()
.into_new_episode(&item);
assert_eq!(ep, *EXPECTED_INTERCEPTED_2);
}
#[test]
fn test_new_episode_insert() {
truncate_db().unwrap();
let file = File::open("tests/feeds/2018-01-20-Intercepted.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let episode = channel.items().iter().nth(14).unwrap();
let new_ep = NewEpisode::new(&episode, 42).unwrap();
new_ep.insert().unwrap();
let ep = dbqueries::get_episode_from_pk(new_ep.title(), new_ep.podcast_id()).unwrap();
assert_eq!(new_ep, ep);
assert_eq!(&new_ep, &*EXPECTED_INTERCEPTED_1);
assert_eq!(&*EXPECTED_INTERCEPTED_1, &ep);
let episode = channel.items().iter().nth(15).unwrap();
let new_ep = NewEpisode::new(&episode, 42).unwrap();
new_ep.insert().unwrap();
let ep = dbqueries::get_episode_from_pk(new_ep.title(), new_ep.podcast_id()).unwrap();
assert_eq!(new_ep, ep);
assert_eq!(&new_ep, &*EXPECTED_INTERCEPTED_2);
assert_eq!(&*EXPECTED_INTERCEPTED_2, &ep);
}
#[test]
fn test_new_episode_update() {
truncate_db().unwrap();
let old = EXPECTED_INTERCEPTED_1.clone().to_episode().unwrap();
let updated = &*UPDATED_DURATION_INTERCEPTED_1;
updated.update(old.rowid()).unwrap();
let mut new = dbqueries::get_episode_from_pk(old.title(), old.podcast_id()).unwrap();
// Assert that updating does not change the rowid and podcast_id
assert_ne!(old, new);
assert_eq!(old.rowid(), new.rowid());
assert_eq!(old.podcast_id(), new.podcast_id());
assert_eq!(updated, &new);
assert_ne!(updated, &old);
new.set_archive(true);
new.save().unwrap();
let new2 = dbqueries::get_episode_from_pk(old.title(), old.podcast_id()).unwrap();
assert_eq!(true, new2.archive());
}
#[test]
fn test_new_episode_index() {
truncate_db().unwrap();
let expected = &*EXPECTED_INTERCEPTED_1;
// First insert
assert!(expected.index().is_ok());
// Second identical, This should take the early return path
assert!(expected.index().is_ok());
// Get the episode
let old = dbqueries::get_episode_from_pk(expected.title(), expected.podcast_id()).unwrap();
// Assert that NewPodcast is equal to the Indexed one
assert_eq!(*expected, old);
let updated = &*UPDATED_DURATION_INTERCEPTED_1;
// Update the podcast
assert!(updated.index().is_ok());
// Get the new Podcast
let new = dbqueries::get_episode_from_pk(expected.title(), expected.podcast_id()).unwrap();
// Assert it's diff from the old one.
assert_ne!(new, old);
assert_eq!(*updated, new);
assert_eq!(new.rowid(), old.rowid());
assert_eq!(new.podcast_id(), old.podcast_id());
}
#[test]
fn test_new_episode_to_episode() {
let expected = &*EXPECTED_INTERCEPTED_1;
let updated = &*UPDATED_DURATION_INTERCEPTED_1;
// Assert insert() produces the same result that you would get with to_podcast()
truncate_db().unwrap();
expected.insert().unwrap();
let old = dbqueries::get_episode_from_pk(expected.title(), expected.podcast_id()).unwrap();
let ep = expected.to_episode().unwrap();
assert_eq!(old, ep);
// Same as above, diff order
truncate_db().unwrap();
let ep = expected.to_episode().unwrap();
// This should error as a unique constrain violation
assert!(expected.insert().is_err());
let mut old =
dbqueries::get_episode_from_pk(expected.title(), expected.podcast_id()).unwrap();
assert_eq!(old, ep);
old.set_archive(true);
old.save().unwrap();
// Assert that it does not mess with user preferences
let ep = updated.to_episode().unwrap();
let old = dbqueries::get_episode_from_pk(expected.title(), expected.podcast_id()).unwrap();
assert_eq!(old, ep);
assert_eq!(old.archive(), true);
}
}
+420
View File
@@ -0,0 +1,420 @@
use diesel;
use diesel::prelude::*;
use ammonia;
use rss;
use errors::DataError;
use models::{Index, Insert, Update};
use models::Podcast;
use schema::podcast;
use database::connection;
use dbqueries;
use utils::{replace_extra_spaces, url_cleaner};
#[derive(Insertable, AsChangeset)]
#[table_name = "podcast"]
#[derive(Debug, Clone, Default, Builder, PartialEq)]
#[builder(default)]
#[builder(derive(Debug))]
#[builder(setter(into))]
pub(crate) struct NewPodcast {
title: String,
link: String,
description: String,
image_uri: Option<String>,
source_id: i32,
}
impl Insert<(), DataError> for NewPodcast {
fn insert(&self) -> Result<(), DataError> {
use schema::podcast::dsl::*;
let db = connection();
let con = db.get()?;
diesel::insert_into(podcast)
.values(self)
.execute(&con)
.map(|_| ())
.map_err(From::from)
}
}
impl Update<(), DataError> for NewPodcast {
fn update(&self, podcast_id: i32) -> Result<(), DataError> {
use schema::podcast::dsl::*;
let db = connection();
let con = db.get()?;
info!("Updating {}", self.title);
diesel::update(podcast.filter(id.eq(podcast_id)))
.set(self)
.execute(&con)
.map(|_| ())
.map_err(From::from)
}
}
// TODO: Maybe return an Enum<Action(Resut)> Instead.
// It would make unti testing better too.
impl Index<(), DataError> for NewPodcast {
fn index(&self) -> Result<(), DataError> {
let exists = dbqueries::podcast_exists(self.source_id)?;
if exists {
let other = dbqueries::get_podcast_from_source_id(self.source_id)?;
if self != &other {
self.update(other.id())
} else {
Ok(())
}
} else {
self.insert()
}
}
}
impl PartialEq<Podcast> for NewPodcast {
fn eq(&self, other: &Podcast) -> bool {
(self.link() == other.link()) && (self.title() == other.title())
&& (self.image_uri() == other.image_uri())
&& (self.description() == other.description())
&& (self.source_id() == other.source_id())
}
}
impl NewPodcast {
/// Parses a `rss::Channel` into a `NewPodcast` Struct.
pub(crate) fn new(chan: &rss::Channel, source_id: i32) -> NewPodcast {
let title = chan.title().trim();
// Prefer itunes summary over rss.description since many feeds put html into
// rss.description.
let summary = chan.itunes_ext().map(|s| s.summary()).and_then(|s| s);
let description = if let Some(sum) = summary {
replace_extra_spaces(&ammonia::clean(sum))
} else {
replace_extra_spaces(&ammonia::clean(chan.description()))
};
let link = url_cleaner(chan.link());
let x = chan.itunes_ext().map(|s| s.image());
let image_uri = if let Some(img) = x {
img.map(|s| s.to_owned())
} else {
chan.image().map(|foo| foo.url().to_owned())
};
NewPodcastBuilder::default()
.title(title)
.description(description)
.link(link)
.image_uri(image_uri)
.source_id(source_id)
.build()
.unwrap()
}
// Look out for when tryinto lands into stable.
pub(crate) fn to_podcast(&self) -> Result<Podcast, DataError> {
self.index()?;
dbqueries::get_podcast_from_source_id(self.source_id).map_err(From::from)
}
}
// Ignore the following geters. They are used in unit tests mainly.
impl NewPodcast {
#[allow(dead_code)]
pub(crate) fn source_id(&self) -> i32 {
self.source_id
}
pub(crate) fn title(&self) -> &str {
&self.title
}
pub(crate) fn link(&self) -> &str {
&self.link
}
pub(crate) fn description(&self) -> &str {
&self.description
}
pub(crate) fn image_uri(&self) -> Option<&str> {
self.image_uri.as_ref().map(|s| s.as_str())
}
}
#[cfg(test)]
mod tests {
use super::*;
// use tokio_core::reactor::Core;
use rss::Channel;
use database::truncate_db;
use models::{NewPodcastBuilder, Save};
use std::fs::File;
use std::io::BufReader;
// Pre-built expected NewPodcast structs.
lazy_static!{
static ref EXPECTED_INTERCEPTED: NewPodcast = {
let descr = "The people behind The Intercepts fearless reporting and incisive \
commentary—Jeremy Scahill, Glenn Greenwald, Betsy Reed and others—discuss \
the crucial issues of our time: national security, civil liberties, foreign \
policy, and criminal justice. Plus interviews with artists, thinkers, and \
newsmakers who challenge our preconceptions about the world we live in.";
NewPodcastBuilder::default()
.title("Intercepted with Jeremy Scahill")
.link("https://theintercept.com/podcasts")
.description(descr)
.image_uri(Some(String::from(
"http://static.megaphone.fm/podcasts/d5735a50-d904-11e6-8532-73c7de466ea6/image/\
uploads_2F1484252190700-qhn5krasklbce3dh-a797539282700ea0298a3a26f7e49b0b_\
2FIntercepted_COVER%2B_281_29.png")
))
.source_id(42)
.build()
.unwrap()
};
static ref EXPECTED_LUP: NewPodcast = {
let descr = "An open show powered by community LINUX Unplugged takes the best attributes \
of open collaboration and focuses them into a weekly lifestyle show about \
Linux.";
NewPodcastBuilder::default()
.title("LINUX Unplugged Podcast")
.link("http://www.jupiterbroadcasting.com/")
.description(descr)
.image_uri(Some(String::from(
"http://www.jupiterbroadcasting.com/images/LASUN-Badge1400.jpg",
)))
.source_id(42)
.build()
.unwrap()
};
static ref EXPECTED_TIPOFF: NewPodcast = {
let desc = "Welcome to The Tip Off- the podcast where we take you behind the scenes of \
some of the best investigative journalism from recent years. Each episode \
well be digging into an investigative scoop- hearing from the journalists \
behind the work as they tell us about the leads, the dead-ends and of course, \
the tip offs. Therell be car chases, slammed doors, terrorist cells, \
meetings in dimly lit bars and cafes, wrangling with despotic regimes and \
much more. So if youre curious about the fun, complicated detective work \
that goes into doing great investigative journalism- then this is the podcast \
for you.";
NewPodcastBuilder::default()
.title("The Tip Off")
.link("http://www.acast.com/thetipoff")
.description(desc)
.image_uri(Some(String::from(
"https://imagecdn.acast.com/image?h=1500&w=1500&source=http%3A%2F%2Fi1.sndcdn.\
com%2Favatars-000317856075-a2coqz-original.jpg",
)))
.source_id(42)
.build()
.unwrap()
};
static ref EXPECTED_STARS: NewPodcast = {
let descr = "<p>The first audio drama from Tor Labs and Gideon Media, Steal the Stars is \
a gripping noir science fiction thriller in 14 episodes: Forbidden love, a \
crashed UFO, an alien body, and an impossible heist unlike any ever \
attempted - scripted by Mac Rogers, the award-winning playwright and writer \
of the multi-million download The Message and LifeAfter.</p>";
let img = "https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-\
b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e\
923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg";
NewPodcastBuilder::default()
.title("Steal the Stars")
.link("http://tor-labs.com/")
.description(descr)
.image_uri(Some(String::from(img)))
.source_id(42)
.build()
.unwrap()
};
static ref EXPECTED_CODE: NewPodcast = {
let descr = "A podcast about humans and technology. Panelists: Coraline Ada Ehmke, David \
Brady, Jessica Kerr, Jay Bobo, Astrid Countee and Sam Livingston-Gray. \
Brought to you by @therubyrep.";
NewPodcastBuilder::default()
.title("Greater Than Code")
.link("https://www.greaterthancode.com/")
.description(descr)
.image_uri(Some(String::from(
"http://www.greaterthancode.com/wp-content/uploads/2016/10/code1400-4.jpg",
)))
.source_id(42)
.build()
.unwrap()
};
static ref UPDATED_DESC_INTERCEPTED: NewPodcast = {
NewPodcastBuilder::default()
.title("Intercepted with Jeremy Scahill")
.link("https://theintercept.com/podcasts")
.description("New Description")
.image_uri(Some(String::from(
"http://static.megaphone.fm/podcasts/d5735a50-d904-11e6-8532-73c7de466ea6/image/\
uploads_2F1484252190700-qhn5krasklbce3dh-a797539282700ea0298a3a26f7e49b0b_\
2FIntercepted_COVER%2B_281_29.png")
))
.source_id(42)
.build()
.unwrap()
};
}
#[test]
fn test_new_podcast_intercepted() {
let file = File::open("tests/feeds/2018-01-20-Intercepted.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let pd = NewPodcast::new(&channel, 42);
assert_eq!(*EXPECTED_INTERCEPTED, pd);
}
#[test]
fn test_new_podcast_lup() {
let file = File::open("tests/feeds/2018-01-20-LinuxUnplugged.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let pd = NewPodcast::new(&channel, 42);
assert_eq!(*EXPECTED_LUP, pd);
}
#[test]
fn test_new_podcast_thetipoff() {
let file = File::open("tests/feeds/2018-01-20-TheTipOff.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let pd = NewPodcast::new(&channel, 42);
assert_eq!(*EXPECTED_TIPOFF, pd);
}
#[test]
fn test_new_podcast_steal_the_stars() {
let file = File::open("tests/feeds/2018-01-20-StealTheStars.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let pd = NewPodcast::new(&channel, 42);
assert_eq!(*EXPECTED_STARS, pd);
}
#[test]
fn test_new_podcast_greater_than_code() {
let file = File::open("tests/feeds/2018-01-20-GreaterThanCode.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let pd = NewPodcast::new(&channel, 42);
assert_eq!(*EXPECTED_CODE, pd);
}
#[test]
// This maybe could be a doc test on insert.
fn test_new_podcast_insert() {
truncate_db().unwrap();
let file = File::open("tests/feeds/2018-01-20-Intercepted.xml").unwrap();
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let npd = NewPodcast::new(&channel, 42);
npd.insert().unwrap();
let pd = dbqueries::get_podcast_from_source_id(42).unwrap();
assert_eq!(npd, pd);
assert_eq!(*EXPECTED_INTERCEPTED, npd);
assert_eq!(&*EXPECTED_INTERCEPTED, &pd);
}
#[test]
// TODO: Add more test/checks
// Currently there's a test that only checks new description or title.
// If you have time and want to help, implement the test for the other fields too.
fn test_new_podcast_update() {
truncate_db().unwrap();
let old = EXPECTED_INTERCEPTED.to_podcast().unwrap();
let updated = &*UPDATED_DESC_INTERCEPTED;
updated.update(old.id()).unwrap();
let mut new = dbqueries::get_podcast_from_source_id(42).unwrap();
assert_ne!(old, new);
assert_eq!(old.id(), new.id());
assert_eq!(old.source_id(), new.source_id());
assert_eq!(updated, &new);
assert_ne!(updated, &old);
// Chech that the update does not override user preferences.
new.set_archive(true);
new.save().unwrap();
let new2 = dbqueries::get_podcast_from_source_id(42).unwrap();
assert_eq!(true, new2.archive());
}
#[test]
fn test_new_podcast_index() {
truncate_db().unwrap();
// First insert
assert!(EXPECTED_INTERCEPTED.index().is_ok());
// Second identical, This should take the early return path
assert!(EXPECTED_INTERCEPTED.index().is_ok());
// Get the podcast
let old = dbqueries::get_podcast_from_source_id(42).unwrap();
// Assert that NewPodcast is equal to the Indexed one
assert_eq!(&*EXPECTED_INTERCEPTED, &old);
let updated = &*UPDATED_DESC_INTERCEPTED;
// Update the podcast
assert!(updated.index().is_ok());
// Get the new Podcast
let new = dbqueries::get_podcast_from_source_id(42).unwrap();
// Assert it's diff from the old one.
assert_ne!(new, old);
assert_eq!(new.id(), old.id());
assert_eq!(new.source_id(), old.source_id());
}
#[test]
fn test_to_podcast() {
// Assert insert() produces the same result that you would get with to_podcast()
truncate_db().unwrap();
EXPECTED_INTERCEPTED.insert().unwrap();
let old = dbqueries::get_podcast_from_source_id(42).unwrap();
let pd = EXPECTED_INTERCEPTED.to_podcast().unwrap();
assert_eq!(old, pd);
// Same as above, diff order
truncate_db().unwrap();
let pd = EXPECTED_INTERCEPTED.to_podcast().unwrap();
// This should error as a unique constrain violation
assert!(EXPECTED_INTERCEPTED.insert().is_err());
let mut old = dbqueries::get_podcast_from_source_id(42).unwrap();
assert_eq!(old, pd);
old.set_archive(true);
old.save().unwrap();
// Assert that it does not mess with user preferences
let pd = UPDATED_DESC_INTERCEPTED.to_podcast().unwrap();
let old = dbqueries::get_podcast_from_source_id(42).unwrap();
assert_eq!(old, pd);
assert_eq!(old.archive(), true);
}
}
+52
View File
@@ -0,0 +1,52 @@
#![allow(unused_mut)]
use diesel;
use diesel::prelude::*;
use url::Url;
use database::connection;
use dbqueries;
// use models::{Insert, Update};
use errors::DataError;
use models::Source;
use schema::source;
#[derive(Insertable)]
#[table_name = "source"]
#[derive(Debug, Clone, Default, Builder, PartialEq)]
#[builder(default)]
#[builder(derive(Debug))]
#[builder(setter(into))]
pub(crate) struct NewSource {
uri: String,
last_modified: Option<String>,
http_etag: Option<String>,
}
impl NewSource {
pub(crate) fn new(uri: &Url) -> NewSource {
NewSource {
uri: uri.to_string(),
last_modified: None,
http_etag: None,
}
}
pub(crate) fn insert_or_ignore(&self) -> Result<(), DataError> {
use schema::source::dsl::*;
let db = connection();
let con = db.get()?;
diesel::insert_or_ignore_into(source)
.values(self)
.execute(&con)
.map(|_| ())
.map_err(From::from)
}
// Look out for when tryinto lands into stable.
pub(crate) fn to_source(&self) -> Result<Source, DataError> {
self.insert_or_ignore()?;
dbqueries::get_source_from_uri(&self.uri).map_err(From::from)
}
}
+170
View File
@@ -0,0 +1,170 @@
use diesel::SaveChangesDsl;
use database::connection;
use errors::DataError;
use models::{Save, Source};
use schema::podcast;
use std::sync::Arc;
#[derive(Queryable, Identifiable, AsChangeset, Associations, PartialEq)]
#[belongs_to(Source, foreign_key = "source_id")]
#[changeset_options(treat_none_as_null = "true")]
#[table_name = "podcast"]
#[derive(Debug, Clone)]
/// Diesel Model of the podcast table.
pub struct Podcast {
id: i32,
title: String,
link: String,
description: String,
image_uri: Option<String>,
favorite: bool,
archive: bool,
always_dl: bool,
source_id: i32,
}
impl Save<Podcast, DataError> for Podcast {
/// Helper method to easily save/"sync" current state of self to the Database.
fn save(&self) -> Result<Podcast, DataError> {
let db = connection();
let tempdb = db.get()?;
self.save_changes::<Podcast>(&*tempdb).map_err(From::from)
}
}
impl Podcast {
/// Get the Feed `id`.
pub fn id(&self) -> i32 {
self.id
}
/// Get the Feed `title`.
pub fn title(&self) -> &str {
&self.title
}
/// Get the Feed `link`.
///
/// Usually the website/homepage of the content creator.
pub fn link(&self) -> &str {
&self.link
}
/// Set the Podcast/Feed `link`.
pub fn set_link(&mut self, value: &str) {
self.link = value.to_string();
}
/// Get the `description`.
pub fn description(&self) -> &str {
&self.description
}
/// Set the `description`.
pub fn set_description(&mut self, value: &str) {
self.description = value.to_string();
}
/// Get the `image_uri`.
///
/// Represents the uri(url usually) that the Feed cover image is located at.
pub fn image_uri(&self) -> Option<&str> {
self.image_uri.as_ref().map(|s| s.as_str())
}
/// Set the `image_uri`.
pub fn set_image_uri(&mut self, value: Option<&str>) {
self.image_uri = value.map(|x| x.to_string());
}
/// Represents the archiving policy for the episode.
pub fn archive(&self) -> bool {
self.archive
}
/// Set the `archive` policy.
pub fn set_archive(&mut self, b: bool) {
self.archive = b
}
/// Get the `favorite` status of the `Podcast` Feed.
pub fn favorite(&self) -> bool {
self.favorite
}
/// Set `favorite` status.
pub fn set_favorite(&mut self, b: bool) {
self.favorite = b
}
/// Represents the download policy for the `Podcast` Feed.
///
/// Reserved for the use with a Download manager, yet to be implemented.
///
/// If true Podcast Episode should be downloaded automaticly/skipping
/// the selection queue.
pub fn always_download(&self) -> bool {
self.always_dl
}
/// Set the download policy.
pub fn set_always_download(&mut self, b: bool) {
self.always_dl = b
}
/// `Source` table foreign key.
pub fn source_id(&self) -> i32 {
self.source_id
}
}
#[derive(Queryable, Debug, Clone)]
/// Diesel Model of the podcast cover query.
/// Used for fetching information about a Podcast's cover.
pub struct PodcastCoverQuery {
id: i32,
title: String,
image_uri: Option<String>,
}
impl From<Podcast> for PodcastCoverQuery {
fn from(p: Podcast) -> PodcastCoverQuery {
PodcastCoverQuery {
id: p.id(),
title: p.title,
image_uri: p.image_uri,
}
}
}
impl From<Arc<Podcast>> for PodcastCoverQuery {
fn from(p: Arc<Podcast>) -> PodcastCoverQuery {
PodcastCoverQuery {
id: p.id(),
title: p.title.clone(),
image_uri: p.image_uri.clone(),
}
}
}
impl PodcastCoverQuery {
/// Get the Feed `id`.
pub fn id(&self) -> i32 {
self.id
}
/// Get the Feed `title`.
pub fn title(&self) -> &str {
&self.title
}
/// Get the `image_uri`.
///
/// Represents the uri(url usually) that the Feed cover image is located at.
pub fn image_uri(&self) -> Option<&str> {
self.image_uri.as_ref().map(|s| s.as_str())
}
}
+316
View File
@@ -0,0 +1,316 @@
use diesel::SaveChangesDsl;
// use failure::ResultExt;
use rss::Channel;
use url::Url;
use hyper::{Client, Method, Request, Response, StatusCode, Uri};
use hyper::client::HttpConnector;
use hyper::header::{ETag, EntityTag, HttpDate, IfModifiedSince, IfNoneMatch, LastModified,
Location};
use hyper_tls::HttpsConnector;
// use futures::future::ok;
use futures::prelude::*;
use futures_cpupool::CpuPool;
use database::connection;
use errors::DataError;
use feed::{Feed, FeedBuilder};
use models::{NewSource, Save};
use schema::source;
use std::str::FromStr;
#[derive(Queryable, Identifiable, AsChangeset, PartialEq)]
#[table_name = "source"]
#[changeset_options(treat_none_as_null = "true")]
#[derive(Debug, Clone)]
/// Diesel Model of the source table.
pub struct Source {
id: i32,
uri: String,
last_modified: Option<String>,
http_etag: Option<String>,
}
impl Save<Source, DataError> for Source {
/// Helper method to easily save/"sync" current state of self to the Database.
fn save(&self) -> Result<Source, DataError> {
let db = connection();
let con = db.get()?;
self.save_changes::<Source>(&con).map_err(From::from)
}
}
impl Source {
/// Get the source `id` column.
pub fn id(&self) -> i32 {
self.id
}
/// Represents the location(usually url) of the Feed xml file.
pub fn uri(&self) -> &str {
&self.uri
}
/// Set the `uri` field value.
pub fn set_uri(&mut self, uri: String) {
self.uri = uri;
}
/// Represents the Http Last-Modified Header field.
///
/// See [RFC 7231](https://tools.ietf.org/html/rfc7231#section-7.2) for more.
pub fn last_modified(&self) -> Option<&str> {
self.last_modified.as_ref().map(|s| s.as_str())
}
/// Set `last_modified` value.
pub fn set_last_modified(&mut self, value: Option<String>) {
// self.last_modified = value.map(|x| x.to_string());
self.last_modified = value;
}
/// Represents the Http Etag Header field.
///
/// See [RFC 7231](https://tools.ietf.org/html/rfc7231#section-7.2) for more.
pub fn http_etag(&self) -> Option<&str> {
self.http_etag.as_ref().map(|s| s.as_str())
}
/// Set `http_etag` value.
pub fn set_http_etag(&mut self, value: Option<&str>) {
self.http_etag = value.map(|x| x.to_string());
}
/// Extract Etag and LastModifier from res, and update self and the
/// corresponding db row.
fn update_etag(&mut self, res: &Response) -> Result<(), DataError> {
let headers = res.headers();
let etag = headers.get::<ETag>().map(|x| x.tag());
let lmod = headers.get::<LastModified>().map(|x| format!("{}", x));
if (self.http_etag() != etag) || (self.last_modified != lmod) {
self.set_http_etag(etag);
self.set_last_modified(lmod);
self.save()?;
}
Ok(())
}
// TODO match on more stuff
// 301: Moved Permanently
// 304: Up to date Feed, checked with the Etag
// 307: Temporary redirect of the url
// 308: Permanent redirect of the url
// 401: Unathorized
// 403: Forbidden
// 408: Timeout
// 410: Feed deleted
// TODO: Rething this api,
fn match_status(mut self, res: Response) -> Result<(Self, Response), DataError> {
self.update_etag(&res)?;
let code = res.status();
match code {
StatusCode::NotModified => {
let err = DataError::HttpStatusError {
url: self.uri,
status_code: code,
context: format!("304: skipping.."),
};
return Err(err);
}
StatusCode::MovedPermanently => {
error!("Feed was moved permanently.");
self.handle_301(&res)?;
let err = DataError::HttpStatusError {
url: self.uri,
status_code: code,
context: format!("301: Feed was moved permanently."),
};
return Err(err);
}
StatusCode::TemporaryRedirect => debug!("307: Temporary Redirect."),
StatusCode::PermanentRedirect => warn!("308: Permanent Redirect."),
StatusCode::Unauthorized => {
let err = DataError::HttpStatusError {
url: self.uri,
status_code: code,
context: format!("401: Unauthorized."),
};
return Err(err);
}
StatusCode::Forbidden => {
let err = DataError::HttpStatusError {
url: self.uri,
status_code: code,
context: format!("403: Forbidden."),
};
return Err(err);
}
StatusCode::NotFound => return Err(format!("404: Not found.")).map_err(From::from),
StatusCode::RequestTimeout => {
let err = DataError::HttpStatusError {
url: self.uri,
status_code: code,
context: format!("408: Request Timeout."),
};
return Err(err);
}
StatusCode::Gone => {
let err = DataError::HttpStatusError {
url: self.uri,
status_code: code,
context: format!("410: Feed was deleted.."),
};
return Err(err);
}
_ => info!("HTTP StatusCode: {}", code),
};
Ok((self, res))
}
fn handle_301(&mut self, res: &Response) -> Result<(), DataError> {
let headers = res.headers();
if let Some(url) = headers.get::<Location>() {
self.set_uri(url.to_string());
self.http_etag = None;
self.last_modified = None;
self.save()?;
info!("Feed url was updated succesfully.");
// TODO: Refresh in place instead of next time, Not a priority.
info!("New content will be fetched with the next refesh.");
}
Ok(())
}
/// Construct a new `Source` with the given `uri` and index it.
///
/// This only indexes the `Source` struct, not the Podcast Feed.
pub fn from_url(uri: &str) -> Result<Source, DataError> {
let url = Url::parse(uri)?;
NewSource::new(&url).to_source()
}
/// `Feed` constructor.
///
/// Fetches the latest xml Feed.
///
/// Updates the validator Http Headers.
///
/// Consumes `self` and Returns the corresponding `Feed` Object.
// Refactor into TryInto once it lands on stable.
pub fn into_feed(
self,
client: &Client<HttpsConnector<HttpConnector>>,
pool: CpuPool,
ignore_etags: bool,
) -> Box<Future<Item = Feed, Error = DataError>> {
let id = self.id();
let feed = self.request_constructor(client, ignore_etags)
.and_then(move |(_, res)| response_to_channel(res, pool))
.and_then(move |chan| {
FeedBuilder::default()
.channel(chan)
.source_id(id)
.build()
.map_err(From::from)
});
Box::new(feed)
}
// TODO: make ignore_etags an Enum for better ergonomics.
// #bools_are_just_2variant_enmus
fn request_constructor(
self,
client: &Client<HttpsConnector<HttpConnector>>,
ignore_etags: bool,
) -> Box<Future<Item = (Self, Response), Error = DataError>> {
// FIXME: remove unwrap somehow
let uri = Uri::from_str(self.uri()).unwrap();
let mut req = Request::new(Method::Get, uri);
if !ignore_etags {
if let Some(foo) = self.http_etag() {
req.headers_mut().set(IfNoneMatch::Items(vec![
EntityTag::new(true, foo.to_owned()),
]));
}
if let Some(foo) = self.last_modified() {
if let Ok(x) = foo.parse::<HttpDate>() {
req.headers_mut().set(IfModifiedSince(x));
}
}
}
let work = client
.request(req)
.map_err(From::from)
// TODO: tail recursion loop that would follow redirects directly
.and_then(move |res| self.match_status(res));
Box::new(work)
}
}
fn response_to_channel(
res: Response,
pool: CpuPool,
) -> Box<Future<Item = Channel, Error = DataError> + Send> {
let chan = res.body()
.concat2()
.map(|x| x.into_iter())
.map_err(From::from)
.map(|iter| iter.collect::<Vec<u8>>())
.map(|utf_8_bytes| String::from_utf8_lossy(&utf_8_bytes).into_owned())
.and_then(|buf| {
Channel::from_str(&buf).or_else(|err| Err(DataError::RssCrateError(format!("{}", err))))
});
let cpu_chan = pool.spawn(chan);
Box::new(cpu_chan)
}
#[cfg(test)]
mod tests {
use super::*;
use tokio_core::reactor::Core;
use database::truncate_db;
use utils::get_feed;
#[test]
fn test_into_feed() {
truncate_db().unwrap();
let pool = CpuPool::new_num_cpus();
let mut core = Core::new().unwrap();
let client = Client::configure()
.connector(HttpsConnector::new(4, &core.handle()).unwrap())
.build(&core.handle());
let url = "https://web.archive.org/web/20180120083840if_/https://feeds.feedburner.\
com/InterceptedWithJeremyScahill";
let source = Source::from_url(url).unwrap();
let id = source.id();
let feed = source.into_feed(&client, pool.clone(), true);
let feed = core.run(feed).unwrap();
let expected = get_feed("tests/feeds/2018-01-20-Intercepted.xml", id);
assert_eq!(expected, feed);
}
}
+81
View File
@@ -0,0 +1,81 @@
use rss::extension::itunes::ITunesItemExtension;
/// Parses an Item Itunes extension and returns it's duration value in seconds.
// FIXME: Rafactor
#[allow(non_snake_case)]
pub(crate) fn parse_itunes_duration(item: Option<&ITunesItemExtension>) -> Option<i32> {
let duration = item.map(|s| s.duration())??;
// FOR SOME FUCKING REASON, IN THE APPLE EXTENSION SPEC
// THE DURATION CAN BE EITHER AN INT OF SECONDS OR
// A STRING OF THE FOLLOWING FORMATS:
// HH:MM:SS, H:MM:SS, MM:SS, M:SS
// LIKE WHO THE FUCK THOUGH THAT WOULD BE A GOOD IDEA.
if let Ok(NO_FUCKING_LOGIC) = duration.parse::<i32>() {
return Some(NO_FUCKING_LOGIC);
};
let mut seconds = 0;
let fk_apple = duration.split(':').collect::<Vec<_>>();
if fk_apple.len() == 3 {
seconds += fk_apple[0].parse::<i32>().unwrap_or(0) * 3600;
seconds += fk_apple[1].parse::<i32>().unwrap_or(0) * 60;
seconds += fk_apple[2].parse::<i32>().unwrap_or(0);
} else if fk_apple.len() == 2 {
seconds += fk_apple[0].parse::<i32>().unwrap_or(0) * 60;
seconds += fk_apple[1].parse::<i32>().unwrap_or(0);
}
Some(seconds)
}
#[cfg(test)]
mod tests {
use rss::extension::itunes::ITunesItemExtensionBuilder;
use super::*;
#[test]
fn test_itunes_duration() {
// Input is a String<Int>
let extension = ITunesItemExtensionBuilder::default()
.duration(Some("3370".into()))
.build()
.unwrap();
let item = Some(&extension);
assert_eq!(parse_itunes_duration(item), Some(3370));
// Input is a String<M:SS>
let extension = ITunesItemExtensionBuilder::default()
.duration(Some("6:10".into()))
.build()
.unwrap();
let item = Some(&extension);
assert_eq!(parse_itunes_duration(item), Some(370));
// Input is a String<MM:SS>
let extension = ITunesItemExtensionBuilder::default()
.duration(Some("56:10".into()))
.build()
.unwrap();
let item = Some(&extension);
assert_eq!(parse_itunes_duration(item), Some(3370));
// Input is a String<H:MM:SS>
let extension = ITunesItemExtensionBuilder::default()
.duration(Some("1:56:10".into()))
.build()
.unwrap();
let item = Some(&extension);
assert_eq!(parse_itunes_duration(item), Some(6970));
// Input is a String<HH:MM:SS>
let extension = ITunesItemExtensionBuilder::default()
.duration(Some("01:56:10".into()))
.build()
.unwrap();
let item = Some(&extension);
assert_eq!(parse_itunes_duration(item), Some(6970));
}
}
+217
View File
@@ -0,0 +1,217 @@
// FIXME:
//! Docs.
use futures::future::*;
use futures_cpupool::CpuPool;
// use futures::prelude::*;
use hyper::Client;
use hyper::client::HttpConnector;
use hyper_tls::HttpsConnector;
use tokio_core::reactor::Core;
use num_cpus;
use rss;
use Source;
use dbqueries;
use errors::DataError;
use models::{IndexState, NewEpisode, NewEpisodeMinimal};
// use std::sync::{Arc, Mutex};
macro_rules! clone {
(@param _) => ( _ );
(@param $x:ident) => ( $x );
($($n:ident),+ => move || $body:expr) => (
{
$( let $n = $n.clone(); )+
move || $body
}
);
($($n:ident),+ => move |$($p:tt),+| $body:expr) => (
{
$( let $n = $n.clone(); )+
move |$(clone!(@param $p),)+| $body
}
);
}
/// The pipline to be run for indexing and updating a Podcast feed that originates from
/// `Source.uri`.
///
/// Messy temp diagram:
/// Source -> GET Request -> Update Etags -> Check Status -> Parse xml/Rss ->
/// Convert `rss::Channel` into Feed -> Index Podcast -> Index Episodes.
pub fn pipeline<S: IntoIterator<Item = Source>>(
sources: S,
ignore_etags: bool,
tokio_core: &mut Core,
pool: &CpuPool,
client: Client<HttpsConnector<HttpConnector>>,
) -> Result<(), DataError> {
let list: Vec<_> = sources
.into_iter()
.map(clone!(pool => move |s| s.into_feed(&client, pool.clone(), ignore_etags)))
.map(|fut| fut.and_then(clone!(pool => move |feed| pool.clone().spawn(feed.index()))))
.map(|fut| fut.map(|_| ()).map_err(|err| error!("Error: {}", err)))
.collect();
if list.is_empty() {
return Err(DataError::EmptyFuturesList);
}
// Thats not really concurrent yet I think.
tokio_core.run(collect_futures(list))?;
Ok(())
}
/// Creates a tokio `reactor::Core`, a `CpuPool`, and a `hyper::Client` and runs the pipeline.
pub fn run(sources: Vec<Source>, ignore_etags: bool) -> Result<(), DataError> {
if sources.is_empty() {
return Ok(());
}
let pool = CpuPool::new_num_cpus();
let mut core = Core::new()?;
let handle = core.handle();
let client = Client::configure()
.connector(HttpsConnector::new(num_cpus::get(), &handle)?)
.build(&handle);
pipeline(sources, ignore_etags, &mut core, &pool, client)
}
/// Docs
pub fn index_single_source(s: Source, ignore_etags: bool) -> Result<(), DataError> {
let pool = CpuPool::new_num_cpus();
let mut core = Core::new()?;
let handle = core.handle();
let client = Client::configure()
.connector(HttpsConnector::new(num_cpus::get(), &handle)?)
.build(&handle);
let work = s.into_feed(&client, pool.clone(), ignore_etags)
.and_then(clone!(pool => move |feed| pool.clone().spawn(feed.index())))
.map(|_| ());
core.run(work)
}
fn determine_ep_state(
ep: NewEpisodeMinimal,
item: &rss::Item,
) -> Result<IndexState<NewEpisode>, DataError> {
// Check if feed exists
let exists = dbqueries::episode_exists(ep.title(), ep.podcast_id())?;
if !exists {
Ok(IndexState::Index(ep.into_new_episode(item)))
} else {
let old = dbqueries::get_episode_minimal_from_pk(ep.title(), ep.podcast_id())?;
let rowid = old.rowid();
if ep != old {
Ok(IndexState::Update((ep.into_new_episode(item), rowid)))
} else {
Ok(IndexState::NotChanged)
}
}
}
pub(crate) fn glue_async<'a>(
item: &'a rss::Item,
id: i32,
) -> Box<Future<Item = IndexState<NewEpisode>, Error = DataError> + 'a> {
Box::new(
result(NewEpisodeMinimal::new(item, id)).and_then(move |ep| determine_ep_state(ep, item)),
)
}
// Weird magic from #rust irc channel
// kudos to remexre
/// FIXME: Docs
#[cfg_attr(feature = "cargo-clippy", allow(type_complexity))]
pub fn collect_futures<F>(
futures: Vec<F>,
) -> Box<Future<Item = Vec<Result<F::Item, F::Error>>, Error = DataError>>
where
F: 'static + Future,
<F as Future>::Item: 'static,
<F as Future>::Error: 'static,
{
Box::new(loop_fn((futures, vec![]), |(futures, mut done)| {
select_all(futures).then(|r| {
let (r, rest) = match r {
Ok((r, _, rest)) => (Ok(r), rest),
Err((r, _, rest)) => (Err(r), rest),
};
done.push(r);
if rest.is_empty() {
Ok(Loop::Break(done))
} else {
Ok(Loop::Continue((rest, done)))
}
})
}))
}
#[cfg(test)]
mod tests {
use super::*;
use Source;
use database::truncate_db;
// (path, url) tuples.
const URLS: &[(&str, &str)] = {
&[
(
"tests/feeds/2018-01-20-Intercepted.xml",
"https://web.archive.org/web/20180120083840if_/https://feeds.feedburner.\
com/InterceptedWithJeremyScahill",
),
(
"tests/feeds/2018-01-20-LinuxUnplugged.xml",
"https://web.archive.org/web/20180120110314if_/https://feeds.feedburner.\
com/linuxunplugged",
),
(
"tests/feeds/2018-01-20-TheTipOff.xml",
"https://web.archive.org/web/20180120110727if_/https://rss.acast.com/thetipoff",
),
(
"tests/feeds/2018-01-20-StealTheStars.xml",
"https://web.archive.org/web/20180120104957if_/https://rss.art19.\
com/steal-the-stars",
),
(
"tests/feeds/2018-01-20-GreaterThanCode.xml",
"https://web.archive.org/web/20180120104741if_/https://www.greaterthancode.\
com/feed/podcast",
),
]
};
#[test]
/// Insert feeds and update/index them.
fn test_pipeline() {
truncate_db().unwrap();
URLS.iter().for_each(|&(_, url)| {
// Index the urls into the source table.
Source::from_url(url).unwrap();
});
let sources = dbqueries::get_sources().unwrap();
run(sources, true).unwrap();
let sources = dbqueries::get_sources().unwrap();
// Run again to cover Unique constrains erros.
run(sources, true).unwrap();
// Assert the index rows equal the controlled results
assert_eq!(dbqueries::get_sources().unwrap().len(), 5);
assert_eq!(dbqueries::get_podcasts().unwrap().len(), 5);
assert_eq!(dbqueries::get_episodes().unwrap().len(), 354);
}
}
+12 -5
View File
@@ -1,15 +1,17 @@
table! {
episode (id) {
id -> Integer,
title -> Nullable<Text>,
uri -> Text,
episode (title, podcast_id) {
rowid -> Integer,
title -> Text,
uri -> Nullable<Text>,
local_uri -> Nullable<Text>,
description -> Nullable<Text>,
published_date -> Nullable<Text>,
epoch -> Integer,
length -> Nullable<Integer>,
duration -> Nullable<Integer>,
guid -> Nullable<Text>,
played -> Nullable<Integer>,
favorite -> Bool,
archive -> Bool,
podcast_id -> Integer,
}
}
@@ -21,6 +23,9 @@ table! {
link -> Text,
description -> Text,
image_uri -> Nullable<Text>,
favorite -> Bool,
archive -> Bool,
always_dl -> Bool,
source_id -> Integer,
}
}
@@ -33,3 +38,5 @@ table! {
http_etag -> Nullable<Text>,
}
}
allow_tables_to_appear_in_same_query!(episode, podcast, source,);
+325
View File
@@ -0,0 +1,325 @@
//! Helper utilities for accomplishing various tasks.
use chrono::prelude::*;
use rayon::prelude::*;
use itertools::Itertools;
use url::{Position, Url};
use dbqueries;
use errors::DataError;
use models::{EpisodeCleanerQuery, Podcast, Save};
use xdg_dirs::DL_DIR;
use std::fs;
use std::path::Path;
/// Scan downloaded `episode` entries that might have broken `local_uri`s and set them to `None`.
fn download_checker() -> Result<(), DataError> {
let mut episodes = dbqueries::get_downloaded_episodes()?;
episodes
.par_iter_mut()
.filter_map(|ep| {
if !Path::new(ep.local_uri()?).exists() {
return Some(ep);
}
None
})
.for_each(|ep| {
ep.set_local_uri(None);
if let Err(err) = ep.save() {
error!("Error while trying to update episode: {:#?}", ep);
error!("{}", err);
};
});
Ok(())
}
/// Delete watched `episodes` that have exceded their liftime after played.
fn played_cleaner() -> Result<(), DataError> {
let mut episodes = dbqueries::get_played_cleaner_episodes()?;
let now_utc = Utc::now().timestamp() as i32;
episodes
.par_iter_mut()
.filter(|ep| ep.local_uri().is_some() && ep.played().is_some())
.for_each(|ep| {
// TODO: expose a config and a user set option.
// Chnage the test too when exposed
let limit = ep.played().unwrap() + 172_800; // add 2days in seconds
if now_utc > limit {
if let Err(err) = delete_local_content(ep) {
error!("Error while trying to delete file: {:?}", ep.local_uri());
error!("{}", err);
} else {
info!("Episode {:?} was deleted succesfully.", ep.local_uri());
};
}
});
Ok(())
}
/// Check `ep.local_uri` field and delete the file it points to.
fn delete_local_content(ep: &mut EpisodeCleanerQuery) -> Result<(), DataError> {
if ep.local_uri().is_some() {
let uri = ep.local_uri().unwrap().to_owned();
if Path::new(&uri).exists() {
let res = fs::remove_file(&uri);
if res.is_ok() {
ep.set_local_uri(None);
ep.save()?;
} else {
error!("Error while trying to delete file: {}", uri);
error!("{}", res.unwrap_err());
};
}
} else {
error!(
"Something went wrong evaluating the following path: {:?}",
ep.local_uri(),
);
}
Ok(())
}
/// Database cleaning tasks.
///
/// Runs a download checker which looks for `Episode.local_uri` entries that
/// doesn't exist and sets them to None
///
/// Runs a cleaner for played Episode's that are pass the lifetime limit and
/// scheduled for removal.
pub fn checkup() -> Result<(), DataError> {
info!("Running database checks.");
download_checker()?;
played_cleaner()?;
info!("Checks completed.");
Ok(())
}
/// Remove fragment identifiers and query pairs from a URL
/// If url parsing fails, return's a trimmed version of the original input.
pub fn url_cleaner(s: &str) -> String {
// Copied from the cookbook.
// https://rust-lang-nursery.github.io/rust-cookbook/net.html
// #remove-fragment-identifiers-and-query-pairs-from-a-url
match Url::parse(s) {
Ok(parsed) => parsed[..Position::AfterPath].to_owned(),
_ => s.trim().to_owned(),
}
}
/// Helper functions that strips extra spaces and newlines and ignores the tabs.
#[allow(match_same_arms)]
pub fn replace_extra_spaces(s: &str) -> String {
s.trim()
.chars()
.filter(|ch| *ch != '\t')
.coalesce(|current, next| match (current, next) {
('\n', '\n') => Ok('\n'),
('\n', ' ') => Ok('\n'),
(' ', '\n') => Ok('\n'),
(' ', ' ') => Ok(' '),
(_, _) => Err((current, next)),
})
.collect::<String>()
}
/// Returns the URI of a Podcast Downloads given it's title.
pub fn get_download_folder(pd_title: &str) -> Result<String, DataError> {
// It might be better to make it a hash of the title or the podcast rowid
let download_fold = format!("{}/{}", DL_DIR.to_str().unwrap(), pd_title);
// Create the folder
fs::DirBuilder::new()
.recursive(true)
.create(&download_fold)?;
Ok(download_fold)
}
/// Removes all the entries associated with the given show from the database,
/// and deletes all of the downloaded content.
// TODO: Write Tests
pub fn delete_show(pd: &Podcast) -> Result<(), DataError> {
dbqueries::remove_feed(pd)?;
info!("{} was removed succesfully.", pd.title());
let fold = get_download_folder(pd.title())?;
fs::remove_dir_all(&fold)?;
info!("All the content at, {} was removed succesfully", &fold);
Ok(())
}
#[cfg(test)]
use Feed;
#[cfg(test)]
/// Helper function that open a local file, parse the rss::Channel and gives back a Feed object.
/// Alternative Feed constructor to be used for tests.
pub fn get_feed(file_path: &str, id: i32) -> Feed {
use feed::FeedBuilder;
use rss::Channel;
use std::fs;
use std::io::BufReader;
// open the xml file
let feed = fs::File::open(file_path).unwrap();
// parse it into a channel
let chan = Channel::read_from(BufReader::new(feed)).unwrap();
FeedBuilder::default()
.channel(chan)
.source_id(id)
.build()
.unwrap()
}
#[cfg(test)]
mod tests {
extern crate tempdir;
use self::tempdir::TempDir;
use super::*;
use database::truncate_db;
use models::NewEpisodeBuilder;
use std::fs::File;
use std::io::Write;
fn helper_db() -> TempDir {
// Clean the db
truncate_db().unwrap();
// Setup tmp file stuff
let tmp_dir = TempDir::new("hammond_test").unwrap();
let valid_path = tmp_dir.path().join("virtual_dl.mp3");
let bad_path = tmp_dir.path().join("invalid_thing.mp3");
let mut tmp_file = File::create(&valid_path).unwrap();
writeln!(tmp_file, "Foooo").unwrap();
// Setup episodes
let n1 = NewEpisodeBuilder::default()
.title("foo_bar".to_string())
.podcast_id(0)
.build()
.unwrap()
.to_episode()
.unwrap();
let n2 = NewEpisodeBuilder::default()
.title("bar_baz".to_string())
.podcast_id(1)
.build()
.unwrap()
.to_episode()
.unwrap();
let mut ep1 = dbqueries::get_episode_from_pk(n1.title(), n1.podcast_id()).unwrap();
let mut ep2 = dbqueries::get_episode_from_pk(n2.title(), n2.podcast_id()).unwrap();
ep1.set_local_uri(Some(valid_path.to_str().unwrap()));
ep2.set_local_uri(Some(bad_path.to_str().unwrap()));
ep1.save().unwrap();
ep2.save().unwrap();
tmp_dir
}
#[test]
fn test_download_checker() {
let tmp_dir = helper_db();
download_checker().unwrap();
let episodes = dbqueries::get_downloaded_episodes().unwrap();
let valid_path = tmp_dir.path().join("virtual_dl.mp3");
assert_eq!(episodes.len(), 1);
assert_eq!(
Some(valid_path.to_str().unwrap()),
episodes.first().unwrap().local_uri()
);
let _tmp_dir = helper_db();
download_checker().unwrap();
let episode = dbqueries::get_episode_from_pk("bar_baz", 1).unwrap();
assert!(episode.local_uri().is_none());
}
#[test]
fn test_download_cleaner() {
let _tmp_dir = helper_db();
let mut episode: EpisodeCleanerQuery =
dbqueries::get_episode_from_pk("foo_bar", 0).unwrap().into();
let valid_path = episode.local_uri().unwrap().to_owned();
delete_local_content(&mut episode).unwrap();
assert_eq!(Path::new(&valid_path).exists(), false);
}
#[test]
fn test_played_cleaner_expired() {
let _tmp_dir = helper_db();
let mut episode = dbqueries::get_episode_from_pk("foo_bar", 0).unwrap();
let now_utc = Utc::now().timestamp() as i32;
// let limit = now_utc - 172_800;
let epoch = now_utc - 200_000;
episode.set_played(Some(epoch));
episode.save().unwrap();
let valid_path = episode.local_uri().unwrap().to_owned();
// This should delete the file
played_cleaner().unwrap();
assert_eq!(Path::new(&valid_path).exists(), false);
}
#[test]
fn test_played_cleaner_none() {
let _tmp_dir = helper_db();
let mut episode = dbqueries::get_episode_from_pk("foo_bar", 0).unwrap();
let now_utc = Utc::now().timestamp() as i32;
// limit = 172_800;
let epoch = now_utc - 20_000;
episode.set_played(Some(epoch));
episode.save().unwrap();
let valid_path = episode.local_uri().unwrap().to_owned();
// This should not delete the file
played_cleaner().unwrap();
assert_eq!(Path::new(&valid_path).exists(), true);
}
#[test]
fn test_url_cleaner() {
let good_url = "http://traffic.megaphone.fm/FL8608731318.mp3";
let bad_url = "http://traffic.megaphone.fm/FL8608731318.mp3?updated=1484685184";
assert_eq!(url_cleaner(bad_url), good_url);
assert_eq!(url_cleaner(good_url), good_url);
assert_eq!(url_cleaner(&format!(" {}\t\n", bad_url)), good_url);
}
#[test]
fn test_whitespace() {
let bad_txt = "1 2 3 4 5";
let valid_txt = "1 2 3 4 5";
assert_eq!(replace_extra_spaces(&bad_txt), valid_txt);
let bad_txt = "1 2 3 \n 4 5\n";
let valid_txt = "1 2 3\n4 5";
assert_eq!(replace_extra_spaces(&bad_txt), valid_txt);
let bad_txt = "1 2 3 \n\n\n \n 4 5\n";
let valid_txt = "1 2 3\n4 5";
assert_eq!(replace_extra_spaces(&bad_txt), valid_txt);
}
#[test]
fn test_get_dl_folder() {
let foo_ = format!("{}/{}", DL_DIR.to_str().unwrap(), "foo");
assert_eq!(get_download_folder("foo").unwrap(), foo_);
let _ = fs::remove_dir_all(foo_);
}
}
File diff suppressed because it is too large Load Diff
@@ -7,6 +7,11 @@
<language>en</language>
<copyright>First Look Media Works, Inc.</copyright>
<description>The people behind The Intercepts fearless reporting and incisive commentary—Jeremy Scahill, Glenn Greenwald, Betsy Reed and others—discuss the crucial issues of our time: national security, civil liberties, foreign policy, and criminal justice. Plus interviews with artists, thinkers, and newsmakers who challenge our preconceptions about the world we live in.</description>
<image>
<url>http://static.megaphone.fm/podcasts/d5735a50-d904-11e6-8532-73c7de466ea6/image/uploads_2F1484252190700-qhn5krasklbce3dh-a797539282700ea0298a3a26f7e49b0b_2FIntercepted_COVER%2B_281_29.png</url>
<title>Intercepted with Jeremy Scahill</title>
<link>https://theintercept.com/podcasts</link>
</image>
<itunes:explicit>no</itunes:explicit>
<itunes:type>episodic</itunes:type>
<itunes:subtitle>The people behind The Intercepts fearless reporting and incisive commentary discuss the crucial issues of our time.</itunes:subtitle>
@@ -20,6 +25,230 @@
<itunes:category text="News &amp; Politics">
</itunes:category>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/InterceptedWithJeremyScahill" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="interceptedwithjeremyscahill" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
<title>White Mirror</title>
<description>Jeremy lays out the bloody US history in Haiti and El Salvador and blasts the bipartisan, selective amnesia and historical revisionism that “American exceptionalism” demands. Rep. Tulsi Gabbard discusses U.S. regime change, North Korea and why Bernie Sanders would have defeated Trump. As Robert Mueller hits Bannon with a Grand Jury subpoena, former CIA operative and&amp;nbsp; Cipher Brief columnist John Sipher and journalist Marcy Wheeler of Emptywheel analyze the Russia investigation and the Steele dossier. Leading Marxist scholar David Harvey talks about debt peonage in the age of Trump and the crimes of capitalism.</description>
<pubDate>Wed, 17 Jan 2018 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>White Mirror</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump is a racist and the perfect man to represent Americas racist legacy in the countries he called shitholes. </itunes:subtitle>
<itunes:summary>
<![CDATA[Jeremy lays out the bloody US history in Haiti and El Salvador and blasts the bipartisan, selective amnesia and historical revisionism that “American exceptionalism” demands. Rep. Tulsi Gabbard discusses U.S. regime change, North Korea and why Bernie Sanders would have defeated Trump. As Robert Mueller hits Bannon with a Grand Jury subpoena, former CIA operative and&nbsp; Cipher Brief columnist John Sipher and journalist Marcy Wheeler of Emptywheel analyze the Russia investigation and the Steele dossier. Leading Marxist scholar David Harvey talks about debt peonage in the age of Trump and the crimes of capitalism.]]>
</itunes:summary>
<itunes:duration>6409</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[3660ad94-fb38-11e7-847d-436a066985fa]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY1407171456.mp3?updated=1516180736" length="102550465" type="audio/mpeg" />
</item>
<item>
<title>BONUS: All The News Unfit to Print</title>
<description>James Risen is a legend in the world of investigative and national security journalism. As a reporter for the New York Times, Risen broke some of the most important stories of the post 9/11 era, from the warrantless surveillance against Americans conducted under the Bush-Cheney administration, to black prison sites run by the CIA, to failed covert actions in Iran. Risen has won the Pulitzer and other major journalism awards. But perhaps what he is now most famous for is fighting a battle under both the Bush and Obama administrations as they demanded — under threat of imprisonment —the name of one of Risens alleged confidential sources. But it isnt just the government that Risen had to fight. He also battled his own editors and other powerful figures at the New York Times. Risen is now a senior national security correspondent at The Intercept where his incredible inside story has now been published. We talk with Risen about his career at the New York Times in a special edition of Intercepted.</description>
<pubDate>Wed, 03 Jan 2018 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>BONUS: All The News Unfit to Print</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>James Risen on His Battles with Bush, Obama, and the New York Times</itunes:subtitle>
<itunes:summary>
<![CDATA[James Risen is a legend in the world of investigative and national security journalism. As a reporter for the New York Times, Risen broke some of the most important stories of the post 9/11 era, from the warrantless surveillance against Americans conducted under the Bush-Cheney administration, to black prison sites run by the CIA, to failed covert actions in Iran. Risen has won the Pulitzer and other major journalism awards. But perhaps what he is now most famous for is fighting a battle under both the Bush and Obama administrations as they demanded — under threat of imprisonment —the name of one of Risens alleged confidential sources. But it isnt just the government that Risen had to fight. He also battled his own editors and other powerful figures at the New York Times. Risen is now a senior national security correspondent at The Intercept where his incredible inside story has now been published. We talk with Risen about his career at the New York Times in a special edition of Intercepted.]]>
</itunes:summary>
<itunes:duration>3805</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[6bdd6660-f039-11e7-acba-33ffde0bb3cc]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY1217453507.mp3" length="60884950" type="audio/mpeg" />
</item>
<item>
<title>Full Metal Jackass</title>
<description>Former Nixon White House counsel John Dean talks about the Mueller investigation, how the CIA may benefit from Trumps presidency and how Trump stacks up to Nixon and Reagan. Pentagon Papers whistleblower Daniel Ellsberg talks about the classified secrets he has kept for decades. He has just published his story in a new book, The Doomsday Machine. Field of Vision takes us inside the very strange world of Steve Bannons films. Patterson Hood of the band Drive-By Truckers performs.</description>
<pubDate>Wed, 13 Dec 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Full Metal Jackass</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Former Nixon Lawyer John Dean and Daniel Ellsberg Analyze the Trump Moment</itunes:subtitle>
<itunes:summary>
<![CDATA[Former Nixon White House counsel John Dean talks about the Mueller investigation, how the CIA may benefit from Trumps presidency and how Trump stacks up to Nixon and Reagan. Pentagon Papers whistleblower Daniel Ellsberg talks about the classified secrets he has kept for decades. He has just published his story in a new book, The Doomsday Machine. Field of Vision takes us inside the very strange world of Steve Bannons films. Patterson Hood of the band Drive-By Truckers performs.]]>
</itunes:summary>
<itunes:duration>5670</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bb062002-9d9f-11e7-b8c4-9701f8d8d38e]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY9016904056.mp3" length="90720966" type="audio/mpeg" />
</item>
<item>
<title>Who's Afraid of the Alt-Deep State?</title>
<description>Matthew Cole joins Jeremy for a discussion about their explosive report in The Intercept that Blackwater founder Erik Prince has been pitching a private spy operation to the White House and CIA. Activist and comedian Randy Credico, who has been hit with a subpoena from the House Intelligence Committee investigating Trump and Russia, joins us.&amp;nbsp; Journalist Barrett Brown talks about the FBIs campaign against him and offers a critique of Wikileaks. Singer Amanda Palmer talks about her provocative new video for a cover she did of Pink Floyds “Mother."</description>
<pubDate>Wed, 06 Dec 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Who's Afraid of the Alt-Deep State?</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump wants to make 1980s Reagan-era covert wars great again.</itunes:subtitle>
<itunes:summary>
<![CDATA[Matthew Cole joins Jeremy for a discussion about their explosive report in The Intercept that Blackwater founder Erik Prince has been pitching a private spy operation to the White House and CIA. Activist and comedian Randy Credico, who has been hit with a subpoena from the House Intelligence Committee investigating Trump and Russia, joins us.&nbsp; Journalist Barrett Brown talks about the FBIs campaign against him and offers a critique of Wikileaks. Singer Amanda Palmer talks about her provocative new video for a cover she did of Pink Floyds “Mother."]]>
</itunes:summary>
<itunes:duration>6260</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bafb58fc-9d9f-11e7-b8c4-070c14a1debb]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY9210981870.mp3" length="100160574" type="audio/mpeg" />
</item>
<item>
<title>Very Bad Men</title>
<description>This week on Intercepted: Sen. Chris Murphy blasts the US government for its role in the destruction of Yemen. Jeremy tears apart Thomas Friedmans gross love letter to the Saudi Crown Prince and talks about the bi-partisan war against journalism from Bill Clinton to Donald Trump. The Intercepts Betsy Reed and Buzzfeeds Katie Baker analyze this unprecedented public fight against sexual assaulters. Analysis from Harare, Zimbabwe on the ouster of Robert Mugabe. Comedian Joe Para performs a dramatic reenactment of a secret Snowden document.</description>
<pubDate>Wed, 29 Nov 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Very Bad Men</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Trump, the Saudi Crown Prince, Sexual Assaulters, and Robert Mugabe</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted: Sen. Chris Murphy blasts the US government for its role in the destruction of Yemen. Jeremy tears apart Thomas Friedmans gross love letter to the Saudi Crown Prince and talks about the bi-partisan war against journalism from Bill Clinton to Donald Trump. The Intercepts Betsy Reed and Buzzfeeds Katie Baker analyze this unprecedented public fight against sexual assaulters. Analysis from Harare, Zimbabwe on the ouster of Robert Mugabe. Comedian Joe Para performs a dramatic reenactment of a secret Snowden document.]]>
</itunes:summary>
<itunes:duration>5565</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[baf3e644-9d9f-11e7-b8c4-9f5a004c8b47]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY5979450332.mp3?updated=1511943682" length="89042024" type="audio/mpeg" />
</item>
<item>
<title>The Distraction in Chief</title>
<description>This week on Intercepted: Rami Khouri breaks down the Saudi agenda in the Middle East, its destruction of Yemen and the bizarre case of the exiled Lebanese prime minister. Aram Roston of Buzzfeed, Spencer Ackerman of the Daily Beast, and The Intercepts Matthew Cole join Jeremy for a discussion on the mysterious death of a Green Beret in Mali and why the CIA and US military are quite content with the Trump presidency. Wikileaks slid into Donald Trump Jr.s DMs. Intercept co-founder Glenn Greenwald analyzes what the messages say and how the media covered the story. And we talk to two newly elected Democrats in Virginia: Lee Carter and Elizabeth Guzman. Donald Trump stars in American Beauty.</description>
<pubDate>Wed, 15 Nov 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>The Distraction in Chief</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>While the media overwhelmingly focuses on Trump and Russia, Yemen is dying, covert ops are spreading and war is raging.</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted: Rami Khouri breaks down the Saudi agenda in the Middle East, its destruction of Yemen and the bizarre case of the exiled Lebanese prime minister. Aram Roston of Buzzfeed, Spencer Ackerman of the Daily Beast, and The Intercepts Matthew Cole join Jeremy for a discussion on the mysterious death of a Green Beret in Mali and why the CIA and US military are quite content with the Trump presidency. Wikileaks slid into Donald Trump Jr.s DMs. Intercept co-founder Glenn Greenwald analyzes what the messages say and how the media covered the story. And we talk to two newly elected Democrats in Virginia: Lee Carter and Elizabeth Guzman. Donald Trump stars in American Beauty.]]>
</itunes:summary>
<itunes:duration>5716</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[baec6cf2-9d9f-11e7-b8c4-832adc6b044a]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY5077597385.mp3" length="91468695" type="audio/mpeg" />
</item>
<item>
<title>Say Hello to My Little Hands</title>
<description>This week on Intercepted: Rep. Ro Khanna calls for a complete end to all U.S. military assistance to Saudi Arabia and the&amp;nbsp; catastrophe in Yemen. The former chief prosecutor at Guantanamo, Col. Morris Davis, blasts Trump over his interference in the case of Army Sergeant Bowe Bergdahl and the recent terror attack in New York. And as the Paradise Papers rock the world of the rich who use offshore banks and law firms, we get analysis from Nomi Prins.</description>
<pubDate>Wed, 08 Nov 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Say Hello to My Little Hands</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>True (War) Crimes of the Rich and Infamous</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted: Rep. Ro Khanna calls for a complete end to all U.S. military assistance to Saudi Arabia and the&nbsp; catastrophe in Yemen. The former chief prosecutor at Guantanamo, Col. Morris Davis, blasts Trump over his interference in the case of Army Sergeant Bowe Bergdahl and the recent terror attack in New York. And as the Paradise Papers rock the world of the rich who use offshore banks and law firms, we get analysis from Nomi Prins.]]>
</itunes:summary>
<itunes:duration>5476</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bae4af26-9d9f-11e7-b8c4-d7bd1cbbac44]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY3384065210.mp3" length="87615947" type="audio/mpeg" />
</item>
<item>
<title>Criminal Indictments at Home, Secret Wars Abroad</title>
<description>This week on Intercepted: New York Times reporter Charlie Savage and former federal prosecutor Ken White of Popehat break down the recent indictment and plea deal and what it may mean for Trump. Investigative journalist Nick Turse and Kenya scholar Samar Al-Bulushi take us into the world of US militarism in Africa: secret drone bases, US commandos and Washington-backed African forces operating under the guise of the “war on terror.” Musician Roberto Lange of Helado Negro performs.</description>
<pubDate>Wed, 01 Nov 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Criminal Indictments at Home, Secret Wars Abroad</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Robert Muellers investigation intensifies as Trump grants the CIA and military new kill powers.</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted: New York Times reporter Charlie Savage and former federal prosecutor Ken White of Popehat break down the recent indictment and plea deal and what it may mean for Trump. Investigative journalist Nick Turse and Kenya scholar Samar Al-Bulushi take us into the world of US militarism in Africa: secret drone bases, US commandos and Washington-backed African forces operating under the guise of the “war on terror.” Musician Roberto Lange of Helado Negro performs.]]>
</itunes:summary>
<itunes:duration>4504</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[badd1b62-9d9f-11e7-b8c4-bb0a3510ea9d]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY9002073032.mp3" length="72073299" type="audio/mpeg" />
</item>
<item>
<title>Mike Pence is The Koch Brothers' Manchurian Candidate</title>
<description>This week on Intercepted: Investigative journalist Jane Mayer exposes the Koch Brother puppet masters behind Vice President Mike Pences rise to power and the ruthless pursuit of corporate profits that put Pence a heartbeat from the presidency.We speak to Chinese dissident and renown artist Ai Weiwei about the humanitarian catastrophe of the 65 million globally displaced migrants and his new documentary, Human Flow. And we end with Deerhoof's Greg Saunier on the songs of “Mountain Moves.”</description>
<pubDate>Wed, 25 Oct 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Mike Pence is The Koch Brothers' Manchurian Candidate</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>The ruthless pursuit of corporate profits is a heartbeat from the presidency.</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted: Investigative journalist Jane Mayer exposes the Koch Brother puppet masters behind Vice President Mike Pences rise to power and the ruthless pursuit of corporate profits that put Pence a heartbeat from the presidency.We speak to Chinese dissident and renown artist Ai Weiwei about the humanitarian catastrophe of the 65 million globally displaced migrants and his new documentary, Human Flow. And we end with Deerhoof's Greg Saunier on the songs of “Mountain Moves.”]]>
</itunes:summary>
<itunes:duration>4458</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bad56944-9d9f-11e7-b8c4-036f3898314a]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY6525793662.mp3?updated=1508912939" length="71329332" type="audio/mpeg" />
</item>
<item>
<title>Canada is Racist Too</title>
<description>This week on Intercepted live from Toronto: A recent poll puts activist Desmond Cole in prime position to win the mayorship. We talk to him about Canadas stop and frisk and how Cole would change Toronto. Journalist Naomi Klein warns that the Trudeau and Trump brands may have more in common than expected. And returning Iraqi-Canadian hip-hop artist Narcy gives a powerful live performance.&lt;br&gt;&lt;br&gt;Become a sustaining member! Go to &lt;a href="https://theintercept.com/join"&gt;theintercept.com/join&lt;/a&gt; for more.</description>
<pubDate>Wed, 18 Oct 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Canada is Racist Too</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Could a young, radical black activist be the next mayor of Toronto?</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted live from Toronto: A recent poll puts activist Desmond Cole in prime position to win the mayorship. We talk to him about Canadas stop and frisk and how Cole would change Toronto. Journalist Naomi Klein warns that the Trudeau and Trump brands may have more in common than expected. And returning Iraqi-Canadian hip-hop artist Narcy gives a powerful live performance.<br><br>Become a sustaining member! Go to <a href="https://theintercept.com/join">theintercept.com/join</a> for more.]]>
</itunes:summary>
<itunes:duration>4613</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bacdc1bc-9d9f-11e7-b8c4-bf06486207e8]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY1212140419.mp3" length="73809084" type="audio/mpeg" />
</item>
<item>
<title>The White Stuff</title>
<description>Trump sent Mike Pence on a mission to protest black protesters at an NFL game. Acclaimed author and journalist Ta-Nehisi Coates talks about Trump, Obama, Bernie Sanders, Hillary Clinton, the NFL and much more. Mehrsa Baradaran breaks down the roots of economic apartheid in the US, the ongoing impact of slavery on black communities and offers a provocative history of black banks. And the lead singer of Mashrou Leila, Hamed Sinno, talks about being queer and Arab in the Middle East and Trumps America.</description>
<pubDate>Wed, 11 Oct 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>The White Stuff</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Ta-Nehisi Coates talks about Trump, Obama, Bernie Sanders, Hillary Clinton, the NFL and much more.</itunes:subtitle>
<itunes:summary>
<![CDATA[Trump sent Mike Pence on a mission to protest black protesters at an NFL game. Acclaimed author and journalist Ta-Nehisi Coates talks about Trump, Obama, Bernie Sanders, Hillary Clinton, the NFL and much more. Mehrsa Baradaran breaks down the roots of economic apartheid in the US, the ongoing impact of slavery on black communities and offers a provocative history of black banks. And the lead singer of Mashrou Leila, Hamed Sinno, talks about being queer and Arab in the Middle East and Trumps America.]]>
</itunes:summary>
<itunes:duration>5664</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bac62452-9d9f-11e7-b8c4-17ec33943c11]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY7057322394.mp3?updated=1507702418" length="90635702" type="audio/mpeg" />
</item>
<item>
<title>Guns Before Country</title>
<description>This week, Jeremy talks about the Coalition of the Killing — gun lobbyists, politicians and weapons manufacturers — the only beneficiaries of the massacre in Las Vegas. Alynda Segarra of the band Hurray for the Riff Raff explores her Puerto Rican roots and performs new songs. Former US Army Ranger Rory Fanning talks about his slain comrade, NFL star-turned soldier Pat Tillman. Historian Jeanne Theoharis shreds the sanitizing of the legacies of Martin Luther King Jr. and Rosa Parks. And Donald Trump takes his love of guns into the Twilight Zone.&lt;br&gt;&lt;br&gt;Support our show — become a member!&amp;nbsp; &lt;a href="http://theintercept.com/join"&gt;theintercept.com/join&lt;/a&gt;&lt;br&gt;&lt;br&gt;Panoply's podcast listener survey: &lt;a href="http://survey.panoply.fm"&gt;survey.panoply.fm&lt;/a&gt;</description>
<pubDate>Wed, 04 Oct 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Guns Before Country</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Lobbyists, politicians and weapons manufacturers are the only beneficiaries of the massacre in Las Vegas. </itunes:subtitle>
<itunes:summary>
<![CDATA[This week, Jeremy talks about the Coalition of the Killing — gun lobbyists, politicians and weapons manufacturers — the only beneficiaries of the massacre in Las Vegas. Alynda Segarra of the band Hurray for the Riff Raff explores her Puerto Rican roots and performs new songs. Former US Army Ranger Rory Fanning talks about his slain comrade, NFL star-turned soldier Pat Tillman. Historian Jeanne Theoharis shreds the sanitizing of the legacies of Martin Luther King Jr. and Rosa Parks. And Donald Trump takes his love of guns into the Twilight Zone.<br><br>Support our show — become a member!&nbsp; <a href="http://theintercept.com/join">theintercept.com/join</a><br><br>Panoply's podcast listener survey: <a href="http://survey.panoply.fm">survey.panoply.fm</a>]]>
</itunes:summary>
<itunes:duration>4763</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[babd79c4-9d9f-11e7-b8c4-bfa2bf7b2870]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY1463981678.mp3" length="76216529" type="audio/mpeg" />
</item>
<item>
<title>For Whom the Trump Trolls</title>
<description>This week on Intercepted, physicist David Wright from the Union of Concerned Scientists explains how easy it would be for Trump to launch a nuclear strike. Professor James Fernandez of NYU talks about the Abraham Lincoln Brigade, the 3,000 Americans who tried to stop fascism before it spread in Europe. We speak with the directors of a haunting new film about a terror attack in an Israeli bus station that leads to the brutal mob killing of an innocent Eritrean immigrant. And Donald Trump gets a visit from the two Bobs in his Office Space.</description>
<pubDate>Wed, 27 Sep 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>For Whom the Trump Trolls</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>What the Abraham Lincoln Brigade can teach us about fighting fascism in the 21st century.</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted, physicist David Wright from the Union of Concerned Scientists explains how easy it would be for Trump to launch a nuclear strike. Professor James Fernandez of NYU talks about the Abraham Lincoln Brigade, the 3,000 Americans who tried to stop fascism before it spread in Europe. We speak with the directors of a haunting new film about a terror attack in an Israeli bus station that leads to the brutal mob killing of an innocent Eritrean immigrant. And Donald Trump gets a visit from the two Bobs in his Office Space.]]>
</itunes:summary>
<itunes:duration>4754</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bab3035e-9d9f-11e7-b8c4-a723efdad05b]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY7212168126.mp3?updated=1506529903" length="76071497" type="audio/mpeg" />
</item>
<item>
<title>'Merican Psycho</title>
<description>Jeremy analyzes Trumps belligerent UN speech and the massive military budget the Democrats just gave him. Journalist Gary Rivlin takes us deep inside the world of the Goldman Sachs executives now working for Trump. Poet Aja Monet performs. The Intercepts Alice Speri investigates the militarization of police and how Israel is training American cops. Plus, Donald Trump stars in American Psycho.</description>
<pubDate>Wed, 20 Sep 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>'Merican Psycho</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump visits the UN and returns some videotapes.</itunes:subtitle>
<itunes:summary>
<![CDATA[Jeremy analyzes Trumps belligerent UN speech and the massive military budget the Democrats just gave him. Journalist Gary Rivlin takes us deep inside the world of the Goldman Sachs executives now working for Trump. Poet Aja Monet performs. The Intercepts Alice Speri investigates the militarization of police and how Israel is training American cops. Plus, Donald Trump stars in American Psycho.]]>
</itunes:summary>
<itunes:duration>4370</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[baa7cb06-9d9f-11e7-b8c4-d7ae2711974f]]></guid>
<enclosure url="http://traffic.megaphone.fm/PPY8078356160.mp3" length="69924570" type="audio/mpeg" />
</item>
<item>
<title>The Super Bowl of Racism</title>
<description>NSA whistleblower Edward Snowden discusses the massive Equifax data breach and allegations of Russian interference in the US election. Commentator Shaun King explains his call for a boycott of the NFL and talks about his campaign to bring violent neo-Nazis to justice. Rapper Open Mike Eagle performs.</description>
<pubDate>Wed, 13 Sep 2017 10:00:00 -0000</pubDate>
@@ -45,7 +274,7 @@
<itunes:summary>
<![CDATA[This week on Intercepted: Jeremy gives an update on the aftermath of Blackwaters 2007 massacre of Iraqi civilians. Intercept reporter Lee Fang lays out how a network of libertarian think tanks called the Atlas Network is insidiously shaping political infrastructure in Latin America. We speak with attorney and former Hugo Chavez adviser Eva Golinger about the Venezuela's political turmoil.And we hear Claudia Lizardo of the Caracas-based band, La Pequeña Revancha, talk about her music and hopes for Venezuela.]]>
</itunes:summary>
<itunes:duration>4220</itunes:duration>
<itunes:duration>4415</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[7c207a24-e33f-11e6-9438-eb45dcf36a1d]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL5331443769.mp3" length="67527575" type="audio/mpeg" />
@@ -60,7 +289,7 @@
<itunes:summary>
<![CDATA[News from the White House this week has been like a twisted mash up of Here Comes Honey Boo Boo, Macbeth, Project Runway and a Mr. Bean movie. Dime-store Sopranos reject Anthony Scaramucci was fired after just 10 days as White House communications director. Reince Priebus is out as chief of staff, Gen. John Kelly is in. And with spiking tensions between the United States and North Korea, we reflect on the history of the region. Plus, The Intercepts Naomi Klein talks to U.K. Labour Party leader Jeremy Corbyn about the lessons the Democratic Party could learn from Corbyns unexpected electoral success.]]>
</itunes:summary>
<itunes:duration>3517</itunes:duration>
<itunes:duration>3712</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[5850753c-dcf9-11e6-a5a2-a7df163d0693]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL4502761802.mp3" length="56280711" type="audio/mpeg" />
@@ -75,7 +304,7 @@
<itunes:summary>
<![CDATA[With all the constant hype about Russia, youd think we were living in a new Cold War. This week on Intercepted: Glenn Greenwald fills in for Jeremy Scahill, and we take a deep dive into the origins and evolution of the Trump-Russia story. Fox News' Tucker Carlson and Glenn find something they can actually agree on (the Democratic establishments Russia hysteria), but diverge on Tuckers coverage of immigration and crime. Russian-American writer Masha Gessen explains how conspiracy thinking is a mirror of the leaders we put in power.]]>
</itunes:summary>
<itunes:duration>3370</itunes:duration>
<itunes:duration>3565</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[584711b8-dcf9-11e6-a5a2-d7a378461c40]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL8633314507.mp3" length="53935124" type="audio/mpeg" />
@@ -90,7 +319,7 @@
<itunes:summary>
<![CDATA[Donald Trump enjoyed playing fireman and asking where the fire is. Hint: all around you, Mr. President. This week on Intercepted: the famed rebel academic, Alfred McCoy, whose book on narcotrafficking the CIA tried to stop from being published, lays out his meticulously argued theory that the U.S. empire will fall by the year 2030. The Washington Posts media columnist, Margaret Sullivan, talks about Trump ratcheting up the war on whistleblowers and the existence of a free press.]]>
</itunes:summary>
<itunes:duration>3951</itunes:duration>
<itunes:duration>4146</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[583dc8f6-dcf9-11e6-a5a2-97233491f3c8]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL4964577496.mp3" length="63216744" type="audio/mpeg" />
@@ -105,7 +334,7 @@
<itunes:summary>
<![CDATA[This week on Intercepted: Don Jr. is in the shit throne over a secret meeting he had with a Russian lawyer. Could this be, as many in the media are claiming, the smoking gun of Russia collusion? Intercept co-founder Glenn Greenwald weighs in and debunks a forged NSA document sent to Rachel Maddow. Intercept reporters Alice Speri and Alleen Brown talk about the shadowy mercenary company TigerSwan. We also hear music from Victoria Ruiz of the punk band Downtown Boys.]]>
</itunes:summary>
<itunes:duration>3864</itunes:duration>
<itunes:duration>4059</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[5834b428-dcf9-11e6-a5a2-f7aca16eec6e]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL5169968320.mp3" length="61824940" type="audio/mpeg" />
@@ -120,7 +349,7 @@
<itunes:summary>
<![CDATA[President Trump said when it comes to health insurance, he would cover everyone. He lied. Meanwhile the Crown Prince of America, Jared Kushner, and Mohammed Bin Salman, Crown Prince of Saudi Arabia, play house with foreign policy. This week: Al Jazeeras Mehdi Hasan fills in for Jeremy Scahill. Intercept reporter Murtaza Hussain and journalist Rula Jebreal discuss the global consequences of the House of Trumps meddling in the Middle East. Historian Tom Holland joins Mehdi for a debate on the role of Islam within the Islamic State. Plus, actor Bill Camp reprises his role as the “SIGINT Philosopher.”]]>
</itunes:summary>
<itunes:duration>3402</itunes:duration>
<itunes:duration>3597</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[5825189c-dcf9-11e6-a5a2-3765693ebff5]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL5926659703.mp3" length="54443781" type="audio/mpeg" />
@@ -135,7 +364,7 @@
<itunes:summary>
<![CDATA[While all eyes in Washington remain focused on the Russia investigation, a Republican firm forgot to secure its invasive personal data on 198 million American voters. This week on Intercepted: We speak to radical librarian Alison Macrina of the Library Freedom Project about the fight against digital surveillance. Sam Biddle gives an update on attacks on U.S. voting systems. And, we speak with one of the rising stars of the “dirtbag left,” Felix Biederman of Chapo Trap House.]]>
</itunes:summary>
<itunes:duration>3345</itunes:duration>
<itunes:duration>3540</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[581dd44c-dcf9-11e6-a5a2-03edebf2031b]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL7980248897.mp3" length="53535555" type="audio/mpeg" />
@@ -150,7 +379,7 @@
<itunes:summary>
<![CDATA[Donald Trump has a great affinity for strongmen and for unquestioned loyalty of those who work for him. This week on Intercepted: Trumps besties in Saudi Arabia convinced him that Qatar is the premiere Arab nation sponsoring terrorism. Amnesty Internationals Sherine Tadros and al Jazeeras Mehdi Hasan analyze the hypocrisy-laden, bizarre crisis. Jeremy discusses the prosecution of an alleged NSA leaker. MSNBCs Chris Hayes talks Russia, Trump, the media and his new book A Colony in a Nation. DJ Spooky imagines a Trump-inspired mash-up of Dantes Inferno and Disco Inferno.]]>
</itunes:summary>
<itunes:duration>4151</itunes:duration>
<itunes:duration>4346</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[5815ed86-dcf9-11e6-a5a2-ab3d4ad4b944]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL2441335022.mp3?updated=1497422014" length="66430432" type="audio/mpeg" />
@@ -165,7 +394,7 @@
<itunes:summary>
<![CDATA[The Green Partys Jill Stein has been widely attacked by Democrats simply for running for president. Some blame her for Hillary Clintons loss. This week, Stein strikes back at her critics and reveals the story behind the infamous Moscow dinner where she was seated with Vladimir Putin and Gen. Michael Flynn. The Intercepts DC bureau chief Ryan Grim digs into the contents of a newly published top secret NSA document outlining alleged Russian cyberattacks against software companies that service U.S. elections. And singer-songwriter Damien Jurado performs.]]>
</itunes:summary>
<itunes:duration>3498</itunes:duration>
<itunes:duration>3693</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[580e21d2-dcf9-11e6-a5a2-53fae963a8d5]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL5889277506.mp3?updated=1496817965" length="55977273" type="audio/mpeg" />
@@ -180,7 +409,7 @@
<itunes:summary>
<![CDATA[This week, the scandal spotlight shines on Trumps influential (and strangely quiet) son-in-law. We talk to national security correspondent Spencer Ackerman of The Daily Beast about Jared Kushners alleged meetings with Russian officials to establish back channel communications. Organizer and scholar Mariame Kaba offers a peoples history of prisons in the US and the politicians—both Democrats and Republicans—who have made them what they are today. And we hear an incredible rendition of “The Partisan” from composers and musicians Leo Heiblum of Mexico and Tenzin Choegyal of Tibet.&nbsp;]]>
</itunes:summary>
<itunes:duration>3567</itunes:duration>
<itunes:duration>3762</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[5807254e-dcf9-11e6-a5a2-cb45327dca79]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL3830941587.mp3" length="57086537" type="audio/mpeg" />
@@ -195,7 +424,7 @@
<itunes:summary>
<![CDATA[This week, Donald Trump stood in a sea of tyrants and joined in a bizarre group petting of a glowing white orb. Professor Asad AbuKhalil dissects Trumps summit in Saudi Arabia and the role Trumps friends in the Middle East play in fueling such horrors as the attack on Manchester. The Intercepts new DC bureau chief, Ryan Grim, and national security reporter Matthew Cole discuss Gen. Michael Flynn and whether anyone in the Trump administration realizes how insane their boss is. And Steve Earle performs live.]]>
</itunes:summary>
<itunes:duration>4003</itunes:duration>
<itunes:duration>4198</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57ffd3e8-dcf9-11e6-a5a2-17ed73ff2f09]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL3575958410.mp3" length="64048065" type="audio/mpeg" />
@@ -210,7 +439,7 @@
<itunes:summary>
<![CDATA[Donald Trump is spectacularly bad at being president. This week on Intercepted, investigative journalist Marcy Wheeler and The Intercepts Glenn Greenwald analyze the latest insanity emanating from the White House. Pulitzer Prize-winning journalist Tim Weiner and Intercept writer Trevor Aaronson discuss the firing of James Comey and debate his FBI legacy. And Palestinian author and journalist Rula Jebreal explains why President Trump is going to Saudi Arabia and Israel on his first international trip.]]>
</itunes:summary>
<itunes:duration>3666</itunes:duration>
<itunes:duration>3861</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57f826de-dcf9-11e6-a5a2-ff41a0b1698e]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL3660243774.mp3" length="58666422" type="audio/mpeg" />
@@ -225,7 +454,7 @@
<itunes:summary>
<![CDATA[Donald Trumps complicated relationship with FBI Director James Comey came to a shocking conclusion in Tuesday nights episode of American shitshow. Glenn Greenwald analyzes Comeys firing. Next week, Chelsea Manning will be freed from prison. We hear exclusive audio from her trial and talk to journalist Alexa OBrien. And French civil liberties activist Yasser Louati says despite her defeat in the presidential election, many of Marine Le Pens ideas are already embedded in mainstream French politics. And a premiere track from hip-hop artists MC Sole and DJ Pain 1.]]>
</itunes:summary>
<itunes:duration>4002</itunes:duration>
<itunes:duration>4197</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57ef98d4-dcf9-11e6-a5a2-374c19bb24e7]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL5670631624.mp3" length="64045557" type="audio/mpeg" />
@@ -255,7 +484,7 @@
<itunes:summary>
<![CDATA[Wikileaks founder Julian Assange hits back at Trumps CIA director Mike Pompeo after Pompeo accused Wikileaks of being a “hostile non-state intelligence agency.” In a wide-ranging interview, Assange discusses the allegations Wikileaks was abetted by Russian intelligence in its publication of DNC emails, and the new-found admiration for him by FOX News and Donald Trump. Also, why Assange believes he and Hillary Clinton may get along if they ever met in person. And we premiere an unreleased song by Tom Morello of Rage Against the Machine.]]>
</itunes:summary>
<itunes:duration>3706</itunes:duration>
<itunes:duration>3901</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57e86f28-dcf9-11e6-a5a2-3f3b6bf611af]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL5660744294.mp3" length="59298377" type="audio/mpeg" />
@@ -270,7 +499,7 @@
<itunes:summary>
<![CDATA[Nothing brings warmongers, hawks and elites from both parties closer than a cruise missile strike. This weeks Intercepted will piss off Assad supporters and the Democrats and Republicans fawning over Trumps newest war. Former Congressman Dennis Kucinich questions the official story on the chemical weapons attack. Murtaza Hussain on what Assad gains by using chemical weapons. And, Maher Arar is a Syrian-born Canadian engineer who was kidnapped at JFK airport by US operatives after 9/11 and rendered to Syria and tortured by Assads agents. Arar says he opposes Assad and US intervention. All that and a bucket of media stupidity to celebrate beautiful missiles.]]>
</itunes:summary>
<itunes:duration>3569</itunes:duration>
<itunes:duration>3764</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57e131d6-dcf9-11e6-a5a2-efc4038c6546]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL8700626063.mp3" length="57118720" type="audio/mpeg" />
@@ -285,7 +514,7 @@
<itunes:summary>
<![CDATA[Erik Prince—the most infamous mercenary in modern U.S. history—is Trumps secret emissary. This week, an exclusive interview with Rep. Jan Schakowsky, who has fought a decades-long battle against Prince. Tavis Smiley talks about the “Santa Claus-ification” of Dr. Martin Luther King Jr. on the 50th anniversary of Kings militant speech against the Vietnam War. Rep. Barbara Lee reflects on her own historic anti-war speech, delivered three days after 9/11. And Vice President Pence, who cant be alone in a room with a woman who is not his wife, goes Psycho.<br><br><em>Please take a moment to fill out Panoply's survey about the shows you listen to, love, and what else you'd like to hear: </em><a href="http://survey.panoply.fm"><em>survey.panoply.fm</em></a><em>.&nbsp; Many thanks!</em>]]>
</itunes:summary>
<itunes:duration>3428</itunes:duration>
<itunes:duration>3623</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57da1dce-dcf9-11e6-a5a2-2fa5756ae4a7]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL7737191155.mp3?updated=1491374970" length="54858396" type="audio/mpeg" />
@@ -300,7 +529,7 @@
<itunes:summary>
<![CDATA[Donald Trump officially rejects climate change and unofficially declares war on planet Earth. Naomi Klein takes us on a terrifying journey into Trumps real life version of The Purge. Boots Riley of The Coup discusses Trump and hip hop and performs. Murtaza Hussain talks about the US bombings in Iraq and Syria that have killed 1,000 civilians in one month. And, we talk to the developer of an app that tracks US drone strikes that Apple has censored 13 times.]]>
</itunes:summary>
<itunes:duration>3317</itunes:duration>
<itunes:duration>3512</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57d2f170-dcf9-11e6-a5a2-5fc4825a8119]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL9529758061.mp3" length="53079980" type="audio/mpeg" />
@@ -315,7 +544,7 @@
<itunes:summary>
<![CDATA[Donald Trump has not started any new wars… yet. But his administration is pouring gasoline on several initiated by his predecessors. This week on Intercepted: US forces are deploying in Syria, as drone strikes expand in Yemen. And Russia and Iran loom over everything. We talk to veteran war correspondents Anand Gopal and Iona Craig. Glenn Greenwald analyzes James Comeys testimony on Capitol Hill and exposes a major lie spread about Edward Snowden. Actor William Camp “stars” in the real life story of the spy who became “the Socrates of the NSA.”]]>
</itunes:summary>
<itunes:duration>3488</itunes:duration>
<itunes:duration>3683</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57cc3f10-dcf9-11e6-a5a2-4fe59e09c4e9]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL9134059577.mp3" length="55811761" type="audio/mpeg" />
@@ -330,7 +559,7 @@
<itunes:summary>
<![CDATA[This week, Intercepted is live from the SXSW Festival in Austin. Edward Snowden joins us via video feed from Moscow. He discusses Trumps allegations of Obamas wiretapping, analyzes some of the CIAs hacking capabilities, and blasts critics who accuse him of being a Russian agent. And we talk to Libyan-American hip hop artist Kayem, who was forced to keep a low profile the past several years after multiple detentions and visits from the FBI. He shares some verses with Intercepted.]]>
</itunes:summary>
<itunes:duration>3136</itunes:duration>
<itunes:duration>3331</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57c55fa6-dcf9-11e6-a5a2-1f24485c4305]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL3645242256.mp3" length="50191046" type="audio/mpeg" />
@@ -345,7 +574,7 @@
<itunes:summary>
<![CDATA[The Notorious B.I.G. famously alleged that federal agents were mad because he was flagrant. Trump also believes he has beef with the Feds, accusing Obama of tapping his phones. The Intercepts Matthew Cole and journalist Marcy Wheeler dissect the accusations and the (curious) denials. Sam Biddle and Josh Begley explain what the CIA hacking docs published by Wikileaks say about our “smart” TVs and phones. Journalist Aura Bogado confronts Trumps assault on undocumented immigrants. Punk band Anti-Flag performs. Plus, Trump “stars” in a scene from Goodfellas. Can he get out of Mar-a-Lago alive?]]>
</itunes:summary>
<itunes:duration>3987</itunes:duration>
<itunes:duration>4182</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57be3b36-dcf9-11e6-a5a2-07d3f1f2cb5f]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL3152884319.mp3" length="63798125" type="audio/mpeg" />
@@ -360,7 +589,7 @@
<itunes:summary>
<![CDATA[Ex-CIA analyst Nada Bakos and former FBI agent Clint Watts explain how Trumps administration could use “alternative intelligence” to justify dangerous military actions. Shane Bauer of Mother Jones breaks down the connections between immigration raids and soaring private prison profits. Plus the world premiere of a song by the Iraqi-Canadian hip hop artist Narcy. We bet you never thought youd hear Steve Bannons name rapped in autotune.]]>
</itunes:summary>
<itunes:duration>4001</itunes:duration>
<itunes:duration>4196</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57b74678-dcf9-11e6-a5a2-4fbc5ae0d0cf]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL5707421213.mp3" length="64025913" type="audio/mpeg" />
@@ -375,7 +604,7 @@
<itunes:summary>
<![CDATA[New York Times investigative reporter James Risen breaks down Trumps declaration that journalists are the enemy and analyzes Trumps royal court. ACLU lawyer Chase Strangio and former New England Patriots star Donté Stallworth talk about the war on the transgender community and the rising resistance of pro athletes. Sam Biddle exposes the Trump-connected firm that helped the NSA spy on the world and actor Wallace Shawn stars as an NSA operative who is worried about adversaries spying on his luncheons. Plus music from Anohni.]]>
</itunes:summary>
<itunes:duration>4014</itunes:duration>
<itunes:duration>4209</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57b018d0-dcf9-11e6-a5a2-e736fa72fede]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL3910130795.mp3" length="64229877" type="audio/mpeg" />
@@ -390,7 +619,7 @@
<itunes:summary>
<![CDATA[The first contestant in Donald Trumps reality administration has left the West Wing. This week, Glenn Greenwald offers some provocative pushback on the Russia fear-mongering surrounding Gen. Michael Flynns resignation (or firing). Naomi Klein walks the dark aisles of the Trump family department store. Former Congresswoman Liz Holtzman, a key figure in the impeachment of Richard Nixon, explains how impeachment actually works. And Hina Shamsi of the ACLU recounts her interrogation at the border. Plus a performance from Jedi Mind Tricks.&nbsp;]]>
</itunes:summary>
<itunes:duration>3663</itunes:duration>
<itunes:duration>3858</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57a87fd0-dcf9-11e6-a5a2-af85a8453351]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL5616910839.mp3" length="58608326" type="audio/mpeg" />
@@ -405,7 +634,7 @@
<itunes:summary>
<![CDATA[This week, investigative reporter Allan Nairn breaks down Trump's relationship with the CIA and the killer assembly of neocons and right-wing conspiracists running the U.S. war machine. Princeton professor Keeanga Yamahtta-Taylor dismantles Obama's problematic legacy and offers strategic advice for resisting Trump. The Intercept's own distinguished alt-historian, Jon Schwarz, offers a lesson on the origins of presidential executive orders. And Kimya Dawson gives a raw performance of a new song about racism and the police state.]]>
</itunes:summary>
<itunes:duration>3557</itunes:duration>
<itunes:duration>3752</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57a133b0-dcf9-11e6-a5a2-9f64a29807d9]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL7005027452.mp3" length="56920189" type="audio/mpeg" />
@@ -420,7 +649,7 @@
<itunes:summary>
<![CDATA[Donald Trump is signing executive orders like autographed pictures. This week on Intercepted: Two former senior FBI agents blast the “Muslim ban” and Trumps campaign to make torture great again. Constitutional rights lawyers dissect the (il)legalities of Trumps orders. Rep. Barbara Lee confronts the president's terrifying approach to government.&nbsp; New secret documents reveal how Trump could resurrect J. Edgar Hoovers legacy. Brother Ali freestyles a verse, and Peter Sarsgaard stars in the bizarre true story of an NSA operative with vacation tips for deploying to Guantanamo.&nbsp;]]>
</itunes:summary>
<itunes:duration>3163</itunes:duration>
<itunes:duration>3358</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57996266-dcf9-11e6-a5a2-4ff22525cee4]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL4823102330.mp3?updated=1485937504" length="50611513" type="audio/mpeg" />
@@ -435,7 +664,7 @@
<itunes:summary>
<![CDATA[The clock struck thirteen on January 20, Donald Trump is the president of the United States and episode one of Intercepted is here. Intercept co-founder Glenn Greenwald and editor-in-chief Betsy Reed join Jeremy Scahill for a discussion on the crazy apocalyptic present. They break down Trumps attacks on the media, that insane speech he gave at the CIA and the state of the Democratic party. Naomi Klein sends in a dispatch from the Womens March on Washington. Jeremy goes deep into the secretive world of Seymour Hershs kitchen, and shoots the shit with the legendary Pulitzer Prize-winning journalist about why he calls Trump a “circuit breaker." And we hear a spoken word performance from hip-hop artist Immortal Technique.&nbsp;]]>
</itunes:summary>
<itunes:duration>3238</itunes:duration>
<itunes:duration>3433</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57913302-dcf9-11e6-a5a2-87c6a559fb64]]></guid>
<enclosure url="http://traffic.megaphone.fm/FL1844876464.mp3" length="51822341" type="audio/mpeg" />
@@ -7,8 +7,8 @@
<generator>Feeder 2.5.12(2294); Mac OS X Version 10.12.1 (Build 16B2657) http://reinventedsoftware.com/feeder/</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<language>en</language>
<pubDate>Tue, 12 Sep 2017 22:24:45 -0700</pubDate>
<lastBuildDate>Tue, 12 Sep 2017 22:24:45 -0700</lastBuildDate>
<pubDate>Tue, 16 Jan 2018 20:28:23 -0800</pubDate>
<lastBuildDate>Tue, 16 Jan 2018 20:28:23 -0800</lastBuildDate>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:image href="http://www.jupiterbroadcasting.com/images/LASUN-Badge1400.jpg" />
@@ -16,7 +16,340 @@
<itunes:block>no</itunes:block>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/linuxunplugged" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="linuxunplugged" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><media:copyright>Copyright Jupiter Broadcasting</media:copyright><media:thumbnail url="http://www.jupiterbroadcasting.com/images/LASUN-Badge1400.jpg" /><media:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</media:keywords><media:category scheme="http://www.itunes.com/dtds/podcast-1.0.dtd">Technology/Tech News</media:category><itunes:owner><itunes:email>chris@jupiterbroadcasting.com</itunes:email><itunes:name>Jupiter Broadcasting</itunes:name></itunes:owner><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords><itunes:subtitle>Linux Action Show, with no rules.</itunes:subtitle><itunes:summary>An open show powered by community LINUX Unplugged takes the best attributes of open collaboration and focuses them into a weekly lifestyle show about Linux.</itunes:summary><itunes:category text="Technology"><itunes:category text="Tech News" /></itunes:category><image><link>http://www.jupiterbroadcasting.com/show/linuxun/</link><url>http://michaeltunnell.com/images/linux-unplugged.jpg</url><title>LINUX Unplugged</title></image><item>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/linuxunplugged" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="linuxunplugged" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><media:copyright>Copyright Jupiter Broadcasting</media:copyright><media:thumbnail url="http://www.jupiterbroadcasting.com/images/LASUN-Badge1400.jpg" /><media:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</media:keywords><media:category scheme="http://www.itunes.com/dtds/podcast-1.0.dtd">Technology/Tech News</media:category><itunes:owner><itunes:email>chris@jupiterbroadcasting.com</itunes:email><itunes:name>Jupiter Broadcasting</itunes:name></itunes:owner><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords><itunes:subtitle>Linux Action Show, with no rules.</itunes:subtitle><itunes:summary>An open show powered by community LINUX Unplugged takes the best attributes of open collaboration and focuses them into a weekly lifestyle show about Linux.</itunes:summary><itunes:category text="Technology"><itunes:category text="Tech News" /></itunes:category><image><link>http://www.jupiterbroadcasting.com/show/linuxun/</link><url>http://www.jupiterbroadcasting.com/images/lupbadge.jpg</url><title>LINUX Unplugged</title></image><item>
<title>The Secret to Future Linux Success | LUP 232</title>
<link>http://www.jupiterbroadcasting.com/121542/the-secret-to-future-linux-success-lup-232/</link>
<description><![CDATA[<p>A big week of community updates, events & news, including great news for Plasma Desktop users, MATE users & Wayland fans.</p>
<p>Then Barton George from Dell joins us to discuss the new XPS 13s shipping Ubuntu, where Linux could see its next big success & more!</p>]]></description>
<pubDate>Tue, 16 Jan 2018 20:28:02 -0800</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0232.mp3" length="50481539" type="audio/mpeg" />
<guid isPermaLink="false">903D4C53-092B-4131-BA52-08DBCDE55E3E</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>A big week of community updates, events &amp; news, including great news for Plasma Desktop users, MATE users &amp; Wayland fans. Then Barton George from Dell joins us to discuss the new XPS 13s shipping Ubuntu, where Linux could see its next big success &amp; more!</itunes:subtitle>
<itunes:summary><![CDATA[A big week of community updates, events & news, including great news for Plasma Desktop users, MATE users & Wayland fans.
Then Barton George from Dell joins us to discuss the new XPS 13s shipping Ubuntu, where Linux could see its next big success & more!]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:43:53</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2018/01/lup-0232-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0232.mp3" fileSize="50481539" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Most Expensive Linux Distro Ever | LUP 231</title>
<link>http://www.jupiterbroadcasting.com/121257/most-expensive-linux-distro-ever-lup-231/</link>
<description><![CDATA[<p>We slay the Gentoo challenge monster & give you our first take of the most expensive Linux distro weve ever tried. What does nearly $100 of Linux get you? We find out!</p>
<p>Plus tons of community news, the perfect Linux workstation coming soon & more!</p>]]></description>
<pubDate>Tue, 09 Jan 2018 20:33:30 -0800</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0231.mp3" length="47946199" type="audio/mpeg" />
<guid isPermaLink="false">2B587F89-B71C-4B5C-8DFF-EFF1106E8B81</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>We slay the Gentoo challenge monster &amp; give you our first take of the most expensive Linux distro weve ever tried. What does nearly $100 of Linux get you? We find out!
Plus tons of community news, the perfect Linux workstation coming soon &amp; more!</itunes:subtitle>
<itunes:summary><![CDATA[We slay the Gentoo challenge monster & give you our first take of the most expensive Linux distro weve ever tried. What does nearly $100 of Linux get you? We find out!
Plus tons of community news, the perfect Linux workstation coming soon & more!]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:38:36</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2018/01/lup-0231-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0231.mp3" fileSize="47946199" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Invest In Popcorn | LUP 230</title>
<link>http://www.jupiterbroadcasting.com/121092/invest-in-popcorn-lup-230/</link>
<description><![CDATA[Wes & the Beard kick Chris out to share their top tips for starting 2018 out right, plus a holiday surprise from Linux Journal, a new device for Googles Fuchsia & an unfortunate new flaw in a processor near you.]]></description>
<pubDate>Tue, 02 Jan 2018 23:18:25 -0800</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0230.mp3" length="27993036" type="audio/mpeg" />
<guid isPermaLink="false">AFC10D98-612B-4C12-BB5C-06A09B09681C</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>Wes &amp; the Beard kick Chris out to share their top tips for starting 2018 out right, plus a holiday surprise from Linux Journal, a new device for Googles Fuchsia &amp; an unfortunate new flaw in a processor near you.</itunes:subtitle>
<itunes:summary><![CDATA[Wes & the Beard kick Chris out to share their top tips for starting 2018 out right, plus a holiday surprise from Linux Journal, a new device for Googles Fuchsia & an unfortunate new flaw in a processor near you.]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>57:02</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2018/01/lup-0230-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0230.mp3" fileSize="27993036" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Taste of Linux 2017 | LUP 229</title>
<link>http://www.jupiterbroadcasting.com/120922/taste-of-linux-2017-lup-229/</link>
<description><![CDATA[We break from the unformat of the show for a special holiday chat about the top moments in the world of Linux this year that impacted us the most.]]></description>
<pubDate>Tue, 26 Dec 2017 18:29:58 -0800</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0229.mp3" length="41841905" type="audio/mpeg" />
<guid isPermaLink="false">FE1EC5F7-9DCF-4365-B5A6-096FAE104908</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>We break from the unformat of the show for a special holiday chat about the top moments in the world of Linux this year that impacted us the most.</itunes:subtitle>
<itunes:summary><![CDATA[We break from the unformat of the show for a special holiday chat about the top moments in the world of Linux this year that impacted us the most.]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:25:53</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/12/lup-0229-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0229.mp3" fileSize="41841905" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>rm -rf 2017 | LUP 228</title>
<link>http://www.jupiterbroadcasting.com/120772/rm-rf-2017-lup-228/</link>
<description><![CDATA[<p>We debate the best distros of 2017, get into some community news, and a bcachefs and Gentoo challenge update & also learn a bit about Canonicals new Multipass project.</p>
<p>Plus a few Linux commands that are guaranteed to destroy your install.</p>]]></description>
<pubDate>Tue, 19 Dec 2017 20:04:09 -0800</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0228.mp3" length="37338604" type="audio/mpeg" />
<guid isPermaLink="false">083E11EA-D405-4C53-AB09-6C4FC13DDD81</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>We debate the best distros of 2017, get into some community news, and a bcachefs and Gentoo challenge update &amp; also learn a bit about Canonicals new Multipass project.
Plus a few Linux commands that are guaranteed to destroy your install.</itunes:subtitle>
<itunes:summary><![CDATA[We debate the best distros of 2017, get into some community news, and a bcachefs and Gentoo challenge update & also learn a bit about Canonicals new Multipass project.
Plus a few Linux commands that are guaranteed to destroy your install.]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:16:30</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/12/lup-0228-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0228.mp3" fileSize="37338604" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Peer Pressure | LUP 227</title>
<link>http://www.jupiterbroadcasting.com/120622/peer-pressure-lup-227/</link>
<description><![CDATA[<p>Its time to replace Patreon, YouTube, Twitter/Facebook & all the other centralized platforms of the web. But can open source answer the call? This week we look at a few projects that could replace todays information silos if Linux users just step up.</p>
<p>Plus community news, some big updates & a lot more!</p>]]></description>
<pubDate>Thu, 14 Dec 2017 01:31:44 -0800</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0227.mp3" length="45057056" type="audio/mpeg" />
<guid isPermaLink="false">0533598D-EDA5-4757-ACF0-12F3142C9713</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>Its time to replace Patreon, YouTube, Twitter/Facebook &amp; other centralized platforms of the web. But can open source answer the call? This week we look at a few projects that could replace todays information silos if Linux users just step up &amp; more!</itunes:subtitle>
<itunes:summary><![CDATA[Its time to replace Patreon, YouTube, Twitter/Facebook & all the other centralized platforms of the web. But can open source answer the call? This week we look at a few projects that could replace todays information silos if Linux users just step up.
Plus community news, some big updates & a lot more!]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:32:35</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/12/lup-0227-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0227.mp3" fileSize="45057056" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Bitcoin for Linux Users | LUP 226</title>
<link>http://www.jupiterbroadcasting.com/120447/bitcoin-for-linux-users-lup-226/</link>
<description><![CDATA[Why Bitcoin is the next Linux, the Gentoo Challenge is in full swing, and we catch you up on the latest community news, a throwback app pick & more!]]></description>
<pubDate>Tue, 05 Dec 2017 20:58:00 -0800</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0226.mp3" length="40776318" type="audio/mpeg" />
<guid isPermaLink="false">E457EE68-10F2-4AE7-929B-8C6F93342988</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>Why Bitcoin is the next Linux, the Gentoo Challenge is in full swing, and we catch you up on the latest community news, a throwback app pick &amp; more!</itunes:subtitle>
<itunes:summary><![CDATA[Why Bitcoin is the next Linux, the Gentoo Challenge is in full swing, and we catch you up on the latest community news, a throwback app pick & more!]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:23:40</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/12/lup-0226-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0226.mp3" fileSize="40776318" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Hacking the Community | LUP 225</title>
<link>http://www.jupiterbroadcasting.com/120287/hacking-the-community-lup-225/</link>
<description><![CDATA[<p>Red Hat, Amazon, Facebook, Google, IBM, and others come together to push common sense GPL enforcement & a whole batch of community news.</p>
<p>Plus we call out the Register, DRMs dirty little secret & how Linux users can make a difference.</p>]]></description>
<pubDate>Wed, 29 Nov 2017 00:17:08 -0800</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0225.mp3" length="48188615" type="audio/mpeg" />
<guid isPermaLink="false">30BE2BE8-E0B0-4DFD-A1D2-EAE0F4DA4BBB</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>Red Hat, Amazon, Facebook, Google, IBM, and others come together to push common sense GPL enforcement &amp; a whole batch of community news.
Plus we call out the Register, DRMs dirty little secret &amp; how Linux users can make a difference.</itunes:subtitle>
<itunes:summary><![CDATA[Red Hat, Amazon, Facebook, Google, IBM, and others come together to push common sense GPL enforcement & a whole batch of community news.
Plus we call out the Register, DRMs dirty little secret & how Linux users can make a difference.]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:39:07</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/11/lup-0225-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0225.mp3" fileSize="48188615" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>No Escape from Google | LUP 224</title>
<link>http://www.jupiterbroadcasting.com/120086/no-escape-from-google-lup-224/</link>
<description><![CDATA[<p>Google gets caught red handed, we find lots of goodies in the new Linux kernel & we have three great new app picks this week.</p>
<p>But the meat of the show is Lynis a tool to audit your Linux box, create reports & teach you how to better secure your system. </p>
<p>Plus we officially lay the groundwork for the Gentoo Challenge.</p>]]></description>
<pubDate>Wed, 22 Nov 2017 04:14:57 -0800</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0224.mp3" length="40944756" type="audio/mpeg" />
<guid isPermaLink="false">C2E924CC-9F00-468B-9D33-AF163FE2D58F</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>Google gets caught red handed and goodies in the new Linux kernel. But the meat of the show is Lynis a tool to audit your Linux box, create reports &amp; teach you how to better secure your system.
Plus the groundwork for the Gentoo Challenge &amp; more!</itunes:subtitle>
<itunes:summary><![CDATA[Google gets caught red handed, we find lots of goodies in the new Linux kernel & we have three great new app picks this week.
But the meat of the show is Lynis a tool to audit your Linux box, create reports & teach you how to better secure your system.
Plus we officially lay the groundwork for the Gentoo Challenge.]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:24:01</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/11/lup-0224-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0224.mp3" fileSize="40944756" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Fedoras New Trick | LUP 223</title>
<link>http://www.jupiterbroadcasting.com/119866/fedoras-new-trick-lup-223/</link>
<description><![CDATA[<p>A new version of Fedora hits the web and we share our thoughts & chat with a member of the project, Noah joins us to answer your live calls & were all excited about Firefoxs new quantum release.</p>
<p>Plus Gnome 4s ambitious goals, a new Linux Kernel that really matters, OpenShot woes & more!</p>]]></description>
<pubDate>Wed, 15 Nov 2017 02:37:23 -0800</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0223.mp3" length="53118235" type="audio/mpeg" />
<guid isPermaLink="false">205F5F07-AB94-4857-AE6D-6B3EB5C0E06C</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>A new version of Fedora hits the web and we share our thoughts &amp; chat with a member of the project, Noah joins us &amp; were all excited about Firefox quantum.
Plus Gnome 4s ambitious goals, a new Linux Kernel that really matters, OpenShot woes &amp; more!</itunes:subtitle>
<itunes:summary><![CDATA[A new version of Fedora hits the web and we share our thoughts & chat with a member of the project, Noah joins us to answer your live calls & were all excited about Firefoxs new quantum release.
Plus Gnome 4s ambitious goals, a new Linux Kernel that really matters, OpenShot woes & more!]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:49:23</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/11/lup-0223-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0223.mp3" fileSize="53118235" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>A Community Divided | LUP 222</title>
<link>http://www.jupiterbroadcasting.com/119691/a-community-divided-lup-222/</link>
<description><![CDATA[<p>Community news & app picks this week before we get into a bizarre story that could rip up parts of the open source community.</p>
<p>Plus Elementary OSs secret weapon to get more native apps, our tips for great High-DPI under Linux & some Enlightenment love.</p>]]></description>
<pubDate>Tue, 07 Nov 2017 18:46:56 -0800</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0222.mp3" length="38984109" type="audio/mpeg" />
<guid isPermaLink="false">A674FBEC-ABB5-430A-9775-41D036C0892C</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>Community news &amp; app picks this week before we get into a bizarre story that could rip up parts of the open source community.
Plus Elementary OSs secret weapon to get more native apps, our tips for great High-DPI under Linux &amp; some Enlightenment love.</itunes:subtitle>
<itunes:summary><![CDATA[Community news & app picks this week before we get into a bizarre story that could rip up parts of the open source community.
Plus Elementary OSs secret weapon to get more native apps, our tips for great High-DPI under Linux & some Enlightenment love.]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:19:56</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/11/lup-0222-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0222.mp3" fileSize="38984109" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Ubuntu A-Team | LUP 221</title>
<link>http://www.jupiterbroadcasting.com/119561/ubuntu-a-team-lup-221/</link>
<description><![CDATA[<p>Two of Ubuntus top contributors join us to chat a bit about the 17.10 release, working upstream with Gnome, the future of SNAPS in Ubuntu & goals for 18.04.</p>
<p>Plus the public beating Kodi is taking for an open source problem, Flatpak gets mature & the Linux Foundation is working on open source AI.</p>
<p>Then we share some recent distro reload anecdote & a bunch of community news.</p>]]></description>
<pubDate>Tue, 31 Oct 2017 22:49:44 -0700</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0221.mp3" length="45289441" type="audio/mpeg" />
<guid isPermaLink="false">B9C6A656-AB81-4B27-9175-FC0AC4DCCEB7</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>Two of Ubuntus top contributors join us to chat about the 17.10 release, working upstream with Gnome, the future of SNAPS in Ubuntu &amp; goals for 18.04. Plus Flatpak gets mature &amp; the Linux Foundation is working on open source AI, Kodi problems &amp; more!</itunes:subtitle>
<itunes:summary><![CDATA[Two of Ubuntus top contributors join us to chat a bit about the 17.10 release, working upstream with Gnome, the future of SNAPS in Ubuntu & goals for 18.04.
Plus the public beating Kodi is taking for an open source problem, Flatpak gets mature & the Linux Foundation is working on open source AI.
Then we share some recent distro reload anecdote & a bunch of community news.
]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:33:04</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/10/lup-0221-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0221.mp3" fileSize="45289441" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Remotely Useful | LUP 220</title>
<link>http://www.jupiterbroadcasting.com/119371/remotely-useful-lup-220/</link>
<description><![CDATA[<p>An easy solution to get high performance remote Linux desktop up and going, some tips on how to interact with an open source project or community & looking back at some of Fedoras recent accomplishments.</p>
<p>Plus Canonical is on the path to an IPO, pirates embrace Flatpack & more!</p>]]></description>
<pubDate>Tue, 24 Oct 2017 21:16:27 -0700</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0220.mp3" length="46051172" type="audio/mpeg" />
<guid isPermaLink="false">160CF186-CCBE-47E1-A613-6121EB28B005</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>An easy solution to get high performance remote Linux desktop, how to interact with an open source project or community &amp; looking back at some of Fedoras recent accomplishments.
Plus Canonical is on the path to an IPO, pirates embrace Flatpack &amp; more!</itunes:subtitle>
<itunes:summary><![CDATA[An easy solution to get high performance remote Linux desktop up and going, some tips on how to interact with an open source project or community & looking back at some of Fedoras recent accomplishments.
Plus Canonical is on the path to an IPO, pirates embrace Flatpack & more!]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:34:40</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/10/lup-0220-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0220.mp3" fileSize="46051172" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Ubuntus New Era | LUP 219</title>
<link>http://www.jupiterbroadcasting.com/119166/ubuntus-new-era-lup-219/</link>
<description><![CDATA[We review Ubuntu 17.10 & discuss some of the major achievements this release represents. Plus we break down an important Linux kernel news story, get updates from the community & more!]]></description>
<pubDate>Tue, 17 Oct 2017 20:21:04 -0700</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0219.mp3" length="32416507" type="audio/mpeg" />
<guid isPermaLink="false">5F2CBEDB-7382-4ECC-B4FB-712794701BA6</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>We review Ubuntu 17.10 &amp; discuss some of the major achievements this release represents. Plus we break down an important Linux kernel news story, get updates from the community &amp; more!</itunes:subtitle>
<itunes:summary><![CDATA[We review Ubuntu 17.10 & discuss some of the major achievements this release represents. Plus we break down an important Linux kernel news story, get updates from the community & more!]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:06:15</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/10/lup-0219-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0219.mp3" fileSize="32416507" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>The Purism Redemption | LUP 218</title>
<link>http://www.jupiterbroadcasting.com/118986/the-purism-redemption-lup-218/</link>
<description><![CDATA[<p>We review Purisms Librem 15, the high performance 15.6″ laptop built for Linux with physical radio kill switches.</p>
<p>Plus the snap coming to a desktop near you, we report back from SeaGL & discuss some future changes to your humble weekly Linux talk show.</p>]]></description>
<pubDate>Wed, 11 Oct 2017 01:26:30 -0700</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0218.mp3" length="42146179" type="audio/mpeg" />
<guid isPermaLink="false">2781877B-170A-4AC6-84B7-7C41BE2B8B13</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>We review Purisms Librem 15, the high performance 15.6″ laptop built for Linux with physical radio kill switches.
Plus the snap coming to a desktop near you, we report back from SeaGL &amp; discuss some future changes to your humble weekly Linux talk show.</itunes:subtitle>
<itunes:summary><![CDATA[We review Purisms Librem 15, the high performance 15.6″ laptop built for Linux with physical radio kill switches.
Plus the snap coming to a desktop near you, we report back from SeaGL & discuss some future changes to your humble weekly Linux talk show.]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:26:31</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/10/lup-0218-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0218.mp3" fileSize="42146179" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>That One Time, At Ubuntu Camp | LUP 217</title>
<link>http://www.jupiterbroadcasting.com/118741/that-one-time-at-ubuntu-camp-lup-217/</link>
<description><![CDATA[<p>How does Ubuntu get built? Chris is back from the Ubuntu Rally in NYC and has a full report, some interviews & stories to share.</p>
<p>Plus Jos Poortvliet & Frank Karlitschek join us to talk about NextClouds new End-to-end Encryption.</p>]]></description>
<pubDate>Tue, 03 Oct 2017 22:31:36 -0700</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0217.mp3" length="46826695" type="audio/mpeg" />
<guid isPermaLink="false">86D7E207-CF7F-487C-9DF3-4A7230239B94</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>How does Ubuntu get built? Chris is back from the Ubuntu Rally in NYC and has a full report, some interviews &amp; stories to share.
Plus Jos Poortvliet &amp; Frank Karlitschek join us to talk about NextClouds new End-to-end Encryption.</itunes:subtitle>
<itunes:summary><![CDATA[How does Ubuntu get built? Chris is back from the Ubuntu Rally in NYC and has a full report, some interviews & stories to share.
Plus Jos Poortvliet & Frank Karlitschek join us to talk about NextClouds new End-to-end Encryption.]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:36:17</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/10/lup-0217-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0217.mp3" fileSize="46826695" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Open Source Is Hard | LUP 216</title>
<link>http://www.jupiterbroadcasting.com/118526/open-source-is-hard-lup-216/</link>
<description><![CDATA[Its Wes & the Beard this week as we cover tons of stories. TopIcons is officially unmaintained, KDE launches the XFree kwin project in an attempt to rid themselves of XWayland, Synergy goes closed source, Microsoft & Canonical build a custom linux kernel & more!]]></description>
<pubDate>Tue, 26 Sep 2017 23:49:43 -0700</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0216.mp3" length="41395525" type="audio/mpeg" />
<guid isPermaLink="false">EFF404E9-99E6-4E36-BFFC-C0BA2199B298</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>Its Wes &amp; the Beard this week as we cover tons of stories. TopIcons is officially unmaintained, KDE launches the XFree kwin project in an attempt to get rid of XWayland, Synergy goes closed source, Microsoft &amp; Canonical build a custom linux kernel &amp; more</itunes:subtitle>
<itunes:summary><![CDATA[Its Wes & the Beard this week as we cover tons of stories. TopIcons is officially unmaintained, KDE launches the XFree kwin project in an attempt to rid themselves of XWayland, Synergy goes closed source, Microsoft & Canonical build a custom linux kernel & more!]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:24:58</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/09/lup-0216-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0216.mp3" fileSize="41395525" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Pulse of PipeWire | LUP 215</title>
<link>http://www.jupiterbroadcasting.com/118391/pulse-of-pipewire-lup-215/</link>
<description><![CDATA[<p>A game changing project for Linux multimedia has been officially announced today, so we chat with the brilliance behind PipeWire, Wim Taymans.</p>
<p>Plus community news of the week & why the rapid decline of the “open source media” matters more than ever.</p>]]></description>
<pubDate>Tue, 19 Sep 2017 20:12:14 -0700</pubDate>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0215.mp3" length="32301360" type="audio/mpeg" />
<guid isPermaLink="false">24EB69A6-B950-44CE-8948-F92E4B7B1005</guid>
<itunes:author>Jupiter Broadcasting</itunes:author>
<itunes:subtitle>A game changing project for Linux multimedia has been officially announced today, so we chat with the brilliance behind PipeWire, Wim Taymans.
Plus community news of the week &amp; why the rapid decline of the “open source media” matters more than ever.</itunes:subtitle>
<itunes:summary><![CDATA[A game changing project for Linux multimedia has been officially announced today, so we chat with the brilliance behind PipeWire, Wim Taymans.
Plus community news of the week & why the rapid decline of the “open source media” matters more than ever.]]></itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:duration>1:06:01</itunes:duration>
<media:thumbnail url="http://www.jupiterbroadcasting.com/wp-content/uploads/2017/09/lup-0215-v.jpg" />
<author>chris@jupiterbroadcasting.com (Jupiter Broadcasting)</author><media:content url="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0215.mp3" fileSize="32301360" type="audio/mpeg" /><itunes:keywords>Linux,KDE,Arch,Ubuntu,Unity,lifestyle,open,foss,libre,Chrome,Google,Android,Games,Steam,Gnome,GTK,Qt,Jupiter,Broadcasting,Linux,Action,Show</itunes:keywords></item>
<item>
<title>Hacking Devices with Kali Linux | LUP 214</title>
<link>http://www.jupiterbroadcasting.com/118191/hacking-devices-with-kali-linux-lup-214/</link>
<description><![CDATA[Audit your network with a couple of easy commands on Kali Linux. Chris decides to blow off a little steam by attacking his IoT devices, Wes has the scope on Equifax blaming open source & the Beard just saved the show. Its a really packed episode!]]></description>
@@ -0,0 +1,370 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:art19="https://art19.com/xmlns/rss-extensions/1.0">
<channel>
<title>Steal the Stars</title>
<description>
<![CDATA[<p>The first audio drama from Tor Labs and Gideon Media, Steal the Stars is a gripping noir science fiction thriller in 14 episodes: Forbidden love, a crashed UFO, an alien body, and an impossible heist unlike any ever attempted - scripted by Mac Rogers, the award-winning playwright and writer of the multi-million download The Message and LifeAfter.</p>]]>
</description>
<managingEditor>podcasts@macmillan.com</managingEditor>
<copyright>© Gideon Media</copyright>
<atom:link href="https://rss.art19.com/steal-the-stars" rel="self" type="application/rss+xml"/>
<link>http://tor-labs.com/</link>
<itunes:owner>
<itunes:email>podcasts@macmillan.com</itunes:email>
</itunes:owner>
<itunes:author>Tor Labs / Gideon Media</itunes:author>
<itunes:summary>
<![CDATA[<p>The first audio drama from Tor Labs and Gideon Media, Steal the Stars is a gripping noir science fiction thriller in 14 episodes: Forbidden love, a crashed UFO, an alien body, and an impossible heist unlike any ever attempted - scripted by Mac Rogers, the award-winning playwright and writer of the multi-million download The Message and LifeAfter.</p>]]>
</itunes:summary>
<language>en</language>
<itunes:explicit>yes</itunes:explicit>
<itunes:category text="Arts">
<itunes:category text="Performing Arts"/>
</itunes:category>
<itunes:type>episodic</itunes:type>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<image>
<url>https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg</url>
<link>http://tor-labs.com/</link>
<title>Steal the Stars</title>
</image>
<item>
<title>14: As Fierce, As Colossal, As All-Consuming</title>
<description>
<![CDATA[<p>In an epic final showdown in the Texas desert - as Sierra closes in from all sides - Dak and Matt finally learn the truth about Moss.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Squarespace (Squarespace.com offer code STARS).</p>]]>
</description>
<itunes:title>14: As Fierce, As Colossal, As All-Consuming</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>14</itunes:episode>
<itunes:summary>In an epic final showdown in the Texas desert - as Sierra closes in from all sides - Dak and Matt finally learn the truth about Moss. 
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is brought to you by Squarespace (Squarespace.com offer code STARS).</itunes:summary>
<content:encoded>
<![CDATA[<p>In an epic final showdown in the Texas desert - as Sierra closes in from all sides - Dak and Matt finally learn the truth about Moss.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Squarespace (Squarespace.com offer code STARS).</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/Ck8iDIER5Fpmc9Rx4ICwxJAvcYGaJWLRNYRf8IAZu2c</guid>
<pubDate>Wed, 01 Nov 2017 03:31:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:43:50</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/b9a3e534-1070-4e21-91f2-e97d35dc9bf3.mp3" type="audio/mpeg" length="40163369"/>
</item>
<item>
<title>13: Matt-25</title>
<description>
<![CDATA[<p>Dak and Matt hide out for the night with Matt's ex-girlfriend Teresa, leading Dak to an unexpected moment of connection... and another unexpected moment that threatens to ruin everything.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Squarespace (Squarespace.com offer code STARS) and Parcast.</p>]]>
</description>
<itunes:title>13: Matt-25</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>13</itunes:episode>
<itunes:summary>Dak and Matt hide out for the night with Matt's ex-girlfriend Teresa, leading Dak to an unexpected moment of connection... and another unexpected moment that threatens to ruin everything. 
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is brought to you by Squarespace (Squarespace.com offer code STARS) and Parcast.</itunes:summary>
<content:encoded>
<![CDATA[<p>Dak and Matt hide out for the night with Matt's ex-girlfriend Teresa, leading Dak to an unexpected moment of connection... and another unexpected moment that threatens to ruin everything.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Squarespace (Squarespace.com offer code STARS) and Parcast.</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/_r5K_8_5HFIXQ1xhv7RHvMvYLOo_0JMnYWHNTaABxuQ</guid>
<pubDate>Wed, 25 Oct 2017 03:35:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:36:14</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/a72503e8-a984-4911-a1dc-e8dcc1a10dfd.mp3" type="audio/mpeg" length="31192711"/>
</item>
<item>
<title>12: All That Sky</title>
<description>
<![CDATA[<p>Dak and Matt are finally on the road with their extraterrestrial contraband, but Sierra is hot on their heels. They're finally forced to take refuge in the last place Dak wants to go.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Squarespace and Audible.</p>]]>
</description>
<itunes:title>12: All That Sky</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>12</itunes:episode>
<itunes:summary>Dak and Matt are finally on the road with their extraterrestrial contraband, but Sierra is hot on their heels. They're finally forced to take refuge in the last place Dak wants to go. 
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is brought to you by Squarespace and Audible.</itunes:summary>
<content:encoded>
<![CDATA[<p>Dak and Matt are finally on the road with their extraterrestrial contraband, but Sierra is hot on their heels. They're finally forced to take refuge in the last place Dak wants to go.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Squarespace and Audible.</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/U1ByYJR2Eq124QgYFZ6FH8Pa1vjpo_XeXfr1meRL6hU</guid>
<pubDate>Wed, 18 Oct 2017 03:31:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:34:34</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/cea5f3e8-f82c-439d-89c8-6cbd402b9df9.mp3" type="audio/mpeg" length="27200365"/>
</item>
<item>
<title>11: Checkpoints</title>
<description>
<![CDATA[<p>Getting Moss's body out of Hangar 11 is one thing. Getting it out of Quill Marine is quite another. And there's a lot of checkpoints - and angry people - standing between Dak &amp; Mat and freedom.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Lore on Amazon.</p>]]>
</description>
<itunes:title>11: Checkpoints</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>11</itunes:episode>
<itunes:summary>Getting Moss's body out of Hangar 11 is one thing. Getting it out of Quill Marine is quite another. And there's a lot of checkpoints - and angry people - standing between Dak &amp;amp; Mat and freedom. 
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is brought to you by Lore on Amazon.</itunes:summary>
<content:encoded>
<![CDATA[<p>Getting Moss's body out of Hangar 11 is one thing. Getting it out of Quill Marine is quite another. And there's a lot of checkpoints - and angry people - standing between Dak &amp; Mat and freedom.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Lore on Amazon.</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/7-k-JxtB5xrmn6ZuXF7Xz0VTgO_Zm580QQVpQJ2OCq4</guid>
<pubDate>Wed, 11 Oct 2017 03:30:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:22:42</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/3a6e5f73-0b8f-435b-a7c3-b569dd9cedf6.mp3" type="audio/mpeg" length="19402083"/>
</item>
<item>
<title>10: Protocol</title>
<description>
<![CDATA[<p>By the end of this day, Dak and Matt will either be dead... or they'll have just pulled off the most incredible heist of all time.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p>]]>
</description>
<itunes:title>10: Protocol</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>10</itunes:episode>
<itunes:summary>By the end of this day, Dak and Matt will either be dead... or they'll have just pulled off the most incredible heist of all time. 
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</itunes:summary>
<content:encoded>
<![CDATA[<p>By the end of this day, Dak and Matt will either be dead... or they'll have just pulled off the most incredible heist of all time.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/zPXgIdxCbanfZNot2NoqCtuA8p6TvneH8uRWjipDeaU</guid>
<pubDate>Wed, 04 Oct 2017 03:30:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:25:24</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/19d8cc64-22cf-4d00-a67f-b55f05d0443b.mp3" type="audio/mpeg" length="21997609"/>
</item>
<item>
<title>9: The Real Stuff</title>
<description>
<![CDATA[<p>Dak has to take two vitally important meetings today, with two of the most powerful men in Washington, DC. And they have to go perfectly: her fate and Matt's hang in the balance.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is sponsored by Spotify, Squarespace (Squarespace.com/stars) and Leesa (Leesa.com/stars)</p>]]>
</description>
<itunes:title>9: The Real Stuff</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>9</itunes:episode>
<itunes:summary>Dak has to take two vitally important meetings today, with two of the most powerful men in Washington, DC. And they have to go perfectly: her fate and Matt's hang in the balance. 
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is sponsored by Spotify, Squarespace (Squarespace.com/stars) and Leesa (Leesa.com/stars)</itunes:summary>
<content:encoded>
<![CDATA[<p>Dak has to take two vitally important meetings today, with two of the most powerful men in Washington, DC. And they have to go perfectly: her fate and Matt's hang in the balance.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is sponsored by Spotify, Squarespace (Squarespace.com/stars) and Leesa (Leesa.com/stars)</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/UmSCXUzVugdSQDFnPvUeSuDeLH6cVhXvYXI-YOebnpg</guid>
<pubDate>Wed, 27 Sep 2017 03:30:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:28:02</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/24e08163-7f79-4144-9bd8-0b1978e082cd.mp3" type="audio/mpeg" length="23081795"/>
</item>
<item>
<title>8: The Walls of the Maze</title>
<description>
<![CDATA[<p>Dak has a whole new plan to be with Matt now, a far more dangerous one. One which will carry her across the country to start putting the pieces in place for a perfect getaway.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is sponsored by Spotify and Audible (Audible.com/stealthestars).</p>]]>
</description>
<itunes:title>8: The Walls of the Maze</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>8</itunes:episode>
<itunes:summary>Dak has a whole new plan to be with Matt now, a far more dangerous one. One which will carry her across the country to start putting the pieces in place for a perfect getaway. 
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is sponsored by Spotify and Audible (Audible.com/stealthestars).</itunes:summary>
<content:encoded>
<![CDATA[<p>Dak has a whole new plan to be with Matt now, a far more dangerous one. One which will carry her across the country to start putting the pieces in place for a perfect getaway.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is sponsored by Spotify and Audible (Audible.com/stealthestars).</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/JZ3lAioyC2wxIx_HvrP_o7LgjercB6W5UsPbNsMn-ek</guid>
<pubDate>Wed, 20 Sep 2017 03:30:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:27:17</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/e8d9e9c0-f798-4283-ae7e-de5dc3cc7ef8.mp3" type="audio/mpeg" length="22116310"/>
</item>
<item>
<title>7: Altered Voices</title>
<description>
<![CDATA[<p>As Lloyd reveals startling new details about the origin of Object E, Dak and Matt's plan is hit with one brutal setback after another.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is sponsored by Spotify, Squarespace (Squarespace.com/stars) and Leesa (Leesa.com/stars)</p>]]>
</description>
<itunes:title>7: Altered Voices</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>7</itunes:episode>
<itunes:summary>As Lloyd reveals startling new details about the origin of Object E, Dak and Matt's plan is hit with one brutal setback after another. 
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is sponsored by Spotify, Squarespace (Squarespace.com/stars) and Leesa (Leesa.com/stars)</itunes:summary>
<content:encoded>
<![CDATA[<p>As Lloyd reveals startling new details about the origin of Object E, Dak and Matt's plan is hit with one brutal setback after another.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is sponsored by Spotify, Squarespace (Squarespace.com/stars) and Leesa (Leesa.com/stars)</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/i4i_I3dr9rxfV96N0rMCUcvDIdAdwV54lTJf29ZorTs</guid>
<pubDate>Wed, 13 Sep 2017 03:15:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:31:06</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/4183c9bc-b272-4a08-8be3-4e49895c7134.mp3" type="audio/mpeg" length="26498194"/>
</item>
<item>
<title>6: 900 Microns</title>
<description>
<![CDATA[<p>As Dak and Matt put their dangerous plan into effect - which involves stealing highly classified footage and meeting in secret with a reporter - Quill Marine gets some devastating news from Sierra.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Spotify.&nbsp;</p>]]>
</description>
<itunes:title>6: 900 Microns</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>6</itunes:episode>
<itunes:summary>As Dak and Matt put their dangerous plan into effect - which involves stealing highly classified footage and meeting in secret with a reporter - Quill Marine gets some devastating news from Sierra. 
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is brought to you by Spotify. </itunes:summary>
<content:encoded>
<![CDATA[<p>As Dak and Matt put their dangerous plan into effect - which involves stealing highly classified footage and meeting in secret with a reporter - Quill Marine gets some devastating news from Sierra.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Spotify.&nbsp;</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/9BGMWV_KT25yeSPMNF25Z0OF4-TBcZ2NYzX4znBSzZY</guid>
<pubDate>Wed, 06 Sep 2017 03:15:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:28:00</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/844ec351-9235-4c5b-9e80-012c61924b94.mp3" type="audio/mpeg" length="25448698"/>
</item>
<item>
<title>5: Lifers</title>
<description>
<![CDATA[<p>After Dak and Patty have to carry out the worst part of their job, Dak's romance with Matt reaches another level. With no legal way to be together, they decide on a desperate plan.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Audible (<a href="http://Audible.com/stealthestars" target="_blank">Audible.com/stealthestars</a>).</p>]]>
</description>
<itunes:title>5: Lifers</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>5</itunes:episode>
<itunes:summary>After Dak and Patty have to carry out the worst part of their job, Dak's romance with Matt reaches another level. With no legal way to be together, they decide on a desperate plan. 
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is brought to you by Audible (Audible.com/stealthestars).</itunes:summary>
<content:encoded>
<![CDATA[<p>After Dak and Patty have to carry out the worst part of their job, Dak's romance with Matt reaches another level. With no legal way to be together, they decide on a desperate plan.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Audible (<a href="http://Audible.com/stealthestars" target="_blank">Audible.com/stealthestars</a>).</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/P1U26uhQ4m-p9ZvKAM0aaMpXPCxKzYhYoKF8JQl5fcw</guid>
<pubDate>Wed, 30 Aug 2017 03:15:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:28:07</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/2b33e493-1751-4705-881e-7043ba5e1d56.mp3" type="audio/mpeg" length="24593554"/>
</item>
<item>
<title>4: Power Through</title>
<description>
<![CDATA[<p>Today, Trip Haydon - the head of Sierra and the man who holds all their fates in his hand - is visiting Quill Marine. It's the ultimate test of Dak's leadership. There's no margin for even one mistake.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Spotify, Plated (Plated.com/stars, terms apply) and Leesa (Leesa.com/stars).</p>]]>
</description>
<itunes:title>4: Power Through</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>4</itunes:episode>
<itunes:summary>Today, Trip Haydon - the head of Sierra and the man who holds all their fates in his hand - is visiting Quill Marine. It's the ultimate test of Dak's leadership. There's no margin for even one mistake. 
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is brought to you by Spotify, Plated (Plated.com/stars, terms apply) and Leesa (Leesa.com/stars).</itunes:summary>
<content:encoded>
<![CDATA[<p>Today, Trip Haydon - the head of Sierra and the man who holds all their fates in his hand - is visiting Quill Marine. It's the ultimate test of Dak's leadership. There's no margin for even one mistake.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Spotify, Plated (Plated.com/stars, terms apply) and Leesa (Leesa.com/stars).</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/CfyNFMaQmlDZhNV4yqiUtKMiD-YdGrgDAHRZDbqlCkk</guid>
<pubDate>Wed, 23 Aug 2017 03:15:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:38:48</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/ea58f0ff-693e-4d00-a133-e137a098b512.mp3" type="audio/mpeg" length="32449515"/>
</item>
<item>
<title>3: Turndown Service</title>
<description>
<![CDATA[<p>When they find out the man who runs Sierra is paying them a surprise visit, Dak and Matt have to carry out a hazardous test that will either bring them closer together or kill them.</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is sponsored by Plated&nbsp;(<a href="http://plated.com/stars" target="_blank">Plated.com/stars</a>.&nbsp;Terms&nbsp;and conditions&nbsp;apply) and Squarespace (<a href="http://Squarespace.com" target="_blank">Squarespace.com</a>, offer code: Stars).</p>]]>
</description>
<itunes:title>3: Turndown Service</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>3</itunes:episode>
<itunes:summary>When they find out the man who runs Sierra is paying them a surprise visit, Dak and Matt have to carry out a hazardous test that will either bring them closer together or kill them.
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is sponsored by Plated (Plated.com/stars. Terms and conditions apply) and Squarespace (Squarespace.com, offer code: Stars).</itunes:summary>
<content:encoded>
<![CDATA[<p>When they find out the man who runs Sierra is paying them a surprise visit, Dak and Matt have to carry out a hazardous test that will either bring them closer together or kill them.</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is sponsored by Plated&nbsp;(<a href="http://plated.com/stars" target="_blank">Plated.com/stars</a>.&nbsp;Terms&nbsp;and conditions&nbsp;apply) and Squarespace (<a href="http://Squarespace.com" target="_blank">Squarespace.com</a>, offer code: Stars).</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/KSQYXYJF7bgP95gjvhiI3YRSckvkLtu8FTVgfhM9lrk</guid>
<pubDate>Wed, 16 Aug 2017 03:15:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:33:08</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/0e800c7e-4d3c-4acf-aa3f-8d1e1f508d36.mp3" type="audio/mpeg" length="28936568"/>
</item>
<item>
<title>2: Three Dogs</title>
<description>
<![CDATA[<p>As Dak and Matt try to extinguish their forbidden relationship before it starts, we meet Lloyd, a brilliant xenobiologist who's about to risk his life in a dangerous encounter with the Harp.</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is sponsored by Plated&nbsp;(<a href="http://Plated.com/stars" target="_blank">Plated.com/stars</a>.&nbsp;Terms&nbsp;and conditions&nbsp;apply) and Leesa (<a href="http://Leesa.com/stars" target="_blank">Leesa.com/stars</a>).</p>]]>
</description>
<itunes:title>2: Three Dogs</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>2</itunes:episode>
<itunes:summary>As Dak and Matt try to extinguish their forbidden relationship before it starts, we meet Lloyd, a brilliant xenobiologist who's about to risk his life in a dangerous encounter with the Harp.
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is sponsored by Plated (Plated.com/stars. Terms and conditions apply) and Leesa (Leesa.com/stars).</itunes:summary>
<content:encoded>
<![CDATA[<p>As Dak and Matt try to extinguish their forbidden relationship before it starts, we meet Lloyd, a brilliant xenobiologist who's about to risk his life in a dangerous encounter with the Harp.</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is sponsored by Plated&nbsp;(<a href="http://Plated.com/stars" target="_blank">Plated.com/stars</a>.&nbsp;Terms&nbsp;and conditions&nbsp;apply) and Leesa (<a href="http://Leesa.com/stars" target="_blank">Leesa.com/stars</a>).</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/YSwgVQfG9gshqMg7TEpn1q7tjJVYbtM2_Y6zEvjl0Ns</guid>
<pubDate>Wed, 09 Aug 2017 03:15:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:31:20</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/752f5cc4-66ac-4254-9cf1-b1d35991069c.mp3" type="audio/mpeg" length="27205381"/>
</item>
<item>
<title>1: Warm Bodies</title>
<description>
<![CDATA[<p>Dakota Prentiss runs security at the secretive Quill Marine compound, run by private defense conglomerate Sierra. Today she's breaking in a new security staffer, Matt Salem. Which means Matt has to pass a crucial test: how he reacts to the secret at the heart of Quill Marine.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Audible (<a href="http://Audible.com/stealthestars" target="_blank">Audible.com/stealthestars</a>) and Plated (<a href="http://Plated.com/stars" target="_blank">Plated.com/stars</a>. Terms apply).</p>]]>
</description>
<itunes:title>1: Warm Bodies</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:episode>1</itunes:episode>
<itunes:summary>Dakota Prentiss runs security at the secretive Quill Marine compound, run by private defense conglomerate Sierra. Today she's breaking in a new security staffer, Matt Salem. Which means Matt has to pass a crucial test: how he reacts to the secret at the heart of Quill Marine. 
Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel
This week's episode is brought to you by Audible (Audible.com/stealthestars) and Plated (Plated.com/stars. Terms apply).</itunes:summary>
<content:encoded>
<![CDATA[<p>Dakota Prentiss runs security at the secretive Quill Marine compound, run by private defense conglomerate Sierra. Today she's breaking in a new security staffer, Matt Salem. Which means Matt has to pass a crucial test: how he reacts to the secret at the heart of Quill Marine.&nbsp;</p><p>Learn more about Steal the Stars novelization here: http://bit.ly/STSNovel</p><p>This week's episode is brought to you by Audible (<a href="http://Audible.com/stealthestars" target="_blank">Audible.com/stealthestars</a>) and Plated (<a href="http://Plated.com/stars" target="_blank">Plated.com/stars</a>. Terms apply).</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/iKPHluojN_2HVUBDhz25sYOzeMO1xHLITg1JmTyE8nQ</guid>
<pubDate>Wed, 02 Aug 2017 03:00:00 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:27:06</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/f8c867ee-f954-46de-8bda-017305474e40.mp3" type="audio/mpeg" length="21696679"/>
</item>
<item>
<title>Introducing Steal the Stars</title>
<description>
<![CDATA[<p>Steal the Stars is the story of Dakota Prentiss and Matt Salem, two government employees guarding the biggest secret in the world: a crashed UFO. Episode 1 goes live on August 2, 2017.</p>]]>
</description>
<itunes:title>Introducing Steal the Stars</itunes:title>
<itunes:episodeType>trailer</itunes:episodeType>
<itunes:summary>Steal the Stars is the story of Dakota Prentiss and Matt Salem, two government employees guarding the biggest secret in the world: a crashed UFO. Episode 1 goes live on August 2, 2017.</itunes:summary>
<content:encoded>
<![CDATA[<p>Steal the Stars is the story of Dakota Prentiss and Matt Salem, two government employees guarding the biggest secret in the world: a crashed UFO. Episode 1 goes live on August 2, 2017.</p>]]>
</content:encoded>
<guid isPermaLink="false">gid://art19-episode-locator/V0/S6kmOE2cviFS0HD-IUYOPRO0fvjTPYmCsMDe5bjABnA</guid>
<pubDate>Tue, 11 Jul 2017 17:14:45 -0000</pubDate>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="https://dfkfj8j276wwv.cloudfront.net/images/2c/5f/a0/1a/2c5fa01a-ae78-4a8c-b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg"/>
<itunes:duration>00:01:22</itunes:duration>
<enclosure url="https://dts.podtrac.com/redirect.mp3/rss.art19.com/episodes/f13b703c-20d9-4ea5-83b6-dbcd2f02351a.mp3" type="audio/mpeg" length="1318661"/>
</item>
</channel>
</rss>
@@ -0,0 +1,578 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:media="http://search.yahoo.com/mrss/" xmlns:sm="https://schema.syndicated.media/core/1.0/">
<channel>
<title>The Tip Off</title>
<description><![CDATA[<p>Welcome to The Tip Off- the podcast where we take you behind the scenes of some of the best investigative journalism from recent years. Each episode well be digging into an investigative scoop- hearing from the journalists behind the work as they tell us about the leads, the dead-ends and of course, the tip offs. Therell be car chases, slammed doors, terrorist cells, meetings in dimly lit bars and cafes, wrangling with despotic regimes and much more. So if youre curious about the fun, complicated detective work that goes into doing great investigative journalism- then this is the podcast for you.</p>]]></description>
<link>http://www.acast.com/thetipoff</link>
<lastBuildDate>Mon, 15 Jan 2018 11:59:56 GMT</lastBuildDate>
<pubDate>Thu, 11 Jan 2018 04:00:00 GMT</pubDate>
<ttl>30</ttl>
<language>en</language>
<copyright><![CDATA[]]></copyright>
<docs>https://www.acast.com/thetipoff</docs>
<image>
<url>https://imagecdn.acast.com/image?h=1500&amp;w=1500&amp;source=http%3A%2F%2Fi1.sndcdn.com%2Favatars-000317856075-a2coqz-original.jpg</url>
<title>The Tip Off</title>
<link>http://www.acast.com/thetipoff</link>
</image>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;http%3A%2F%2Fi1.sndcdn.com%2Favatars-000317856075-a2coqz-original.jpg" />
<itunes:subtitle><![CDATA[Welcome to The Tip Off- the podcast where we take…]]></itunes:subtitle>
<itunes:type>episodic</itunes:type>
<itunes:author>The Tip Off</itunes:author>
<itunes:summary>Welcome to The Tip Off- the podcast where we take you behind the scenes of some of the best investigative journalism from recent years. Each episode well be digging into an investigative scoop- hearing from the journalists behind the work as they tell us about the leads, the dead-ends and of course, the tip offs. Therell be car chases, slammed doors, terrorist cells, meetings in dimly lit bars and cafes, wrangling with despotic regimes and much more. So if youre curious about the fun, complicated detective work that goes into doing great investigative journalism- then this is the podcast for you.</itunes:summary>
<atom:link rel="self" type="application/rss+xml" href="https://rss.acast.com/thetipoff" />
<itunes:owner>
<itunes:name><![CDATA[The Tip Off]]></itunes:name>
<itunes:email>tipoffpodcast@gmail.com</itunes:email>
</itunes:owner>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords></itunes:keywords>
<itunes:category text="News &amp; Politics" />
<media:credit role="author">The Tip Off</media:credit>
<media:description type="html"><![CDATA[<p>Welcome to The Tip Off- the podcast where we take you behind the scenes of some of the best investigative journalism from recent years. Each episode well be digging into an investigative scoop- hearing from the journalists behind the work as they tell us about the leads, the dead-ends and of course, the tip offs. Therell be car chases, slammed doors, terrorist cells, meetings in dimly lit bars and cafes, wrangling with despotic regimes and much more. So if youre curious about the fun, complicated detective work that goes into doing great investigative journalism- then this is the podcast for you.</p>]]></media:description>
<item>
<title>Ep.13 Voices in the ether</title>
<itunes:subtitle>When you set out on an investigation you usually start with a hypothesis- an idea that you will test and challenge as you go. But not Paul Myles…
Working for On Our Radar, Paul set out to tell the story of dementia in the UK. Hours spent on trains, ...</itunes:subtitle>
<itunes:summary><![CDATA[When you set out on an investigation you usually start with a hypothesis- an idea that you will test and challenge as you go. But not Paul Myles…
Working for On Our Radar, Paul set out to tell the story of dementia in the UK. Hours spent on trains, workshops around the country and 3D printed phones brought him to Agnes, Melvyn and dozens of others. Together they give a never-before-seen insight into life with the condition.
Read all about it:
https://dementiadiaries.org/
https://www.buzzfeed.com/lukelewis/inspiring-tales-coping-with-dementia?utm_term=.raENZvdoA#.yoaMagBGd
https://www.theguardian.com/society/video/2017/jan/30/dementia-diaries-its-like-trying-to-go-through-a-brick-wall-video
http://www.telegraph.co.uk/science/2016/05/15/dealing-with-dementia-those-living-with-condition-outline-dos-an/
Hosted and produced: Maeve McClenaghan
Music: Dice Muse and Lee Rosevere]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[cd7778b1-e81d-4d45-8fe6-cc712190eabe]]></guid>
<pubDate>Thu, 11 Jan 2018 04:00:00 GMT</pubDate>
<itunes:duration>00:33:24</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:season>2</itunes:season>
<itunes:episode>13</itunes:episode>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fassets%2Fcd7778b1-e81d-4d45-8fe6-cc712190eabe%2Fcover-image-jc9kl26c-thetipoff_logo_1_.jpg" />
<description><![CDATA[<p>When you set out on an investigation you usually start with a hypothesis- an idea that you will test and challenge as you go. But not Paul Myles… </p><p><br></p><p>Working for On Our Radar, Paul set out to tell the story of dementia in the UK. Hours spent on trains, workshops around the country and 3D printed phones brought him to Agnes, Melvyn and dozens of others. Together they give a never-before-seen insight into life with the condition.</p><p><br></p><p><strong>Read all about it:</strong></p><p><a href="https://dementiadiaries.org/" target="_blank">https://dementiadiaries.org/</a></p><p><br></p><p><a href="https://www.buzzfeed.com/lukelewis/inspiring-tales-coping-with-dementia?utm_term=.raENZvdoA#.yoaMagBGd" target="_blank">https://www.buzzfeed.com/lukelewis/inspiring-tales-coping-with-dementia?utm_term=.raENZvdoA#.yoaMagBGd</a></p><p><br></p><p><a href="https://www.theguardian.com/society/video/2017/jan/30/dementia-diaries-its-like-trying-to-go-through-a-brick-wall-video" target="_blank">https://www.theguardian.com/society/video/2017/jan/30/dementia-diaries-its-like-trying-to-go-through-a-brick-wall-video</a> </p><p><br></p><p><a href="http://www.telegraph.co.uk/science/2016/05/15/dealing-with-dementia-those-living-with-condition-outline-dos-an/" target="_blank">http://www.telegraph.co.uk/science/2016/05/15/dealing-with-dementia-those-living-with-condition-outline-dos-an/</a></p><p><br></p><p>Hosted and produced: Maeve McClenaghan</p><p><br></p><p>Music: Dice Muse and <a href="http://freemusicarchive.org/music/Lee_Rosevere/Trappist-1/Lee_Rosevere_-_Trappist-1_-_05_Planet_F" target="_blank">Lee Rosevere</a> </p><p><br></p><p><br></p>]]></description>
<link>https://www.acast.com/thetipoff/ep.13voicesintheether</link>
<enclosure url="https://media.acast.com/thetipoff/ep.13voicesintheether/media.mp3" length="56188568" type="audio/mpeg"/>
</item>
<item>
<title>Ep. 12 The sound of news</title>
<itunes:subtitle>Leah Borromeo sees journalism differently to most. Or rather she hears it. Leah and colleagues are working on a project to tell investigative journalism through music.
So Maeve went along to the studio, to hear just exactly what that means.
Read a...</itunes:subtitle>
<itunes:summary><![CDATA[Leah Borromeo sees journalism differently to most. Or rather she hears it. Leah and colleagues are working on a project to tell investigative journalism through music.
So Maeve went along to the studio, to hear just exactly what that means.
Read all about it:
https://www.disobedientfilms.com/if-the-oceans-could-speak
https://www.disobedientfilms.com/climate-symphony
Hosted and produced: Maeve McClenaghan
Music: Dice Muse and Climate Symphony]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[7fd9f024-1fd5-48a1-a96b-a3419da9f754]]></guid>
<pubDate>Thu, 28 Dec 2017 03:00:00 GMT</pubDate>
<itunes:duration>00:36:36</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:season>2</itunes:season>
<itunes:episode>12</itunes:episode>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fassets%2F7fd9f024-1fd5-48a1-a96b-a3419da9f754%2Fcover-image-jbo1hf03-thetipoff_logo_1_.jpg" />
<description><![CDATA[<p>Leah Borromeo sees journalism differently to most. Or rather she hears it. Leah and colleagues are working on a project to tell investigative journalism through music.</p><p><br></p><p>So Maeve went along to the studio, to hear just exactly what that means. </p><p><br></p><p>Read all about it:</p><p><a href="https://www.disobedientfilms.com/if-the-oceans-could-speak" target="_blank">https://www.disobedientfilms.com/if-the-oceans-could-speak</a></p><p><br></p><p><a href="https://www.disobedientfilms.com/climate-symphony" target="_blank">https://www.disobedientfilms.com/climate-symphony</a> </p><p><br></p><p>Hosted and produced: Maeve McClenaghan</p><p><br></p><p>Music: Dice Muse and Climate Symphony</p><p><br></p><p><br></p>]]></description>
<link>https://www.acast.com/thetipoff/ep.12thesoundofnews</link>
<enclosure url="https://media.acast.com/thetipoff/ep.12thesoundofnews/media.mp3" length="63865436" type="audio/mpeg"/>
</item>
<item>
<title>Ep.11 Putting a price on health</title>
<itunes:subtitle>Ep. 11 Putting a price on health
Billy Kenber set out to look into one story and ended up finding another. Hidden within open datasets was proof of a practice that was costing the NHS hundreds of millions of pounds a year.
Battling to put the piece...</itunes:subtitle>
<itunes:summary><![CDATA[Billy Kenber set out to look into one story and ended up finding another. Hidden within open datasets was proof of a practice that was costing the NHS hundreds of millions of pounds a year.
Battling to put the pieces together in a quagmire of complex pricing structures and regulations understood by very few people, Billy blew the lid of a multi-million pound industry. And in the end one failed hypothesis led to an investigation that would change the law.
Read all about it:
https://www.thetimes.co.uk/article/extortionate-prices-add-260m-to-nhs-drug-bill-8mwtttwdk
https://www.thetimes.co.uk/article/victory-against-rip-off-drug-firms-after-times-investigation-qm6hlmqts
Hosted and produced: Maeve McClenaghan
Music: Dice Muse and Podington Bear]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[2af5efc1-5e6b-446e-9bb3-38704b9392d9]]></guid>
<pubDate>Thu, 14 Dec 2017 04:00:00 GMT</pubDate>
<itunes:duration>00:32:46</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:season>2</itunes:season>
<itunes:episode>11</itunes:episode>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fassets%2F2af5efc1-5e6b-446e-9bb3-38704b9392d9%2Fcover-image-jb5jim69-thetipoff_logo_1_.jpg" />
<description><![CDATA[<p><strong>Ep. 11 Putting a price on health</strong></p><p><br></p><p>Billy Kenber set out to look into one story and ended up finding another. Hidden within open datasets was proof of a practice that was costing the NHS hundreds of millions of pounds a year.</p><p><br></p><p>Battling to put the pieces together in a quagmire of complex pricing structures and regulations understood by very few people, Billy blew the lid of a multi-million pound industry. And in the end one failed hypothesis led to an investigation that would change the law.</p><p><br></p><p>Read all about it:</p><p><br></p><p><a href="https://www.thetimes.co.uk/article/extortionate-prices-add-260m-to-nhs-drug-bill-8mwtttwdk" target="_blank">https://www.thetimes.co.uk/article/extortionate-prices-add-260m-to-nhs-drug-bill-8mwtttwdk</a> </p><p><a href="https://www.thetimes.co.uk/article/victory-against-rip-off-drug-firms-after-times-investigation-qm6hlmqts" target="_blank">https://www.thetimes.co.uk/article/victory-against-rip-off-drug-firms-after-times-investigation-qm6hlmqts</a> </p><p><br></p><p>Hosted and produced: Maeve McClenaghan</p><p><br></p><p>Music: Dice Muse and <a href="http://freemusicarchive.org/music/Podington_Bear/" target="_blank">Podington Bear</a></p><p><br></p>]]></description>
<link>https://www.acast.com/thetipoff/ep.11puttingapriceonhealth</link>
<enclosure url="https://media.acast.com/thetipoff/ep.11puttingapriceonhealth/media.mp3" length="54656753" type="audio/mpeg"/>
</item>
<item>
<title>Ep. 10 Brown paper envelopes</title>
<itunes:subtitle>Jennifer Williams, of the Manchester Evening News, was hearing horrible stories coming from two hospitals in her patch. Rumour had it, there was a damning report out there... but getting hold of it would be easier said than done.
Sources, FOI battles...</itunes:subtitle>
<itunes:summary><![CDATA[Jennifer Williams, of the Manchester Evening News, was hearing horrible stories coming from two hospitals in her patch. Rumour had it, there was a damning report out there... but getting hold of it would be easier said than done.
Sources, FOI battles and an envelope full of surprises- this is the story of how one reporter revealed mothers and babies dying at a worrying rate.
Read all about it:
http://www.manchestereveningnews.co.uk/news/greater-manchester-news/pennine-acute-maternity-secret-report-12218989
http://www.manchestereveningnews.co.uk/news/greater-manchester-news/pennine-acute-maternity-report-revealed-12220033
Hosted and produced: Maeve McClenaghan
Music: Dice Muse, &nbsp;Komiku, John Spacek and Podington Bear]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[97e601de-45a4-4e6b-bb34-3409081c9202]]></guid>
<pubDate>Thu, 30 Nov 2017 08:45:00 GMT</pubDate>
<itunes:duration>00:34:57</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:season>2</itunes:season>
<itunes:episode>10</itunes:episode>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fassets%2F97e601de-45a4-4e6b-bb34-3409081c9202%2Fcover-image-jam7up44-thetipoff_logo_1_.jpg" />
<description><![CDATA[<p>Jennifer Williams, of the Manchester Evening News, was hearing horrible stories coming from two hospitals in her patch. Rumour had it, there was a damning report out there... but getting hold of it would be easier said than done.</p><p><br></p><p>Sources, FOI battles and an envelope full of surprises- this is the story of how one reporter revealed mothers and babies dying at a worrying rate.</p><p><br></p><p>Read all about it:</p><p><br></p><p><a href="http://www.manchestereveningnews.co.uk/news/greater-manchester-news/pennine-acute-maternity-secret-report-12218989" target="_blank">http://www.manchestereveningnews.co.uk/news/greater-manchester-news/pennine-acute-maternity-secret-report-12218989</a></p><p><br></p><p><a href="http://www.manchestereveningnews.co.uk/news/greater-manchester-news/pennine-acute-maternity-report-revealed-12220033" target="_blank">http://www.manchestereveningnews.co.uk/news/greater-manchester-news/pennine-acute-maternity-report-revealed-12220033</a></p><p><br></p><p>Hosted and produced: Maeve McClenaghan</p><p><br></p><p>Music: Dice Muse,&nbsp;<a href="http://freemusicarchive.org/music/Komiku/Its_time_for_adventure__vol_3/Komiku_-_Its_time_for_adventure_vol_3_-_09_You_yourself_and_the_main_character" target="_blank">Komiku</a>, <a href="http://freemusicarchive.org/" target="_blank">John Spacek</a> and <a href="http://freemusicarchive.org/music/Podington_Bear/" target="_blank">Podington Bear</a></p>]]></description>
<link>https://www.acast.com/thetipoff/ep.10brownpaperenvelopes</link>
<enclosure url="https://media.acast.com/thetipoff/ep.10brownpaperenvelopes/media.mp3" length="59888557" type="audio/mpeg"/>
</item>
<item>
<title>Ep.9 When the roof came down</title>
<itunes:subtitle>Ep.9 When the roof came down In late July I read a Facebook post that would send me on a three month journey- from town council steps, to bland hotels to dirty council flats- I followed the stories of women fleeing domestic violence only to be let down...</itunes:subtitle>
<itunes:summary><![CDATA[Ep.9 When the roof came down In late July I read a Facebook post that would send me on a three month journey- from town council steps, to bland hotels to dirty council flats- I followed the stories of women fleeing domestic violence only to be let down by the system designed to support them. Meanwhile, a team of journalists all across the country, dug into FOI data, pulled in local council funding bids and surveyed experts on the ground. Together we uncovered a country-wide crisis, with huge cuts to refuge funding and hundreds of vulnerable women turned away. WARNING: This episodes contains descriptions of domestic violence and strong language. If you need to talk to someone about domestic violence contact Women's Aid/Refuge free helpline on 0808 2000 247. If you are in immediate danger, call 999. Read all about it: https://www.thebureauinvestigates.com/stories/2017-10-16/a-system-at-breaking-point https://www.thebureauinvestigates.com/stories/2017-10-16/new-entry https://www.thebureauinvestigates.com/blog/2017-10-19/refuges-at-breaking-point-stories-from-around-the-country Hosted and produced: Maeve McClenaghan Testimony voiced by: Emer O Connor and Stephanie Soh Music: Dice Muse and Komiku http://freemusicarchive.org/music/Komiku/Its_time_for_adventure__vol_3/Komiku_-_Its_time_for_adventure_vol_3_-_09_You_yourself_and_the_main_character]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[tag:soundcloud,2010:tracks/348656618]]></guid>
<pubDate>Thu, 26 Oct 2017 09:16:00 GMT</pubDate>
<itunes:duration>00:46:16</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>yes</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fsource%2F945dc34f-f4e6-4921-830a-df050e540722%2Fd320b821-f2ba-4029-b95b-0cb840bfa8d8%2F44cc9c2e-879f-49c6-8b34-4d38d09e85d2%2Fartworks-000248917923-77ja4z-original.jpg" />
<description><![CDATA[<p>Ep.9 When the roof came down In late July I read a Facebook post that would send me on a three month journey- from town council steps, to bland hotels to dirty council flats- I followed the stories of women fleeing domestic violence only to be let down by the system designed to support them. Meanwhile, a team of journalists all across the country, dug into FOI data, pulled in local council funding bids and surveyed experts on the ground. Together we uncovered a country-wide crisis, with huge cuts to refuge funding and hundreds of vulnerable women turned away. WARNING: This episodes contains descriptions of domestic violence and strong language. If you need to talk to someone about domestic violence contact Women's Aid/Refuge free helpline on 0808 2000 247. If you are in immediate danger, call 999. Read all about it: https://www.thebureauinvestigates.com/stories/2017-10-16/a-system-at-breaking-point https://www.thebureauinvestigates.com/stories/2017-10-16/new-entry https://www.thebureauinvestigates.com/blog/2017-10-19/refuges-at-breaking-point-stories-from-around-the-country Hosted and produced: Maeve McClenaghan Testimony voiced by: Emer O Connor and Stephanie Soh Music: Dice Muse and Komiku http://freemusicarchive.org/music/Komiku/Its_time_for_adventure__vol_3/Komiku_-_Its_time_for_adventure_vol_3_-_09_You_yourself_and_the_main_character</p>]]></description>
<link>https://www.acast.com/thetipoff/ep9-when-the-roof-came-down</link>
<enclosure url="https://media.acast.com/thetipoff/ep9-when-the-roof-came-down/media.mp3" length="87063215" type="audio/mpeg"/>
</item>
<item>
<title>Ep.8 The stories untold</title>
<itunes:subtitle>Ep.8 The stories untold
Its one thing breaking a story- but how do you keep reporting a story that unfurls over years and not days?
Rebecca Omonira-Oyekanmi explains how she travelled to the vast refugee camps of Ethiopia before Rossalyn Warren takes...</itunes:subtitle>
<itunes:summary><![CDATA[Ep.8 The stories untold
Its one thing breaking a story- but how do you keep reporting a story that unfurls over years and not days?
Rebecca Omonira-Oyekanmi explains how she travelled to the vast refugee camps of Ethiopia before Rossalyn Warren takes up the baton, reporting from the perilous sea-crossings on the Mediterranean.
Working freelance, both women struggle to do the stories they care about while making a living.
WARNING: This episodes contains descriptions of domestic violence.
Read all about it:
http://www.newstatesman.com/world/africa/2017/03/i-want-try-live-or-die-how-refugees-decide-whether-make-dangerous-trip-europe
http://www.elleuk.com/life-and-culture/culture/longform/a36785/moroccan-teen-girl-fleeing-slavery/
Hosted and produced: Maeve McClenaghan
Music: Dice Muse, Clare Marks and Komiku
Audio of sea rescues from Medicins Sans Frontier
https://soundcloud.com/claremarks]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[tag:soundcloud,2010:tracks/335067535]]></guid>
<pubDate>Thu, 27 Jul 2017 12:53:18 GMT</pubDate>
<itunes:duration>00:41:20</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fsource%2F945dc34f-f4e6-4921-830a-df050e540722%2Fd3c055ed-eb98-42e1-8ef1-e5e201d58a24%2Ffa8e7880-4001-4f1a-b480-e6e04f709f96%2Fartworks-000235413887-wac8v7-original.jpg" />
<description><![CDATA[Ep.8 The stories untold
Its one thing breaking a story- but how do you keep reporting a story that unfurls over years and not days?
Rebecca Omonira-Oyekanmi explains how she travelled to the vast refugee camps of Ethiopia before Rossalyn Warren takes up the baton, reporting from the perilous sea-crossings on the Mediterranean.
Working freelance, both women struggle to do the stories they care about while making a living.
WARNING: This episodes contains descriptions of domestic violence.
Read all about it:
http://www.newstatesman.com/world/africa/2017/03/i-want-try-live-or-die-how-refugees-decide-whether-make-dangerous-trip-europe
http://www.elleuk.com/life-and-culture/culture/longform/a36785/moroccan-teen-girl-fleeing-slavery/
Hosted and produced: Maeve McClenaghan
Music: Dice Muse, Clare Marks and Komiku
Audio of sea rescues from Medicins Sans Frontier
https://soundcloud.com/claremarks]]></description>
<link>https://www.acast.com/thetipoff/ep.8-the-stories-untold</link>
<enclosure url="https://media.acast.com/thetipoff/ep.8-the-stories-untold/media.mp3" length="75233921" type="audio/mpeg"/>
</item>
<item>
<title>Ep.7 Codename Prometheus</title>
<itunes:subtitle>Ep. 7 Codename: Prometheus
Everyones heard of the Panama Papers- the stories from the biggest data lead in history rocked the world.
But how did it happen? Where did the data appear from? How do you sift through 11.5m files? And how on earth do you ...</itunes:subtitle>
<itunes:summary><![CDATA[Ep. 7 Codename: Prometheus
Everyones heard of the Panama Papers- the stories from the biggest data lead in history rocked the world.
But how did it happen? Where did the data appear from? How do you sift through 11.5m files? And how on earth do you herd hundreds of journalists to the same finish line?
Bastian Obermayer (Süddeutsche Zeitung), Holly Watt (Guardian) and Will Fitzgibbon (ICIJ) talk us through the trials and tribulations of the worlds biggest cross-border collaboration.
Read all about it:
https://www.theguardian.com/news/2016/apr/07/david-cameron-admits-he-profited-fathers-offshore-fund-panama-papers
https://panamapapers.icij.org/about.html
Hosted and produced: Maeve McClenaghan
Music: Dice Muse and Josh Spacek]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[tag:soundcloud,2010:tracks/333989206]]></guid>
<pubDate>Thu, 20 Jul 2017 07:07:45 GMT</pubDate>
<itunes:duration>00:39:41</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fsource%2F945dc34f-f4e6-4921-830a-df050e540722%2F66be48d0-9970-4254-a8ea-82a1066e2337%2Fe7762b1f-aada-433b-9edd-1a5ac348ab98%2Fartworks-000234362942-lmh754-original.jpg" />
<description><![CDATA[Ep. 7 Codename: Prometheus
Everyones heard of the Panama Papers- the stories from the biggest data lead in history rocked the world.
But how did it happen? Where did the data appear from? How do you sift through 11.5m files? And how on earth do you herd hundreds of journalists to the same finish line?
Bastian Obermayer (Süddeutsche Zeitung), Holly Watt (Guardian) and Will Fitzgibbon (ICIJ) talk us through the trials and tribulations of the worlds biggest cross-border collaboration.
Read all about it:
https://www.theguardian.com/news/2016/apr/07/david-cameron-admits-he-profited-fathers-offshore-fund-panama-papers
https://panamapapers.icij.org/about.html
Hosted and produced: Maeve McClenaghan
Music: Dice Muse and Josh Spacek]]></description>
<link>https://www.acast.com/thetipoff/ep.7-codename-prometheus</link>
<enclosure url="https://media.acast.com/thetipoff/ep.7-codename-prometheus/media.mp3" length="71273758" type="audio/mpeg"/>
</item>
<item>
<title>Ep.6 Caught offside?</title>
<itunes:subtitle>Ep. 6 Caught offside?
A two year investigation took reporters undercover as they met with top football managers and agents.
Claire Newell explains how the Daily Telegraphs investigation team exposed the murky world of British football, ending in the ...</itunes:subtitle>
<itunes:summary><![CDATA[Ep. 6 Caught offside?
A two year investigation took reporters undercover as they met with top football managers and agents.
Claire Newell explains how the Daily Telegraphs investigation team exposed the murky world of British football, ending in the England manager stepping down.
Read all about it:
http://www.telegraph.co.uk/news/2016/09/26/exclusive-investigation-england-manager-sam-allardyce-for-sale/
http://www.telegraph.co.uk/football-for-sale/
Hosted and produced: Maeve McClenaghan
Music: Dice Muse and Clare Marks
https://soundcloud.com/claremarks]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[tag:soundcloud,2010:tracks/332988171]]></guid>
<pubDate>Thu, 13 Jul 2017 07:44:20 GMT</pubDate>
<itunes:duration>00:44:11</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fsource%2F945dc34f-f4e6-4921-830a-df050e540722%2Fdb22e275-5348-44f8-a975-e2ae773910cf%2F3419a5d8-7ad2-41fb-bc03-861b4b7dd0b4%2Fartworks-000233400257-9pzv50-original.jpg" />
<description><![CDATA[Ep. 6 Caught offside?
A two year investigation took reporters undercover as they met with top football managers and agents.
Claire Newell explains how the Daily Telegraphs investigation team exposed the murky world of British football, ending in the England manager stepping down.
Read all about it:
http://www.telegraph.co.uk/news/2016/09/26/exclusive-investigation-england-manager-sam-allardyce-for-sale/
http://www.telegraph.co.uk/football-for-sale/
Hosted and produced: Maeve McClenaghan
Music: Dice Muse and Clare Marks
https://soundcloud.com/claremarks]]></description>
<link>https://www.acast.com/thetipoff/ep.6-caught-offside</link>
<enclosure url="https://media.acast.com/thetipoff/ep.6-caught-offside/media.mp3" length="82073824" type="audio/mpeg"/>
</item>
<item>
<title>Ep.5 It started with a body</title>
<itunes:subtitle>Ep. 5 It started with a body
It started with a body and ended up in a months long investigation exploring the scale of homelessness in a London borough.
We follow Emma Youle as one simple story grows and morphs into an award-winning campaign.
Read a...</itunes:subtitle>
<itunes:summary><![CDATA[Ep. 5 It started with a body
It started with a body and ended up in a months long investigation exploring the scale of homelessness in a London borough.
We follow Emma Youle as one simple story grows and morphs into an award-winning campaign.
Read all about it: http://www.hackneygazette.co.uk/news/hackney-council-pays-35million-a-year-to-keep-the-homeless-homeless-1-4851576
http://www.hackneygazette.co.uk/news/revealed-shocking-modern-day-slum-conditions-at-hackney-hostel-for-homeless-people-1-4589067
Hosted and produced: Maeve McClenaghan
Music: Dice Muse and Podington Bear]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[tag:soundcloud,2010:tracks/331807588]]></guid>
<pubDate>Thu, 06 Jul 2017 06:43:02 GMT</pubDate>
<itunes:duration>00:38:17</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fsource%2F945dc34f-f4e6-4921-830a-df050e540722%2F032b9688-585f-417d-903b-b651d8e3b20b%2F7e397853-7dad-4f38-b69f-8fa88b4567e8%2Fartworks-000232222022-dx0w5x-original.jpg" />
<description><![CDATA[Ep. 5 It started with a body
It started with a body and ended up in a months long investigation exploring the scale of homelessness in a London borough.
We follow Emma Youle as one simple story grows and morphs into an award-winning campaign.
Read all about it: http://www.hackneygazette.co.uk/news/hackney-council-pays-35million-a-year-to-keep-the-homeless-homeless-1-4851576
http://www.hackneygazette.co.uk/news/revealed-shocking-modern-day-slum-conditions-at-hackney-hostel-for-homeless-people-1-4589067
Hosted and produced: Maeve McClenaghan
Music: Dice Muse and Podington Bear]]></description>
<link>https://www.acast.com/thetipoff/ep.5-it-started-with-a-body</link>
<enclosure url="https://media.acast.com/thetipoff/ep.5-it-started-with-a-body/media.mp3" length="67903969" type="audio/mpeg"/>
</item>
<item>
<title>Ep.4 Knock Knock</title>
<itunes:subtitle>Ep.4 Knock knock
Jane Bradley is stood on doorstep in West London. She is about to knock and tell a mother that she suspects her son is one of the worlds most wanted terrorists.
We follow Janes progress as she tracks down not one but two of the Bea...</itunes:subtitle>
<itunes:summary><![CDATA[Ep.4 Knock knock
Jane Bradley is stood on doorstep in West London. She is about to knock and tell a mother that she suspects her son is one of the worlds most wanted terrorists.
We follow Janes progress as she tracks down not one but two of the Beatles terror cell.
Read all about it: https://www.buzzfeed.com/janebradley/unmasked-the-second-member-of-isiss-beatles-execution-cell?utm_term=.tbXjXVDRw#.vvG4w1PG7
https://www.buzzfeed.com/janebradley/my-son-the-isis-executioner?utm_term=.uxO3lDBw9#.uqWJrqAvR
Hosted and produced: Maeve McClenaghan
Production advice: Lorna Stewart
Music: Dice Muse]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[tag:soundcloud,2010:tracks/330669491]]></guid>
<pubDate>Thu, 29 Jun 2017 07:53:28 GMT</pubDate>
<itunes:duration>00:35:05</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fsource%2F945dc34f-f4e6-4921-830a-df050e540722%2F21aabb14-b47f-4bef-8cc0-b36eb65bf00a%2F4b5be8c8-9f36-440b-8422-19e220b39fb3%2Fartworks-000231099552-8kn14m-original.jpg" />
<description><![CDATA[Ep.4 Knock knock
Jane Bradley is stood on doorstep in West London. She is about to knock and tell a mother that she suspects her son is one of the worlds most wanted terrorists.
We follow Janes progress as she tracks down not one but two of the Beatles terror cell.
Read all about it: https://www.buzzfeed.com/janebradley/unmasked-the-second-member-of-isiss-beatles-execution-cell?utm_term=.tbXjXVDRw#.vvG4w1PG7
https://www.buzzfeed.com/janebradley/my-son-the-isis-executioner?utm_term=.uxO3lDBw9#.uqWJrqAvR
Hosted and produced: Maeve McClenaghan
Production advice: Lorna Stewart
Music: Dice Muse]]></description>
<link>https://www.acast.com/thetipoff/ep.4-knock-knock</link>
<enclosure url="https://media.acast.com/thetipoff/ep.4-knock-knock/media.mp3" length="60211376" type="audio/mpeg"/>
</item>
<item>
<title>Ep.3 Back to the source</title>
<itunes:subtitle>Ep.3 Back to the source
The Bureau of Investigative Journalisms Abigail Fielding-Smith finds a vital source, who lets her into the world of the Pentagons top-secret propaganda machine.
With: Abigail Fielding-Smith
Read all about it: http://labs....</itunes:subtitle>
<itunes:summary><![CDATA[Ep.3 Back to the source
The Bureau of Investigative Journalisms Abigail Fielding-Smith finds a vital source, who lets her into the world of the Pentagons top-secret propaganda machine.
With: Abigail Fielding-Smith
Read all about it: http://labs.thebureauinvestigates.com/fake-news-and-false-flags/
Hosted and produced: Maeve McClenaghan
Production advice: Lorna Stewart
Music: Dice Muse]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[tag:soundcloud,2010:tracks/329457734]]></guid>
<pubDate>Thu, 22 Jun 2017 07:18:17 GMT</pubDate>
<itunes:duration>00:40:45</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fsource%2F945dc34f-f4e6-4921-830a-df050e540722%2Ff12efe36-3be7-4ab3-88c5-d74029f554cb%2F9fb70bc0-ec6a-40f6-9233-3f768356e6ce%2Fartworks-000229985808-w1scxb-original.jpg" />
<description><![CDATA[Ep.3 Back to the source
The Bureau of Investigative Journalisms Abigail Fielding-Smith finds a vital source, who lets her into the world of the Pentagons top-secret propaganda machine.
With: Abigail Fielding-Smith
Read all about it: http://labs.thebureauinvestigates.com/fake-news-and-false-flags/
Hosted and produced: Maeve McClenaghan
Production advice: Lorna Stewart
Music: Dice Muse]]></description>
<link>https://www.acast.com/thetipoff/ep.3-back-to-the-source</link>
<enclosure url="https://media.acast.com/thetipoff/ep.3-back-to-the-source/media.mp3" length="73843165" type="audio/mpeg"/>
</item>
<item>
<title>Ep.2 The stuff of horror movies</title>
<itunes:subtitle>Ep. 2 The stuff of horror movies
Piece by piece the Washington Posts Louisa Loveluck puts together the picture of a horrifying Syrian torture facility, in a setting you wouldnt expect.
WARNING: This episode includes descriptions of violence and to...</itunes:subtitle>
<itunes:summary><![CDATA[Ep. 2 The stuff of horror movies
Piece by piece the Washington Posts Louisa Loveluck puts together the picture of a horrifying Syrian torture facility, in a setting you wouldnt expect.
WARNING: This episode includes descriptions of violence and torture and may not be suitable for all listeners.
With: Louisa Loveluck
Read all about it: https://www.washingtonpost.com/world/middle_east/the-hospitals-were-slaughterhouses-a-journey-intosyrias-secret-torture-wards/2017/04/02/90ccaa6e-0d61-11e7-b2bb-417e331877d9_story.html?utm_term=.78c0ffec5d51
Hosted and produced: Maeve McClenaghan
Production advice: Lorna Stewart
Music: Dice Muse and Podington Bear]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[tag:soundcloud,2010:tracks/327984833]]></guid>
<pubDate>Wed, 14 Jun 2017 07:39:16 GMT</pubDate>
<itunes:duration>00:31:58</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fsource%2F945dc34f-f4e6-4921-830a-df050e540722%2F421a1d64-4f8d-4071-91d8-3181ef188f9b%2Ff21198e8-9018-4e3b-91eb-7d75b029b300%2Fartworks-000228291000-fdcndf-original.jpg" />
<description><![CDATA[Ep. 2 The stuff of horror movies
Piece by piece the Washington Posts Louisa Loveluck puts together the picture of a horrifying Syrian torture facility, in a setting you wouldnt expect.
WARNING: This episode includes descriptions of violence and torture and may not be suitable for all listeners.
With: Louisa Loveluck
Read all about it: https://www.washingtonpost.com/world/middle_east/the-hospitals-were-slaughterhouses-a-journey-intosyrias-secret-torture-wards/2017/04/02/90ccaa6e-0d61-11e7-b2bb-417e331877d9_story.html?utm_term=.78c0ffec5d51
Hosted and produced: Maeve McClenaghan
Production advice: Lorna Stewart
Music: Dice Muse and Podington Bear]]></description>
<link>https://www.acast.com/thetipoff/ep.2-the-stuff-of-horror-movies</link>
<enclosure url="https://media.acast.com/thetipoff/ep.2-the-stuff-of-horror-movies/media.mp3" length="52760373" type="audio/mpeg"/>
</item>
<item>
<title>Ep.1 Follow the money</title>
<itunes:subtitle>Ep.1 Follow the money
Wigs, car chases and rucksacks stuffed with cash. Buzzfeeds Heidi Blake explains how she exposed the questionable financial practices of one of the Conservative Partys largest donors.
With: Heidi Blake
Read all about it: ht...</itunes:subtitle>
<itunes:summary><![CDATA[Ep.1 Follow the money
Wigs, car chases and rucksacks stuffed with cash. Buzzfeeds Heidi Blake explains how she exposed the questionable financial practices of one of the Conservative Partys largest donors.
With: Heidi Blake
Read all about it: https://www.buzzfeed.com/heidiblake/this-tory-donor-was-secretly-filmed-dropping-cash-stuffed-ru?utm_term=.oxjmBQGKN#.qneDMy19Q
Hosted and produced: Maeve McClenaghan
Production advice: Lorna Stewart
Music: Dice Muse]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[tag:soundcloud,2010:tracks/327983748]]></guid>
<pubDate>Wed, 14 Jun 2017 07:21:57 GMT</pubDate>
<itunes:duration>00:37:50</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fsource%2F945dc34f-f4e6-4921-830a-df050e540722%2Ff37fae08-d65c-45cf-9957-55a045a87cd7%2F97e8631f-4e55-41a3-87c1-29c6114e9b83%2Fartworks-000228290187-pd4yfy-original.jpg" />
<description><![CDATA[Ep.1 Follow the money
Wigs, car chases and rucksacks stuffed with cash. Buzzfeeds Heidi Blake explains how she exposed the questionable financial practices of one of the Conservative Partys largest donors.
With: Heidi Blake
Read all about it: https://www.buzzfeed.com/heidiblake/this-tory-donor-was-secretly-filmed-dropping-cash-stuffed-ru?utm_term=.oxjmBQGKN#.qneDMy19Q
Hosted and produced: Maeve McClenaghan
Production advice: Lorna Stewart
Music: Dice Muse]]></description>
<link>https://www.acast.com/thetipoff/ep.1-follow-the-money</link>
<enclosure url="https://media.acast.com/thetipoff/ep.1-follow-the-money/media.mp3" length="66839221" type="audio/mpeg"/>
</item>
<item>
<title>Coming soon... The Tip Off</title>
<itunes:subtitle>Welcome to The Tip Off, a new weekly podcast that delves into the stories behind some of the biggest headlines in British journalism.</itunes:subtitle>
<itunes:summary><![CDATA[Welcome to The Tip Off, a new weekly podcast that delves into the stories behind some of the biggest headlines in British journalism.]]></itunes:summary>
<guid isPermaLink="false"><![CDATA[tag:soundcloud,2010:tracks/327539708]]></guid>
<pubDate>Sun, 11 Jun 2017 12:24:16 GMT</pubDate>
<itunes:duration>00:11:39</itunes:duration>
<itunes:keywords></itunes:keywords>
<itunes:explicit>no</itunes:explicit>
<itunes:episodeType>full</itunes:episodeType>
<itunes:image href="https://imagecdn.acast.com/image?h&#x3D;1500&amp;w&#x3D;1500&amp;source&#x3D;https%3A%2F%2Fmediacdn.acast.com%2Fsource%2F945dc34f-f4e6-4921-830a-df050e540722%2F9e2116e5-b87e-43a7-ae0c-41cbb324b4d8%2F7d456cf4-3671-4d98-ae5c-1c2e92b13527%2Fartworks-000227873559-gxybj6-original.jpg" />
<description><![CDATA[Welcome to The Tip Off, a new weekly podcast that delves into the stories behind some of the biggest headlines in British journalism.]]></description>
<link>https://www.acast.com/thetipoff/coming-soon...-the-tip-off</link>
<enclosure url="https://media.acast.com/thetipoff/coming-soon...-the-tip-off/media.mp3" length="3978132" type="audio/mpeg"/>
</item>
</channel>
</rss>
@@ -0,0 +1,752 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>Intercepted with Jeremy Scahill</title>
<link>https://theintercept.com/podcasts</link>
<language>en</language>
<copyright>First Look Media Works, Inc.</copyright>
<description>The people behind The Intercepts fearless reporting and incisive commentary—Jeremy Scahill, Glenn Greenwald, Betsy Reed and others—discuss the crucial issues of our time: national security, civil liberties, foreign policy, and criminal justice. Plus interviews with artists, thinkers, and newsmakers who challenge our preconceptions about the world we live in.</description>
<image>
<url>http://static.megaphone.fm/podcasts/d5735a50-d904-11e6-8532-73c7de466ea6/image/uploads_2F1484252190700-qhn5krasklbce3dh-a797539282700ea0298a3a26f7e49b0b_2FIntercepted_COVER%2B_281_29.png</url>
<title>Intercepted with Jeremy Scahill</title>
<link>https://theintercept.com/podcasts</link>
</image>
<itunes:explicit>no</itunes:explicit>
<itunes:type>episodic</itunes:type>
<itunes:subtitle>The people behind The Intercepts fearless reporting and incisive commentary discuss the crucial issues of our time.</itunes:subtitle>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:summary>The people behind The Intercepts fearless reporting and incisive commentary—Jeremy Scahill, Glenn Greenwald, Betsy Reed and others—discuss the crucial issues of our time: national security, civil liberties, foreign policy, and criminal justice. Plus interviews with artists, thinkers, and newsmakers who challenge our preconceptions about the world we live in.</itunes:summary>
<itunes:owner>
<itunes:name>The Intercept / Panoply</itunes:name>
<itunes:email>podcasts@theintercept.com</itunes:email>
</itunes:owner>
<itunes:image href="http://static.megaphone.fm/podcasts/d5735a50-d904-11e6-8532-73c7de466ea6/image/uploads_2F1484252190700-qhn5krasklbce3dh-a797539282700ea0298a3a26f7e49b0b_2FIntercepted_COVER%2B_281_29.png" />
<itunes:category text="News &amp; Politics">
</itunes:category>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/InterceptedWithJeremyScahill" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="interceptedwithjeremyscahill" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
<title>BONUS: The NFL's Violent Ballet</title>
<description>This year in the National Football League, there have been 281 recorded concussions that players have suffered — spanning from the pre-season right up to the last playoff games. This weekend is Super Bowl Sunday. That is a macabre sort of record — it represents the most concussions in a season since the NFL started keeping track six years ago. The hits that these players take over and over during their careers can lead to very serious brain damage and a&amp;nbsp; degenerative condition known as Chronic Traumatic Encephalopathy or CTE.&lt;br&gt;&lt;br&gt;We are doing this special episode of Intercepted to highlight a gut-wrenching new short film that The Intercepts Josh Begley has directed. It is called "Concussion Protocol."&lt;br&gt;&lt;br&gt;In this special bonus episode of Intercepted, Josh Begley, The Intercepts Shaun King and Donte Stallworth, a ten year veteran of the NFL, discuss brain injuries, the #TakeAKnee protests, and Trumps attacks on athletes.&lt;br&gt;&lt;br&gt;Josh Begleys video “Concussion Protocol” can be viewed at &lt;a href="https://theintercept.com/NFL"&gt;theintercept.com/NFL&lt;/a&gt;.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description>
<pubDate>Thu, 01 Feb 2018 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>BONUS: The NFL's Violent Ballet</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle> There have been 281 recorded concussions in the National Football League this year.</itunes:subtitle>
<itunes:summary>
<![CDATA[This year in the National Football League, there have been 281 recorded concussions that players have suffered — spanning from the pre-season right up to the last playoff games. This weekend is Super Bowl Sunday. That is a macabre sort of record — it represents the most concussions in a season since the NFL started keeping track six years ago. The hits that these players take over and over during their careers can lead to very serious brain damage and a&nbsp; degenerative condition known as Chronic Traumatic Encephalopathy or CTE.<br><br>We are doing this special episode of Intercepted to highlight a gut-wrenching new short film that The Intercepts Josh Begley has directed. It is called "Concussion Protocol."<br><br>In this special bonus episode of Intercepted, Josh Begley, The Intercepts Shaun King and Donte Stallworth, a ten year veteran of the NFL, discuss brain injuries, the #TakeAKnee protests, and Trumps attacks on athletes.<br><br>Josh Begleys video “Concussion Protocol” can be viewed at <a href="https://theintercept.com/NFL">theintercept.com/NFL</a>.<br><br><br><br><br><br><br>]]>
</itunes:summary>
<itunes:duration>2456</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[53934cc4-0712-11e8-929c-1bcc1b677578]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY3860278286.mp3?updated=1517465594" length="39301120" type="audio/mpeg" />
</item>
<item>
<title>Hate of the Union</title>
<description>Naomi Klein and Jeremy analyze Trumps threats toward North Korea, his Executive Order on Guantanamo and the attack on immigrants, the poor, and the environment. Veteran journalist Juan González dissects the roots of fascism, the rise of authoritarian movements, and global migration trends. Marcy Wheeler gives a brief analysis of a theory floated by a former CIA officer that the “Steele dossier” contains Russian disinformation. Ali Abunimah of Electronic Intifada discusses Israeli collusion with the Trump campaign and Mike Pences trip to Israel. And Franklin James Fisher of the band Algiers talks about their music from "The Underside of Power."</description>
<pubDate>Wed, 31 Jan 2018 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Hate of the Union</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trumps State of the Union speech was a hateful assault. </itunes:subtitle>
<itunes:summary>
<![CDATA[Naomi Klein and Jeremy analyze Trumps threats toward North Korea, his Executive Order on Guantanamo and the attack on immigrants, the poor, and the environment. Veteran journalist Juan González dissects the roots of fascism, the rise of authoritarian movements, and global migration trends. Marcy Wheeler gives a brief analysis of a theory floated by a former CIA officer that the “Steele dossier” contains Russian disinformation. Ali Abunimah of Electronic Intifada discusses Israeli collusion with the Trump campaign and Mike Pences trip to Israel. And Franklin James Fisher of the band Algiers talks about their music from "The Underside of Power."]]>
</itunes:summary>
<itunes:duration>5176</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[366e5f2a-fb38-11e7-847d-3709dcd25861]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY4088394307.mp3?updated=1517420286" length="82820702" type="audio/mpeg" />
</item>
<item>
<title>First They Came For the Immigrants</title>
<description>As Donald Trump forges ahead with his plans for mass deportations and Democrats flail in their response, Ninaj Roul and Yanira Arias describe the plight of hundreds of thousands of people in imminent danger of deportation. Journalist Nick Pinto reveals how ICE agents are staking out churches and homes of immigrant rights activists. Intercept Washington D.C. bureau chief Ryan Grim breaks down a clause slipped into the budget bill that gives the White House authority to fund CIA programs without oversight. We talk to revolutionary musical artist Seun Kuti, son of the legendary Afrobeat pioneer Fela, and hear music from his forthcoming album, Black Times.</description>
<pubDate>Wed, 24 Jan 2018 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>First They Came For the Immigrants</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump promised to go to war against immigrants.</itunes:subtitle>
<itunes:summary>
<![CDATA[As Donald Trump forges ahead with his plans for mass deportations and Democrats flail in their response, Ninaj Roul and Yanira Arias describe the plight of hundreds of thousands of people in imminent danger of deportation. Journalist Nick Pinto reveals how ICE agents are staking out churches and homes of immigrant rights activists. Intercept Washington D.C. bureau chief Ryan Grim breaks down a clause slipped into the budget bill that gives the White House authority to fund CIA programs without oversight. We talk to revolutionary musical artist Seun Kuti, son of the legendary Afrobeat pioneer Fela, and hear music from his forthcoming album, Black Times.]]>
</itunes:summary>
<itunes:duration>5391</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[366970c8-fb38-11e7-847d-5376b55355c7]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY4168280488.mp3" length="86265939" type="audio/mpeg" />
</item>
<item>
<title>BONUS: Leading Marxist Scholar David Harvey on Trump, Wall Street and Debt Peonage</title>
<description>We live in a society that does not study its own history —&amp;nbsp; its unvarnished history — and often current events are analyzed in a vacuum that almost never includes the context or history necessary to understand what is new, what is old and how we got to where we are. As Trump celebrates his first year in office and demonstrations confront a year of his rule, leading Marxist scholar David Harvey sat down for an interview on Intercepted. Harvey is one of the leading Marxist thinkers in the world and a leading authority on Marxs "Das Kapital," which turned 150 years old late last year. Harvey is Distinguished Professor of Anthropology and Geography at the City University of New York.</description>
<pubDate>Sun, 21 Jan 2018 13:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>BONUS: Leading Marxist Scholar David Harvey on Trump, Wall Street and Debt Peonage</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Our full interview with Prof. David Harvey.</itunes:subtitle>
<itunes:summary>
<![CDATA[We live in a society that does not study its own history —&nbsp; its unvarnished history — and often current events are analyzed in a vacuum that almost never includes the context or history necessary to understand what is new, what is old and how we got to where we are. As Trump celebrates his first year in office and demonstrations confront a year of his rule, leading Marxist scholar David Harvey sat down for an interview on Intercepted. Harvey is one of the leading Marxist thinkers in the world and a leading authority on Marxs "Das Kapital," which turned 150 years old late last year. Harvey is Distinguished Professor of Anthropology and Geography at the City University of New York.]]>
</itunes:summary>
<itunes:duration>4868</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[51eff276-fe3b-11e7-bfff-f76c738c2592]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY3569313669.mp3" length="77897142" type="audio/mpeg" />
</item>
<item>
<title>White Mirror</title>
<description>Jeremy lays out the bloody US history in Haiti and El Salvador and blasts the bipartisan, selective amnesia and historical revisionism that “American exceptionalism” demands. Rep. Tulsi Gabbard discusses U.S. regime change, North Korea and why Bernie Sanders would have defeated Trump. As Robert Mueller hits Bannon with a Grand Jury subpoena, former CIA operative and&amp;nbsp; Cipher Brief columnist John Sipher and journalist Marcy Wheeler of Emptywheel analyze the Russia investigation and the Steele dossier. Leading Marxist scholar David Harvey talks about debt peonage in the age of Trump and the crimes of capitalism.</description>
<pubDate>Wed, 17 Jan 2018 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>White Mirror</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump is a racist and the perfect man to represent Americas racist legacy in the countries he called shitholes. </itunes:subtitle>
<itunes:summary>
<![CDATA[Jeremy lays out the bloody US history in Haiti and El Salvador and blasts the bipartisan, selective amnesia and historical revisionism that “American exceptionalism” demands. Rep. Tulsi Gabbard discusses U.S. regime change, North Korea and why Bernie Sanders would have defeated Trump. As Robert Mueller hits Bannon with a Grand Jury subpoena, former CIA operative and&nbsp; Cipher Brief columnist John Sipher and journalist Marcy Wheeler of Emptywheel analyze the Russia investigation and the Steele dossier. Leading Marxist scholar David Harvey talks about debt peonage in the age of Trump and the crimes of capitalism.]]>
</itunes:summary>
<itunes:duration>6409</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[3660ad94-fb38-11e7-847d-436a066985fa]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY1407171456.mp3?updated=1516180736" length="102550465" type="audio/mpeg" />
</item>
<item>
<title>BONUS: All The News Unfit to Print</title>
<description>James Risen is a legend in the world of investigative and national security journalism. As a reporter for the New York Times, Risen broke some of the most important stories of the post 9/11 era, from the warrantless surveillance against Americans conducted under the Bush-Cheney administration, to black prison sites run by the CIA, to failed covert actions in Iran. Risen has won the Pulitzer and other major journalism awards. But perhaps what he is now most famous for is fighting a battle under both the Bush and Obama administrations as they demanded — under threat of imprisonment —the name of one of Risens alleged confidential sources. But it isnt just the government that Risen had to fight. He also battled his own editors and other powerful figures at the New York Times. Risen is now a senior national security correspondent at The Intercept where his incredible inside story has now been published. We talk with Risen about his career at the New York Times in a special edition of Intercepted.</description>
<pubDate>Wed, 03 Jan 2018 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>BONUS: All The News Unfit to Print</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>James Risen on His Battles with Bush, Obama, and the New York Times</itunes:subtitle>
<itunes:summary>
<![CDATA[James Risen is a legend in the world of investigative and national security journalism. As a reporter for the New York Times, Risen broke some of the most important stories of the post 9/11 era, from the warrantless surveillance against Americans conducted under the Bush-Cheney administration, to black prison sites run by the CIA, to failed covert actions in Iran. Risen has won the Pulitzer and other major journalism awards. But perhaps what he is now most famous for is fighting a battle under both the Bush and Obama administrations as they demanded — under threat of imprisonment —the name of one of Risens alleged confidential sources. But it isnt just the government that Risen had to fight. He also battled his own editors and other powerful figures at the New York Times. Risen is now a senior national security correspondent at The Intercept where his incredible inside story has now been published. We talk with Risen about his career at the New York Times in a special edition of Intercepted.]]>
</itunes:summary>
<itunes:duration>3805</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[6bdd6660-f039-11e7-acba-33ffde0bb3cc]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY1217453507.mp3" length="60884950" type="audio/mpeg" />
</item>
<item>
<title>Full Metal Jackass</title>
<description>Former Nixon White House counsel John Dean talks about the Mueller investigation, how the CIA may benefit from Trumps presidency and how Trump stacks up to Nixon and Reagan. Pentagon Papers whistleblower Daniel Ellsberg talks about the classified secrets he has kept for decades. He has just published his story in a new book, The Doomsday Machine. Field of Vision takes us inside the very strange world of Steve Bannons films. Patterson Hood of the band Drive-By Truckers performs.</description>
<pubDate>Wed, 13 Dec 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Full Metal Jackass</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Former Nixon Lawyer John Dean and Daniel Ellsberg Analyze the Trump Moment</itunes:subtitle>
<itunes:summary>
<![CDATA[Former Nixon White House counsel John Dean talks about the Mueller investigation, how the CIA may benefit from Trumps presidency and how Trump stacks up to Nixon and Reagan. Pentagon Papers whistleblower Daniel Ellsberg talks about the classified secrets he has kept for decades. He has just published his story in a new book, The Doomsday Machine. Field of Vision takes us inside the very strange world of Steve Bannons films. Patterson Hood of the band Drive-By Truckers performs.]]>
</itunes:summary>
<itunes:duration>5670</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bb062002-9d9f-11e7-b8c4-9701f8d8d38e]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY9016904056.mp3" length="90720966" type="audio/mpeg" />
</item>
<item>
<title>Who's Afraid of the Alt-Deep State?</title>
<description>Matthew Cole joins Jeremy for a discussion about their explosive report in The Intercept that Blackwater founder Erik Prince has been pitching a private spy operation to the White House and CIA. Activist and comedian Randy Credico, who has been hit with a subpoena from the House Intelligence Committee investigating Trump and Russia, joins us.&amp;nbsp; Journalist Barrett Brown talks about the FBIs campaign against him and offers a critique of Wikileaks. Singer Amanda Palmer talks about her provocative new video for a cover she did of Pink Floyds “Mother."</description>
<pubDate>Wed, 06 Dec 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Who's Afraid of the Alt-Deep State?</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump wants to make 1980s Reagan-era covert wars great again.</itunes:subtitle>
<itunes:summary>
<![CDATA[Matthew Cole joins Jeremy for a discussion about their explosive report in The Intercept that Blackwater founder Erik Prince has been pitching a private spy operation to the White House and CIA. Activist and comedian Randy Credico, who has been hit with a subpoena from the House Intelligence Committee investigating Trump and Russia, joins us.&nbsp; Journalist Barrett Brown talks about the FBIs campaign against him and offers a critique of Wikileaks. Singer Amanda Palmer talks about her provocative new video for a cover she did of Pink Floyds “Mother."]]>
</itunes:summary>
<itunes:duration>6260</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bafb58fc-9d9f-11e7-b8c4-070c14a1debb]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY9210981870.mp3" length="100160574" type="audio/mpeg" />
</item>
<item>
<title>Very Bad Men</title>
<description>This week on Intercepted: Sen. Chris Murphy blasts the US government for its role in the destruction of Yemen. Jeremy tears apart Thomas Friedmans gross love letter to the Saudi Crown Prince and talks about the bi-partisan war against journalism from Bill Clinton to Donald Trump. The Intercepts Betsy Reed and Buzzfeeds Katie Baker analyze this unprecedented public fight against sexual assaulters. Analysis from Harare, Zimbabwe on the ouster of Robert Mugabe. Comedian Joe Para performs a dramatic reenactment of a secret Snowden document.</description>
<pubDate>Wed, 29 Nov 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Very Bad Men</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Trump, the Saudi Crown Prince, Sexual Assaulters, and Robert Mugabe</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted: Sen. Chris Murphy blasts the US government for its role in the destruction of Yemen. Jeremy tears apart Thomas Friedmans gross love letter to the Saudi Crown Prince and talks about the bi-partisan war against journalism from Bill Clinton to Donald Trump. The Intercepts Betsy Reed and Buzzfeeds Katie Baker analyze this unprecedented public fight against sexual assaulters. Analysis from Harare, Zimbabwe on the ouster of Robert Mugabe. Comedian Joe Para performs a dramatic reenactment of a secret Snowden document.]]>
</itunes:summary>
<itunes:duration>5565</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[baf3e644-9d9f-11e7-b8c4-9f5a004c8b47]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY5979450332.mp3?updated=1511943682" length="89042024" type="audio/mpeg" />
</item>
<item>
<title>The Distraction in Chief</title>
<description>This week on Intercepted: Rami Khouri breaks down the Saudi agenda in the Middle East, its destruction of Yemen and the bizarre case of the exiled Lebanese prime minister. Aram Roston of Buzzfeed, Spencer Ackerman of the Daily Beast, and The Intercepts Matthew Cole join Jeremy for a discussion on the mysterious death of a Green Beret in Mali and why the CIA and US military are quite content with the Trump presidency. Wikileaks slid into Donald Trump Jr.s DMs. Intercept co-founder Glenn Greenwald analyzes what the messages say and how the media covered the story. And we talk to two newly elected Democrats in Virginia: Lee Carter and Elizabeth Guzman. Donald Trump stars in American Beauty.</description>
<pubDate>Wed, 15 Nov 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>The Distraction in Chief</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>While the media overwhelmingly focuses on Trump and Russia, Yemen is dying, covert ops are spreading and war is raging.</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted: Rami Khouri breaks down the Saudi agenda in the Middle East, its destruction of Yemen and the bizarre case of the exiled Lebanese prime minister. Aram Roston of Buzzfeed, Spencer Ackerman of the Daily Beast, and The Intercepts Matthew Cole join Jeremy for a discussion on the mysterious death of a Green Beret in Mali and why the CIA and US military are quite content with the Trump presidency. Wikileaks slid into Donald Trump Jr.s DMs. Intercept co-founder Glenn Greenwald analyzes what the messages say and how the media covered the story. And we talk to two newly elected Democrats in Virginia: Lee Carter and Elizabeth Guzman. Donald Trump stars in American Beauty.]]>
</itunes:summary>
<itunes:duration>5716</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[baec6cf2-9d9f-11e7-b8c4-832adc6b044a]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY5077597385.mp3" length="91468695" type="audio/mpeg" />
</item>
<item>
<title>Say Hello to My Little Hands</title>
<description>This week on Intercepted: Rep. Ro Khanna calls for a complete end to all U.S. military assistance to Saudi Arabia and the&amp;nbsp; catastrophe in Yemen. The former chief prosecutor at Guantanamo, Col. Morris Davis, blasts Trump over his interference in the case of Army Sergeant Bowe Bergdahl and the recent terror attack in New York. And as the Paradise Papers rock the world of the rich who use offshore banks and law firms, we get analysis from Nomi Prins.</description>
<pubDate>Wed, 08 Nov 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Say Hello to My Little Hands</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>True (War) Crimes of the Rich and Infamous</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted: Rep. Ro Khanna calls for a complete end to all U.S. military assistance to Saudi Arabia and the&nbsp; catastrophe in Yemen. The former chief prosecutor at Guantanamo, Col. Morris Davis, blasts Trump over his interference in the case of Army Sergeant Bowe Bergdahl and the recent terror attack in New York. And as the Paradise Papers rock the world of the rich who use offshore banks and law firms, we get analysis from Nomi Prins.]]>
</itunes:summary>
<itunes:duration>5476</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bae4af26-9d9f-11e7-b8c4-d7bd1cbbac44]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY3384065210.mp3" length="87615947" type="audio/mpeg" />
</item>
<item>
<title>Criminal Indictments at Home, Secret Wars Abroad</title>
<description>This week on Intercepted: New York Times reporter Charlie Savage and former federal prosecutor Ken White of Popehat break down the recent indictment and plea deal and what it may mean for Trump. Investigative journalist Nick Turse and Kenya scholar Samar Al-Bulushi take us into the world of US militarism in Africa: secret drone bases, US commandos and Washington-backed African forces operating under the guise of the “war on terror.” Musician Roberto Lange of Helado Negro performs.</description>
<pubDate>Wed, 01 Nov 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Criminal Indictments at Home, Secret Wars Abroad</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Robert Muellers investigation intensifies as Trump grants the CIA and military new kill powers.</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted: New York Times reporter Charlie Savage and former federal prosecutor Ken White of Popehat break down the recent indictment and plea deal and what it may mean for Trump. Investigative journalist Nick Turse and Kenya scholar Samar Al-Bulushi take us into the world of US militarism in Africa: secret drone bases, US commandos and Washington-backed African forces operating under the guise of the “war on terror.” Musician Roberto Lange of Helado Negro performs.]]>
</itunes:summary>
<itunes:duration>4504</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[badd1b62-9d9f-11e7-b8c4-bb0a3510ea9d]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY9002073032.mp3" length="72073299" type="audio/mpeg" />
</item>
<item>
<title>Mike Pence is The Koch Brothers' Manchurian Candidate</title>
<description>This week on Intercepted: Investigative journalist Jane Mayer exposes the Koch Brother puppet masters behind Vice President Mike Pences rise to power and the ruthless pursuit of corporate profits that put Pence a heartbeat from the presidency.We speak to Chinese dissident and renown artist Ai Weiwei about the humanitarian catastrophe of the 65 million globally displaced migrants and his new documentary, Human Flow. And we end with Deerhoof's Greg Saunier on the songs of “Mountain Moves.”</description>
<pubDate>Wed, 25 Oct 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Mike Pence is The Koch Brothers' Manchurian Candidate</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>The ruthless pursuit of corporate profits is a heartbeat from the presidency.</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted: Investigative journalist Jane Mayer exposes the Koch Brother puppet masters behind Vice President Mike Pences rise to power and the ruthless pursuit of corporate profits that put Pence a heartbeat from the presidency.We speak to Chinese dissident and renown artist Ai Weiwei about the humanitarian catastrophe of the 65 million globally displaced migrants and his new documentary, Human Flow. And we end with Deerhoof's Greg Saunier on the songs of “Mountain Moves.”]]>
</itunes:summary>
<itunes:duration>4458</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bad56944-9d9f-11e7-b8c4-036f3898314a]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY6525793662.mp3?updated=1508912939" length="71329332" type="audio/mpeg" />
</item>
<item>
<title>Canada is Racist Too</title>
<description>This week on Intercepted live from Toronto: A recent poll puts activist Desmond Cole in prime position to win the mayorship. We talk to him about Canadas stop and frisk and how Cole would change Toronto. Journalist Naomi Klein warns that the Trudeau and Trump brands may have more in common than expected. And returning Iraqi-Canadian hip-hop artist Narcy gives a powerful live performance.&lt;br&gt;&lt;br&gt;Become a sustaining member! Go to &lt;a href="https://theintercept.com/join"&gt;theintercept.com/join&lt;/a&gt; for more.</description>
<pubDate>Wed, 18 Oct 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Canada is Racist Too</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Could a young, radical black activist be the next mayor of Toronto?</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted live from Toronto: A recent poll puts activist Desmond Cole in prime position to win the mayorship. We talk to him about Canadas stop and frisk and how Cole would change Toronto. Journalist Naomi Klein warns that the Trudeau and Trump brands may have more in common than expected. And returning Iraqi-Canadian hip-hop artist Narcy gives a powerful live performance.<br><br>Become a sustaining member! Go to <a href="https://theintercept.com/join">theintercept.com/join</a> for more.]]>
</itunes:summary>
<itunes:duration>4613</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bacdc1bc-9d9f-11e7-b8c4-bf06486207e8]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY1212140419.mp3" length="73809084" type="audio/mpeg" />
</item>
<item>
<title>The White Stuff</title>
<description>Trump sent Mike Pence on a mission to protest black protesters at an NFL game. Acclaimed author and journalist Ta-Nehisi Coates talks about Trump, Obama, Bernie Sanders, Hillary Clinton, the NFL and much more. Mehrsa Baradaran breaks down the roots of economic apartheid in the US, the ongoing impact of slavery on black communities and offers a provocative history of black banks. And the lead singer of Mashrou Leila, Hamed Sinno, talks about being queer and Arab in the Middle East and Trumps America.</description>
<pubDate>Wed, 11 Oct 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>The White Stuff</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Ta-Nehisi Coates talks about Trump, Obama, Bernie Sanders, Hillary Clinton, the NFL and much more.</itunes:subtitle>
<itunes:summary>
<![CDATA[Trump sent Mike Pence on a mission to protest black protesters at an NFL game. Acclaimed author and journalist Ta-Nehisi Coates talks about Trump, Obama, Bernie Sanders, Hillary Clinton, the NFL and much more. Mehrsa Baradaran breaks down the roots of economic apartheid in the US, the ongoing impact of slavery on black communities and offers a provocative history of black banks. And the lead singer of Mashrou Leila, Hamed Sinno, talks about being queer and Arab in the Middle East and Trumps America.]]>
</itunes:summary>
<itunes:duration>5664</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bac62452-9d9f-11e7-b8c4-17ec33943c11]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY7057322394.mp3?updated=1507702418" length="90635702" type="audio/mpeg" />
</item>
<item>
<title>Guns Before Country</title>
<description>This week, Jeremy talks about the Coalition of the Killing — gun lobbyists, politicians and weapons manufacturers — the only beneficiaries of the massacre in Las Vegas. Alynda Segarra of the band Hurray for the Riff Raff explores her Puerto Rican roots and performs new songs. Former US Army Ranger Rory Fanning talks about his slain comrade, NFL star-turned soldier Pat Tillman. Historian Jeanne Theoharis shreds the sanitizing of the legacies of Martin Luther King Jr. and Rosa Parks. And Donald Trump takes his love of guns into the Twilight Zone.&lt;br&gt;&lt;br&gt;Support our show — become a member!&amp;nbsp; &lt;a href="http://theintercept.com/join"&gt;theintercept.com/join&lt;/a&gt;&lt;br&gt;&lt;br&gt;Panoply's podcast listener survey: &lt;a href="http://survey.panoply.fm"&gt;survey.panoply.fm&lt;/a&gt;</description>
<pubDate>Wed, 04 Oct 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>Guns Before Country</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Lobbyists, politicians and weapons manufacturers are the only beneficiaries of the massacre in Las Vegas. </itunes:subtitle>
<itunes:summary>
<![CDATA[This week, Jeremy talks about the Coalition of the Killing — gun lobbyists, politicians and weapons manufacturers — the only beneficiaries of the massacre in Las Vegas. Alynda Segarra of the band Hurray for the Riff Raff explores her Puerto Rican roots and performs new songs. Former US Army Ranger Rory Fanning talks about his slain comrade, NFL star-turned soldier Pat Tillman. Historian Jeanne Theoharis shreds the sanitizing of the legacies of Martin Luther King Jr. and Rosa Parks. And Donald Trump takes his love of guns into the Twilight Zone.<br><br>Support our show — become a member!&nbsp; <a href="http://theintercept.com/join">theintercept.com/join</a><br><br>Panoply's podcast listener survey: <a href="http://survey.panoply.fm">survey.panoply.fm</a>]]>
</itunes:summary>
<itunes:duration>4763</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[babd79c4-9d9f-11e7-b8c4-bfa2bf7b2870]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY1463981678.mp3" length="76216529" type="audio/mpeg" />
</item>
<item>
<title>For Whom the Trump Trolls</title>
<description>This week on Intercepted, physicist David Wright from the Union of Concerned Scientists explains how easy it would be for Trump to launch a nuclear strike. Professor James Fernandez of NYU talks about the Abraham Lincoln Brigade, the 3,000 Americans who tried to stop fascism before it spread in Europe. We speak with the directors of a haunting new film about a terror attack in an Israeli bus station that leads to the brutal mob killing of an innocent Eritrean immigrant. And Donald Trump gets a visit from the two Bobs in his Office Space.</description>
<pubDate>Wed, 27 Sep 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>For Whom the Trump Trolls</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>What the Abraham Lincoln Brigade can teach us about fighting fascism in the 21st century.</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted, physicist David Wright from the Union of Concerned Scientists explains how easy it would be for Trump to launch a nuclear strike. Professor James Fernandez of NYU talks about the Abraham Lincoln Brigade, the 3,000 Americans who tried to stop fascism before it spread in Europe. We speak with the directors of a haunting new film about a terror attack in an Israeli bus station that leads to the brutal mob killing of an innocent Eritrean immigrant. And Donald Trump gets a visit from the two Bobs in his Office Space.]]>
</itunes:summary>
<itunes:duration>4754</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[bab3035e-9d9f-11e7-b8c4-a723efdad05b]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY7212168126.mp3?updated=1506529903" length="76071497" type="audio/mpeg" />
</item>
<item>
<title>'Merican Psycho</title>
<description>Jeremy analyzes Trumps belligerent UN speech and the massive military budget the Democrats just gave him. Journalist Gary Rivlin takes us deep inside the world of the Goldman Sachs executives now working for Trump. Poet Aja Monet performs. The Intercepts Alice Speri investigates the militarization of police and how Israel is training American cops. Plus, Donald Trump stars in American Psycho.</description>
<pubDate>Wed, 20 Sep 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>'Merican Psycho</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump visits the UN and returns some videotapes.</itunes:subtitle>
<itunes:summary>
<![CDATA[Jeremy analyzes Trumps belligerent UN speech and the massive military budget the Democrats just gave him. Journalist Gary Rivlin takes us deep inside the world of the Goldman Sachs executives now working for Trump. Poet Aja Monet performs. The Intercepts Alice Speri investigates the militarization of police and how Israel is training American cops. Plus, Donald Trump stars in American Psycho.]]>
</itunes:summary>
<itunes:duration>4370</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[baa7cb06-9d9f-11e7-b8c4-d7ae2711974f]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY8078356160.mp3" length="69924570" type="audio/mpeg" />
</item>
<item>
<title>The Super Bowl of Racism</title>
<description>NSA whistleblower Edward Snowden discusses the massive Equifax data breach and allegations of Russian interference in the US election. Commentator Shaun King explains his call for a boycott of the NFL and talks about his campaign to bring violent neo-Nazis to justice. Rapper Open Mike Eagle performs.</description>
<pubDate>Wed, 13 Sep 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:title>The Super Bowl of Racism</itunes:title>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump loves him some beauty pageants. But he probably wasnt so hot on this years Miss Texas who called him out on neo-Nazi violence.</itunes:subtitle>
<itunes:summary>
<![CDATA[NSA whistleblower Edward Snowden discusses the massive Equifax data breach and allegations of Russian interference in the US election. Commentator Shaun King explains his call for a boycott of the NFL and talks about his campaign to bring violent neo-Nazis to justice. Rapper Open Mike Eagle performs.]]>
</itunes:summary>
<itunes:duration>4171</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[7df4070a-9832-11e7-adac-cb37b05d5e24]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY6458293736.mp3" length="66738886" type="audio/mpeg" />
</item>
<item>
<title>Atlas Golfed — U.S.-Backed Think Tanks Target Latin America</title>
<description>This week on Intercepted: Jeremy gives an update on the aftermath of Blackwaters 2007 massacre of Iraqi civilians. Intercept reporter Lee Fang lays out how a network of libertarian think tanks called the Atlas Network is insidiously shaping political infrastructure in Latin America. We speak with attorney and former Hugo Chavez adviser Eva Golinger about the Venezuela's political turmoil.And we hear Claudia Lizardo of the Caracas-based band, La Pequeña Revancha, talk about her music and hopes for Venezuela.</description>
<pubDate>Wed, 09 Aug 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump is on his version of a staycation, chilling at his golf course resort in New Jersey and watching FOX News or tweeting non-stop — when hes not golfing or threatening nuclear war.</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted: Jeremy gives an update on the aftermath of Blackwaters 2007 massacre of Iraqi civilians. Intercept reporter Lee Fang lays out how a network of libertarian think tanks called the Atlas Network is insidiously shaping political infrastructure in Latin America. We speak with attorney and former Hugo Chavez adviser Eva Golinger about the Venezuela's political turmoil.And we hear Claudia Lizardo of the Caracas-based band, La Pequeña Revancha, talk about her music and hopes for Venezuela.]]>
</itunes:summary>
<itunes:duration>4415</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[7c207a24-e33f-11e6-9438-eb45dcf36a1d]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL5331443769.mp3" length="67527575" type="audio/mpeg" />
</item>
<item>
<title>Pyongyang and the White House Gang</title>
<description>News from the White House this week has been like a twisted mash up of Here Comes Honey Boo Boo, Macbeth, Project Runway and a Mr. Bean movie. Dime-store Sopranos reject Anthony Scaramucci was fired after just 10 days as White House communications director. Reince Priebus is out as chief of staff, Gen. John Kelly is in. And with spiking tensions between the United States and North Korea, we reflect on the history of the region. Plus, The Intercepts Naomi Klein talks to U.K. Labour Party leader Jeremy Corbyn about the lessons the Democratic Party could learn from Corbyns unexpected electoral success.</description>
<pubDate>Wed, 02 Aug 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>With spiking tensions between the U.S. and North Korea, we reflect on the history of the region. And The Intercepts Naomi Klein talks to U.K. Labour Party leader Jeremy Corbyn.</itunes:subtitle>
<itunes:summary>
<![CDATA[News from the White House this week has been like a twisted mash up of Here Comes Honey Boo Boo, Macbeth, Project Runway and a Mr. Bean movie. Dime-store Sopranos reject Anthony Scaramucci was fired after just 10 days as White House communications director. Reince Priebus is out as chief of staff, Gen. John Kelly is in. And with spiking tensions between the United States and North Korea, we reflect on the history of the region. Plus, The Intercepts Naomi Klein talks to U.K. Labour Party leader Jeremy Corbyn about the lessons the Democratic Party could learn from Corbyns unexpected electoral success.]]>
</itunes:summary>
<itunes:duration>3712</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[5850753c-dcf9-11e6-a5a2-a7df163d0693]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL4502761802.mp3" length="56280711" type="audio/mpeg" />
</item>
<item>
<title>Glenn Greenwald on the New Cold War</title>
<description>With all the constant hype about Russia, youd think we were living in a new Cold War. This week on Intercepted: Glenn Greenwald fills in for Jeremy Scahill, and we take a deep dive into the origins and evolution of the Trump-Russia story. Fox News' Tucker Carlson and Glenn find something they can actually agree on (the Democratic establishments Russia hysteria), but diverge on Tuckers coverage of immigration and crime. Russian-American writer Masha Gessen explains how conspiracy thinking is a mirror of the leaders we put in power.</description>
<pubDate>Wed, 26 Jul 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>With all the constant hype about Russia, youd think we were living in a new Cold War.</itunes:subtitle>
<itunes:summary>
<![CDATA[With all the constant hype about Russia, youd think we were living in a new Cold War. This week on Intercepted: Glenn Greenwald fills in for Jeremy Scahill, and we take a deep dive into the origins and evolution of the Trump-Russia story. Fox News' Tucker Carlson and Glenn find something they can actually agree on (the Democratic establishments Russia hysteria), but diverge on Tuckers coverage of immigration and crime. Russian-American writer Masha Gessen explains how conspiracy thinking is a mirror of the leaders we put in power.]]>
</itunes:summary>
<itunes:duration>3565</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[584711b8-dcf9-11e6-a5a2-d7a378461c40]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL8633314507.mp3" length="53935124" type="audio/mpeg" />
</item>
<item>
<title>Veni, Vidi, Tweeti</title>
<description>Donald Trump enjoyed playing fireman and asking where the fire is. Hint: all around you, Mr. President. This week on Intercepted: the famed rebel academic, Alfred McCoy, whose book on narcotrafficking the CIA tried to stop from being published, lays out his meticulously argued theory that the U.S. empire will fall by the year 2030. The Washington Posts media columnist, Margaret Sullivan, talks about Trump ratcheting up the war on whistleblowers and the existence of a free press.</description>
<pubDate>Wed, 19 Jul 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump enjoyed playing fireman and asking where the fire is. Hint: all around you, Mr. President.</itunes:subtitle>
<itunes:summary>
<![CDATA[Donald Trump enjoyed playing fireman and asking where the fire is. Hint: all around you, Mr. President. This week on Intercepted: the famed rebel academic, Alfred McCoy, whose book on narcotrafficking the CIA tried to stop from being published, lays out his meticulously argued theory that the U.S. empire will fall by the year 2030. The Washington Posts media columnist, Margaret Sullivan, talks about Trump ratcheting up the war on whistleblowers and the existence of a free press.]]>
</itunes:summary>
<itunes:duration>4146</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[583dc8f6-dcf9-11e6-a5a2-97233491f3c8]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL4964577496.mp3" length="63216744" type="audio/mpeg" />
</item>
<item>
<title>Dumb, Dumber and Don Jr.</title>
<description>This week on Intercepted: Don Jr. is in the shit throne over a secret meeting he had with a Russian lawyer. Could this be, as many in the media are claiming, the smoking gun of Russia collusion? Intercept co-founder Glenn Greenwald weighs in and debunks a forged NSA document sent to Rachel Maddow. Intercept reporters Alice Speri and Alleen Brown talk about the shadowy mercenary company TigerSwan. We also hear music from Victoria Ruiz of the punk band Downtown Boys.</description>
<pubDate>Wed, 12 Jul 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>The old adage that the cover-up is worse than the crime seems like it was tailored specifically for Donald Trump and his merry band of imbeciles, ideological zealots, and…family members.</itunes:subtitle>
<itunes:summary>
<![CDATA[This week on Intercepted: Don Jr. is in the shit throne over a secret meeting he had with a Russian lawyer. Could this be, as many in the media are claiming, the smoking gun of Russia collusion? Intercept co-founder Glenn Greenwald weighs in and debunks a forged NSA document sent to Rachel Maddow. Intercept reporters Alice Speri and Alleen Brown talk about the shadowy mercenary company TigerSwan. We also hear music from Victoria Ruiz of the punk band Downtown Boys.]]>
</itunes:summary>
<itunes:duration>4059</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[5834b428-dcf9-11e6-a5a2-f7aca16eec6e]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL5169968320.mp3" length="61824940" type="audio/mpeg" />
</item>
<item>
<title>The House of Trump</title>
<description>President Trump said when it comes to health insurance, he would cover everyone. He lied. Meanwhile the Crown Prince of America, Jared Kushner, and Mohammed Bin Salman, Crown Prince of Saudi Arabia, play house with foreign policy. This week: Al Jazeeras Mehdi Hasan fills in for Jeremy Scahill. Intercept reporter Murtaza Hussain and journalist Rula Jebreal discuss the global consequences of the House of Trumps meddling in the Middle East. Historian Tom Holland joins Mehdi for a debate on the role of Islam within the Islamic State. Plus, actor Bill Camp reprises his role as the “SIGINT Philosopher.”</description>
<pubDate>Wed, 28 Jun 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>The royal family of the United States takes some heat as the fate of American healthcare hangs on a few votes. </itunes:subtitle>
<itunes:summary>
<![CDATA[President Trump said when it comes to health insurance, he would cover everyone. He lied. Meanwhile the Crown Prince of America, Jared Kushner, and Mohammed Bin Salman, Crown Prince of Saudi Arabia, play house with foreign policy. This week: Al Jazeeras Mehdi Hasan fills in for Jeremy Scahill. Intercept reporter Murtaza Hussain and journalist Rula Jebreal discuss the global consequences of the House of Trumps meddling in the Middle East. Historian Tom Holland joins Mehdi for a debate on the role of Islam within the Islamic State. Plus, actor Bill Camp reprises his role as the “SIGINT Philosopher.”]]>
</itunes:summary>
<itunes:duration>3597</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[5825189c-dcf9-11e6-a5a2-3765693ebff5]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL5926659703.mp3" length="54443781" type="audio/mpeg" />
</item>
<item>
<title>Dispatch from the Dirtbag Left</title>
<description>While all eyes in Washington remain focused on the Russia investigation, a Republican firm forgot to secure its invasive personal data on 198 million American voters. This week on Intercepted: We speak to radical librarian Alison Macrina of the Library Freedom Project about the fight against digital surveillance. Sam Biddle gives an update on attacks on U.S. voting systems. And, we speak with one of the rising stars of the “dirtbag left,” Felix Biederman of Chapo Trap House.</description>
<pubDate>Wed, 21 Jun 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Why #resistance Twitter, establishment Democrats and neocon apologists are not leftists.</itunes:subtitle>
<itunes:summary>
<![CDATA[While all eyes in Washington remain focused on the Russia investigation, a Republican firm forgot to secure its invasive personal data on 198 million American voters. This week on Intercepted: We speak to radical librarian Alison Macrina of the Library Freedom Project about the fight against digital surveillance. Sam Biddle gives an update on attacks on U.S. voting systems. And, we speak with one of the rising stars of the “dirtbag left,” Felix Biederman of Chapo Trap House.]]>
</itunes:summary>
<itunes:duration>3540</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[581dd44c-dcf9-11e6-a5a2-03edebf2031b]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL7980248897.mp3" length="53535555" type="audio/mpeg" />
</item>
<item>
<title>The Trump Mixtape — Dantes Inferno meets Disco Inferno</title>
<description>Donald Trump has a great affinity for strongmen and for unquestioned loyalty of those who work for him. This week on Intercepted: Trumps besties in Saudi Arabia convinced him that Qatar is the premiere Arab nation sponsoring terrorism. Amnesty Internationals Sherine Tadros and al Jazeeras Mehdi Hasan analyze the hypocrisy-laden, bizarre crisis. Jeremy discusses the prosecution of an alleged NSA leaker. MSNBCs Chris Hayes talks Russia, Trump, the media and his new book A Colony in a Nation. DJ Spooky imagines a Trump-inspired mash-up of Dantes Inferno and Disco Inferno.</description>
<pubDate>Wed, 14 Jun 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump has made crystal clear that he has a great affinity for strongmen and for unquestioned loyalty of those who work for him. </itunes:subtitle>
<itunes:summary>
<![CDATA[Donald Trump has a great affinity for strongmen and for unquestioned loyalty of those who work for him. This week on Intercepted: Trumps besties in Saudi Arabia convinced him that Qatar is the premiere Arab nation sponsoring terrorism. Amnesty Internationals Sherine Tadros and al Jazeeras Mehdi Hasan analyze the hypocrisy-laden, bizarre crisis. Jeremy discusses the prosecution of an alleged NSA leaker. MSNBCs Chris Hayes talks Russia, Trump, the media and his new book A Colony in a Nation. DJ Spooky imagines a Trump-inspired mash-up of Dantes Inferno and Disco Inferno.]]>
</itunes:summary>
<itunes:duration>4346</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[5815ed86-dcf9-11e6-a5a2-ab3d4ad4b944]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL2441335022.mp3?updated=1497422014" length="66430432" type="audio/mpeg" />
</item>
<item>
<title>The Woman Democrats Love to Hate</title>
<description>The Green Partys Jill Stein has been widely attacked by Democrats simply for running for president. Some blame her for Hillary Clintons loss. This week, Stein strikes back at her critics and reveals the story behind the infamous Moscow dinner where she was seated with Vladimir Putin and Gen. Michael Flynn. The Intercepts DC bureau chief Ryan Grim digs into the contents of a newly published top secret NSA document outlining alleged Russian cyberattacks against software companies that service U.S. elections. And singer-songwriter Damien Jurado performs.</description>
<pubDate>Wed, 07 Jun 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Jill Stein has been widely attacked by Democrats simply for running for president. </itunes:subtitle>
<itunes:summary>
<![CDATA[The Green Partys Jill Stein has been widely attacked by Democrats simply for running for president. Some blame her for Hillary Clintons loss. This week, Stein strikes back at her critics and reveals the story behind the infamous Moscow dinner where she was seated with Vladimir Putin and Gen. Michael Flynn. The Intercepts DC bureau chief Ryan Grim digs into the contents of a newly published top secret NSA document outlining alleged Russian cyberattacks against software companies that service U.S. elections. And singer-songwriter Damien Jurado performs.]]>
</itunes:summary>
<itunes:duration>3693</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[580e21d2-dcf9-11e6-a5a2-53fae963a8d5]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL5889277506.mp3?updated=1496817965" length="55977273" type="audio/mpeg" />
</item>
<item>
<title>There's Something About Jared</title>
<description>This week, the scandal spotlight shines on Trumps influential (and strangely quiet) son-in-law. We talk to national security correspondent Spencer Ackerman of The Daily Beast about Jared Kushners alleged meetings with Russian officials to establish back channel communications. Organizer and scholar Mariame Kaba offers a peoples history of prisons in the US and the politicians—both Democrats and Republicans—who have made them what they are today. And we hear an incredible rendition of “The Partisan” from composers and musicians Leo Heiblum of Mexico and Tenzin Choegyal of Tibet.&amp;nbsp;</description>
<pubDate>Wed, 31 May 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Jared Kushner is sort of like Donald Trumps less savvy version of Don Corleones consigliere. But did he make the Russians an offer they couldnt refuse?</itunes:subtitle>
<itunes:summary>
<![CDATA[This week, the scandal spotlight shines on Trumps influential (and strangely quiet) son-in-law. We talk to national security correspondent Spencer Ackerman of The Daily Beast about Jared Kushners alleged meetings with Russian officials to establish back channel communications. Organizer and scholar Mariame Kaba offers a peoples history of prisons in the US and the politicians—both Democrats and Republicans—who have made them what they are today. And we hear an incredible rendition of “The Partisan” from composers and musicians Leo Heiblum of Mexico and Tenzin Choegyal of Tibet.&nbsp;]]>
</itunes:summary>
<itunes:duration>3762</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[5807254e-dcf9-11e6-a5a2-cb45327dca79]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL3830941587.mp3" length="57086537" type="audio/mpeg" />
</item>
<item>
<title>Donald Trump and his League of Extraordinary Despots</title>
<description>This week, Donald Trump stood in a sea of tyrants and joined in a bizarre group petting of a glowing white orb. Professor Asad AbuKhalil dissects Trumps summit in Saudi Arabia and the role Trumps friends in the Middle East play in fueling such horrors as the attack on Manchester. The Intercepts new DC bureau chief, Ryan Grim, and national security reporter Matthew Cole discuss Gen. Michael Flynn and whether anyone in the Trump administration realizes how insane their boss is. And Steve Earle performs live.</description>
<pubDate>Wed, 24 May 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>This week, Donald Trump stood in a sea of tyrants and joined in a bizarre group petting of a glowing white orb.</itunes:subtitle>
<itunes:summary>
<![CDATA[This week, Donald Trump stood in a sea of tyrants and joined in a bizarre group petting of a glowing white orb. Professor Asad AbuKhalil dissects Trumps summit in Saudi Arabia and the role Trumps friends in the Middle East play in fueling such horrors as the attack on Manchester. The Intercepts new DC bureau chief, Ryan Grim, and national security reporter Matthew Cole discuss Gen. Michael Flynn and whether anyone in the Trump administration realizes how insane their boss is. And Steve Earle performs live.]]>
</itunes:summary>
<itunes:duration>4198</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57ffd3e8-dcf9-11e6-a5a2-17ed73ff2f09]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL3575958410.mp3" length="64048065" type="audio/mpeg" />
</item>
<item>
<title>Donald and the Terrible, Horrible, No Good, Very Bad Presidency</title>
<description>Donald Trump is spectacularly bad at being president. This week on Intercepted, investigative journalist Marcy Wheeler and The Intercepts Glenn Greenwald analyze the latest insanity emanating from the White House. Pulitzer Prize-winning journalist Tim Weiner and Intercept writer Trevor Aaronson discuss the firing of James Comey and debate his FBI legacy. And Palestinian author and journalist Rula Jebreal explains why President Trump is going to Saudi Arabia and Israel on his first international trip.</description>
<pubDate>Wed, 17 May 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump is spectacularly bad at being president. </itunes:subtitle>
<itunes:summary>
<![CDATA[Donald Trump is spectacularly bad at being president. This week on Intercepted, investigative journalist Marcy Wheeler and The Intercepts Glenn Greenwald analyze the latest insanity emanating from the White House. Pulitzer Prize-winning journalist Tim Weiner and Intercept writer Trevor Aaronson discuss the firing of James Comey and debate his FBI legacy. And Palestinian author and journalist Rula Jebreal explains why President Trump is going to Saudi Arabia and Israel on his first international trip.]]>
</itunes:summary>
<itunes:duration>3861</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57f826de-dcf9-11e6-a5a2-ff41a0b1698e]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL3660243774.mp3" length="58666422" type="audio/mpeg" />
</item>
<item>
<title>James Comey, Chelsea Manning and the secrets America keeps</title>
<description>Donald Trumps complicated relationship with FBI Director James Comey came to a shocking conclusion in Tuesday nights episode of American shitshow. Glenn Greenwald analyzes Comeys firing. Next week, Chelsea Manning will be freed from prison. We hear exclusive audio from her trial and talk to journalist Alexa OBrien. And French civil liberties activist Yasser Louati says despite her defeat in the presidential election, many of Marine Le Pens ideas are already embedded in mainstream French politics. And a premiere track from hip-hop artists MC Sole and DJ Pain 1.</description>
<pubDate>Wed, 10 May 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trumps complicated relationship with FBI Director James Comey came to a shocking conclusion in Tuesday nights episode of American shitshow.</itunes:subtitle>
<itunes:summary>
<![CDATA[Donald Trumps complicated relationship with FBI Director James Comey came to a shocking conclusion in Tuesday nights episode of American shitshow. Glenn Greenwald analyzes Comeys firing. Next week, Chelsea Manning will be freed from prison. We hear exclusive audio from her trial and talk to journalist Alexa OBrien. And French civil liberties activist Yasser Louati says despite her defeat in the presidential election, many of Marine Le Pens ideas are already embedded in mainstream French politics. And a premiere track from hip-hop artists MC Sole and DJ Pain 1.]]>
</itunes:summary>
<itunes:duration>4197</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57ef98d4-dcf9-11e6-a5a2-374c19bb24e7]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL5670631624.mp3" length="64045557" type="audio/mpeg" />
</item>
<item>
<title>BONUS: Jeremy talks Milo on Politically Re-Active</title>
<description>We're still a week away from the beginning of season two, but here's a taster of Jeremy's interview on our sister podcast, Politically Re-Active. Jeremy clears the air on his cancelled appearance on "Real Time with Bill Maher" with hosts W. Kamau Bell and Hari Kondabolu, and much more. To hear the full interview, subscribe to Politically Re-Active or head to politicallyreactive.com.</description>
<pubDate>Wed, 03 May 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle />
<itunes:summary>
<![CDATA[We're still a week away from the beginning of season two, but here's a taster of Jeremy's interview on our sister podcast, Politically Re-Active. Jeremy clears the air on his cancelled appearance on "Real Time with Bill Maher" with hosts W. Kamau Bell and Hari Kondabolu, and much more. To hear the full interview, subscribe to Politically Re-Active or head to politicallyreactive.com.]]>
</itunes:summary>
<itunes:duration>692</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[a940d60e-2fb9-11e7-8fb4-4b8f8bf5bfe4]]></guid>
<enclosure url="https://traffic.megaphone.fm/PPY5034885459.mp3" length="11072574" type="audio/mpeg" />
</item>
<item>
<title>Wikileaks vs the CIA</title>
<description>Wikileaks founder Julian Assange hits back at Trumps CIA director Mike Pompeo after Pompeo accused Wikileaks of being a “hostile non-state intelligence agency.” In a wide-ranging interview, Assange discusses the allegations Wikileaks was abetted by Russian intelligence in its publication of DNC emails, and the new-found admiration for him by FOX News and Donald Trump. Also, why Assange believes he and Hillary Clinton may get along if they ever met in person. And we premiere an unreleased song by Tom Morello of Rage Against the Machine.</description>
<pubDate>Wed, 19 Apr 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Julian Assange hits back at Trumps CIA director Mike Pompeo after Pompeo accused Wikileaks of being a “hostile non-state intelligence agency.”</itunes:subtitle>
<itunes:summary>
<![CDATA[Wikileaks founder Julian Assange hits back at Trumps CIA director Mike Pompeo after Pompeo accused Wikileaks of being a “hostile non-state intelligence agency.” In a wide-ranging interview, Assange discusses the allegations Wikileaks was abetted by Russian intelligence in its publication of DNC emails, and the new-found admiration for him by FOX News and Donald Trump. Also, why Assange believes he and Hillary Clinton may get along if they ever met in person. And we premiere an unreleased song by Tom Morello of Rage Against the Machine.]]>
</itunes:summary>
<itunes:duration>3901</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57e86f28-dcf9-11e6-a5a2-3f3b6bf611af]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL5660744294.mp3" length="59298377" type="audio/mpeg" />
</item>
<item>
<title>The Emperors New Cruise Missiles</title>
<description>Nothing brings warmongers, hawks and elites from both parties closer than a cruise missile strike. This weeks Intercepted will piss off Assad supporters and the Democrats and Republicans fawning over Trumps newest war. Former Congressman Dennis Kucinich questions the official story on the chemical weapons attack. Murtaza Hussain on what Assad gains by using chemical weapons. And, Maher Arar is a Syrian-born Canadian engineer who was kidnapped at JFK airport by US operatives after 9/11 and rendered to Syria and tortured by Assads agents. Arar says he opposes Assad and US intervention. All that and a bucket of media stupidity to celebrate beautiful missiles.</description>
<pubDate>Wed, 12 Apr 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Nothing brings warmongers, hawks and elites from both parties closer than a cruise missile strike.</itunes:subtitle>
<itunes:summary>
<![CDATA[Nothing brings warmongers, hawks and elites from both parties closer than a cruise missile strike. This weeks Intercepted will piss off Assad supporters and the Democrats and Republicans fawning over Trumps newest war. Former Congressman Dennis Kucinich questions the official story on the chemical weapons attack. Murtaza Hussain on what Assad gains by using chemical weapons. And, Maher Arar is a Syrian-born Canadian engineer who was kidnapped at JFK airport by US operatives after 9/11 and rendered to Syria and tortured by Assads agents. Arar says he opposes Assad and US intervention. All that and a bucket of media stupidity to celebrate beautiful missiles.]]>
</itunes:summary>
<itunes:duration>3764</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57e131d6-dcf9-11e6-a5a2-efc4038c6546]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL8700626063.mp3" length="57118720" type="audio/mpeg" />
</item>
<item>
<title>Trump's Secret Prince</title>
<description>Erik Prince—the most infamous mercenary in modern U.S. history—is Trumps secret emissary. This week, an exclusive interview with Rep. Jan Schakowsky, who has fought a decades-long battle against Prince. Tavis Smiley talks about the “Santa Claus-ification” of Dr. Martin Luther King Jr. on the 50th anniversary of Kings militant speech against the Vietnam War. Rep. Barbara Lee reflects on her own historic anti-war speech, delivered three days after 9/11. And Vice President Pence, who cant be alone in a room with a woman who is not his wife, goes Psycho.&lt;br&gt;&lt;br&gt;&lt;em&gt;Please take a moment to fill out Panoply's survey about the shows you listen to, love, and what else you'd like to hear: &lt;/em&gt;&lt;a href="http://survey.panoply.fm"&gt;&lt;em&gt;survey.panoply.fm&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&amp;nbsp; Many thanks!&lt;/em&gt;</description>
<pubDate>Wed, 05 Apr 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Erik Prince is the most infamous mercenary in modern U.S. history. Hes also Trumps shadow advisor and secret emissary.</itunes:subtitle>
<itunes:summary>
<![CDATA[Erik Prince—the most infamous mercenary in modern U.S. history—is Trumps secret emissary. This week, an exclusive interview with Rep. Jan Schakowsky, who has fought a decades-long battle against Prince. Tavis Smiley talks about the “Santa Claus-ification” of Dr. Martin Luther King Jr. on the 50th anniversary of Kings militant speech against the Vietnam War. Rep. Barbara Lee reflects on her own historic anti-war speech, delivered three days after 9/11. And Vice President Pence, who cant be alone in a room with a woman who is not his wife, goes Psycho.<br><br><em>Please take a moment to fill out Panoply's survey about the shows you listen to, love, and what else you'd like to hear: </em><a href="http://survey.panoply.fm"><em>survey.panoply.fm</em></a><em>.&nbsp; Many thanks!</em>]]>
</itunes:summary>
<itunes:duration>3623</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57da1dce-dcf9-11e6-a5a2-2fa5756ae4a7]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL7737191155.mp3?updated=1491374970" length="54858396" type="audio/mpeg" />
</item>
<item>
<title>Trump Declares War on the Planet</title>
<description>Donald Trump officially rejects climate change and unofficially declares war on planet Earth. Naomi Klein takes us on a terrifying journey into Trumps real life version of The Purge. Boots Riley of The Coup discusses Trump and hip hop and performs. Murtaza Hussain talks about the US bombings in Iraq and Syria that have killed 1,000 civilians in one month. And, we talk to the developer of an app that tracks US drone strikes that Apple has censored 13 times.</description>
<pubDate>Wed, 29 Mar 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump officially rejects climate change and unofficially declares war on planet Earth.</itunes:subtitle>
<itunes:summary>
<![CDATA[Donald Trump officially rejects climate change and unofficially declares war on planet Earth. Naomi Klein takes us on a terrifying journey into Trumps real life version of The Purge. Boots Riley of The Coup discusses Trump and hip hop and performs. Murtaza Hussain talks about the US bombings in Iraq and Syria that have killed 1,000 civilians in one month. And, we talk to the developer of an app that tracks US drone strikes that Apple has censored 13 times.]]>
</itunes:summary>
<itunes:duration>3512</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57d2f170-dcf9-11e6-a5a2-5fc4825a8119]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL9529758061.mp3" length="53079980" type="audio/mpeg" />
</item>
<item>
<title>Could Trump Start World War III?</title>
<description>Donald Trump has not started any new wars… yet. But his administration is pouring gasoline on several initiated by his predecessors. This week on Intercepted: US forces are deploying in Syria, as drone strikes expand in Yemen. And Russia and Iran loom over everything. We talk to veteran war correspondents Anand Gopal and Iona Craig. Glenn Greenwald analyzes James Comeys testimony on Capitol Hill and exposes a major lie spread about Edward Snowden. Actor William Camp “stars” in the real life story of the spy who became “the Socrates of the NSA.”</description>
<pubDate>Wed, 22 Mar 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump has not started any new wars… yet. But his administration is pouring gasoline on several initiated by his predecessors. </itunes:subtitle>
<itunes:summary>
<![CDATA[Donald Trump has not started any new wars… yet. But his administration is pouring gasoline on several initiated by his predecessors. This week on Intercepted: US forces are deploying in Syria, as drone strikes expand in Yemen. And Russia and Iran loom over everything. We talk to veteran war correspondents Anand Gopal and Iona Craig. Glenn Greenwald analyzes James Comeys testimony on Capitol Hill and exposes a major lie spread about Edward Snowden. Actor William Camp “stars” in the real life story of the spy who became “the Socrates of the NSA.”]]>
</itunes:summary>
<itunes:duration>3683</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57cc3f10-dcf9-11e6-a5a2-4fe59e09c4e9]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL9134059577.mp3" length="55811761" type="audio/mpeg" />
</item>
<item>
<title>Snowden vs. Trump</title>
<description>This week, Intercepted is live from the SXSW Festival in Austin. Edward Snowden joins us via video feed from Moscow. He discusses Trumps allegations of Obamas wiretapping, analyzes some of the CIAs hacking capabilities, and blasts critics who accuse him of being a Russian agent. And we talk to Libyan-American hip hop artist Kayem, who was forced to keep a low profile the past several years after multiple detentions and visits from the FBI. He shares some verses with Intercepted.</description>
<pubDate>Wed, 15 Mar 2017 10:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Intercepted is live from the SXSW Festival in Austin with Edward Snowden joining via video feed from Moscow. </itunes:subtitle>
<itunes:summary>
<![CDATA[This week, Intercepted is live from the SXSW Festival in Austin. Edward Snowden joins us via video feed from Moscow. He discusses Trumps allegations of Obamas wiretapping, analyzes some of the CIAs hacking capabilities, and blasts critics who accuse him of being a Russian agent. And we talk to Libyan-American hip hop artist Kayem, who was forced to keep a low profile the past several years after multiple detentions and visits from the FBI. He shares some verses with Intercepted.]]>
</itunes:summary>
<itunes:duration>3331</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57c55fa6-dcf9-11e6-a5a2-1f24485c4305]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL3645242256.mp3" length="50191046" type="audio/mpeg" />
</item>
<item>
<title>Ready to Lie</title>
<description>The Notorious B.I.G. famously alleged that federal agents were mad because he was flagrant. Trump also believes he has beef with the Feds, accusing Obama of tapping his phones. The Intercepts Matthew Cole and journalist Marcy Wheeler dissect the accusations and the (curious) denials. Sam Biddle and Josh Begley explain what the CIA hacking docs published by Wikileaks say about our “smart” TVs and phones. Journalist Aura Bogado confronts Trumps assault on undocumented immigrants. Punk band Anti-Flag performs. Plus, Trump “stars” in a scene from Goodfellas. Can he get out of Mar-a-Lago alive?</description>
<pubDate>Wed, 08 Mar 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>The Notorious B.I.G. said federal agents were mad because he was flagrant. President Donald Trump also believes he has beef with the Feds. </itunes:subtitle>
<itunes:summary>
<![CDATA[The Notorious B.I.G. famously alleged that federal agents were mad because he was flagrant. Trump also believes he has beef with the Feds, accusing Obama of tapping his phones. The Intercepts Matthew Cole and journalist Marcy Wheeler dissect the accusations and the (curious) denials. Sam Biddle and Josh Begley explain what the CIA hacking docs published by Wikileaks say about our “smart” TVs and phones. Journalist Aura Bogado confronts Trumps assault on undocumented immigrants. Punk band Anti-Flag performs. Plus, Trump “stars” in a scene from Goodfellas. Can he get out of Mar-a-Lago alive?]]>
</itunes:summary>
<itunes:duration>4182</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57be3b36-dcf9-11e6-a5a2-07d3f1f2cb5f]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL3152884319.mp3" length="63798125" type="audio/mpeg" />
</item>
<item>
<title>Donald in Wonderland</title>
<description>Ex-CIA analyst Nada Bakos and former FBI agent Clint Watts explain how Trumps administration could use “alternative intelligence” to justify dangerous military actions. Shane Bauer of Mother Jones breaks down the connections between immigration raids and soaring private prison profits. Plus the world premiere of a song by the Iraqi-Canadian hip hop artist Narcy. We bet you never thought youd hear Steve Bannons name rapped in autotune.</description>
<pubDate>Wed, 01 Mar 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Pundits are heaping praise on his “presidential” speech to Congress. Dont believe the hype.</itunes:subtitle>
<itunes:summary>
<![CDATA[Ex-CIA analyst Nada Bakos and former FBI agent Clint Watts explain how Trumps administration could use “alternative intelligence” to justify dangerous military actions. Shane Bauer of Mother Jones breaks down the connections between immigration raids and soaring private prison profits. Plus the world premiere of a song by the Iraqi-Canadian hip hop artist Narcy. We bet you never thought youd hear Steve Bannons name rapped in autotune.]]>
</itunes:summary>
<itunes:duration>4196</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57b74678-dcf9-11e6-a5a2-4fbc5ae0d0cf]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL5707421213.mp3" length="64025913" type="audio/mpeg" />
</item>
<item>
<title>The Undisciplined Authoritarian</title>
<description>New York Times investigative reporter James Risen breaks down Trumps declaration that journalists are the enemy and analyzes Trumps royal court. ACLU lawyer Chase Strangio and former New England Patriots star Donté Stallworth talk about the war on the transgender community and the rising resistance of pro athletes. Sam Biddle exposes the Trump-connected firm that helped the NSA spy on the world and actor Wallace Shawn stars as an NSA operative who is worried about adversaries spying on his luncheons. Plus music from Anohni.</description>
<pubDate>Wed, 22 Feb 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Journalist James Risen faced imprisonment under Obamas Justice Department and is preparing to do battle with Donald Trump.</itunes:subtitle>
<itunes:summary>
<![CDATA[New York Times investigative reporter James Risen breaks down Trumps declaration that journalists are the enemy and analyzes Trumps royal court. ACLU lawyer Chase Strangio and former New England Patriots star Donté Stallworth talk about the war on the transgender community and the rising resistance of pro athletes. Sam Biddle exposes the Trump-connected firm that helped the NSA spy on the world and actor Wallace Shawn stars as an NSA operative who is worried about adversaries spying on his luncheons. Plus music from Anohni.]]>
</itunes:summary>
<itunes:duration>4209</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57b018d0-dcf9-11e6-a5a2-e736fa72fede]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL3910130795.mp3" length="64229877" type="audio/mpeg" />
</item>
<item>
<title>We Are All in Trumps Hunger Games Now</title>
<description>The first contestant in Donald Trumps reality administration has left the West Wing. This week, Glenn Greenwald offers some provocative pushback on the Russia fear-mongering surrounding Gen. Michael Flynns resignation (or firing). Naomi Klein walks the dark aisles of the Trump family department store. Former Congresswoman Liz Holtzman, a key figure in the impeachment of Richard Nixon, explains how impeachment actually works. And Hina Shamsi of the ACLU recounts her interrogation at the border. Plus a performance from Jedi Mind Tricks.&amp;nbsp;</description>
<pubDate>Wed, 15 Feb 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>As General Flynn Falls, Glenn Greenwald Blasts the Bipartisan Hypocrisy and Naomi Klein Brands Trump</itunes:subtitle>
<itunes:summary>
<![CDATA[The first contestant in Donald Trumps reality administration has left the West Wing. This week, Glenn Greenwald offers some provocative pushback on the Russia fear-mongering surrounding Gen. Michael Flynns resignation (or firing). Naomi Klein walks the dark aisles of the Trump family department store. Former Congresswoman Liz Holtzman, a key figure in the impeachment of Richard Nixon, explains how impeachment actually works. And Hina Shamsi of the ACLU recounts her interrogation at the border. Plus a performance from Jedi Mind Tricks.&nbsp;]]>
</itunes:summary>
<itunes:duration>3858</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57a87fd0-dcf9-11e6-a5a2-af85a8453351]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL5616910839.mp3" length="58608326" type="audio/mpeg" />
</item>
<item>
<title>Trump's Cabinet of Killers and Why Orange is the New Anti-Black</title>
<description>This week, investigative reporter Allan Nairn breaks down Trump's relationship with the CIA and the killer assembly of neocons and right-wing conspiracists running the U.S. war machine. Princeton professor Keeanga Yamahtta-Taylor dismantles Obama's problematic legacy and offers strategic advice for resisting Trump. The Intercept's own distinguished alt-historian, Jon Schwarz, offers a lesson on the origins of presidential executive orders. And Kimya Dawson gives a raw performance of a new song about racism and the police state.</description>
<pubDate>Wed, 08 Feb 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Less than a month into the new administration, and not even a presidential bath robe can protect President Trump's orange from becoming the new anti-black. </itunes:subtitle>
<itunes:summary>
<![CDATA[This week, investigative reporter Allan Nairn breaks down Trump's relationship with the CIA and the killer assembly of neocons and right-wing conspiracists running the U.S. war machine. Princeton professor Keeanga Yamahtta-Taylor dismantles Obama's problematic legacy and offers strategic advice for resisting Trump. The Intercept's own distinguished alt-historian, Jon Schwarz, offers a lesson on the origins of presidential executive orders. And Kimya Dawson gives a raw performance of a new song about racism and the police state.]]>
</itunes:summary>
<itunes:duration>3752</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57a133b0-dcf9-11e6-a5a2-9f64a29807d9]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL7005027452.mp3" length="56920189" type="audio/mpeg" />
</item>
<item>
<title>Trump Week Two: The Rise of Chief Yookeroo</title>
<description>Donald Trump is signing executive orders like autographed pictures. This week on Intercepted: Two former senior FBI agents blast the “Muslim ban” and Trumps campaign to make torture great again. Constitutional rights lawyers dissect the (il)legalities of Trumps orders. Rep. Barbara Lee confronts the president's terrifying approach to government.&amp;nbsp; New secret documents reveal how Trump could resurrect J. Edgar Hoovers legacy. Brother Ali freestyles a verse, and Peter Sarsgaard stars in the bizarre true story of an NSA operative with vacation tips for deploying to Guantanamo.&amp;nbsp;</description>
<pubDate>Wed, 01 Feb 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>Donald Trump is signing executive orders like autographed pictures. But this isn't a reality show.</itunes:subtitle>
<itunes:summary>
<![CDATA[Donald Trump is signing executive orders like autographed pictures. This week on Intercepted: Two former senior FBI agents blast the “Muslim ban” and Trumps campaign to make torture great again. Constitutional rights lawyers dissect the (il)legalities of Trumps orders. Rep. Barbara Lee confronts the president's terrifying approach to government.&nbsp; New secret documents reveal how Trump could resurrect J. Edgar Hoovers legacy. Brother Ali freestyles a verse, and Peter Sarsgaard stars in the bizarre true story of an NSA operative with vacation tips for deploying to Guantanamo.&nbsp;]]>
</itunes:summary>
<itunes:duration>3358</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57996266-dcf9-11e6-a5a2-4ff22525cee4]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL4823102330.mp3?updated=1485937504" length="50611513" type="audio/mpeg" />
</item>
<item>
<title>The Clock Strikes Thirteen, Donald Trump is President</title>
<description>The clock struck thirteen on January 20, Donald Trump is the president of the United States and episode one of Intercepted is here. Intercept co-founder Glenn Greenwald and editor-in-chief Betsy Reed join Jeremy Scahill for a discussion on the crazy apocalyptic present. They break down Trumps attacks on the media, that insane speech he gave at the CIA and the state of the Democratic party. Naomi Klein sends in a dispatch from the Womens March on Washington. Jeremy goes deep into the secretive world of Seymour Hershs kitchen, and shoots the shit with the legendary Pulitzer Prize-winning journalist about why he calls Trump a “circuit breaker." And we hear a spoken word performance from hip-hop artist Immortal Technique.&amp;nbsp;</description>
<pubDate>Wed, 25 Jan 2017 11:00:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>The clock struck thirteen on January 20, Donald Trump is the president of the United States and Episode One of Intercepted is here.</itunes:subtitle>
<itunes:summary>
<![CDATA[The clock struck thirteen on January 20, Donald Trump is the president of the United States and episode one of Intercepted is here. Intercept co-founder Glenn Greenwald and editor-in-chief Betsy Reed join Jeremy Scahill for a discussion on the crazy apocalyptic present. They break down Trumps attacks on the media, that insane speech he gave at the CIA and the state of the Democratic party. Naomi Klein sends in a dispatch from the Womens March on Washington. Jeremy goes deep into the secretive world of Seymour Hershs kitchen, and shoots the shit with the legendary Pulitzer Prize-winning journalist about why he calls Trump a “circuit breaker." And we hear a spoken word performance from hip-hop artist Immortal Technique.&nbsp;]]>
</itunes:summary>
<itunes:duration>3433</itunes:duration>
<itunes:explicit>yes</itunes:explicit>
<guid isPermaLink="false"><![CDATA[57913302-dcf9-11e6-a5a2-87c6a559fb64]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL1844876464.mp3" length="51822341" type="audio/mpeg" />
</item>
<item>
<title>Introducing Intercepted with Jeremy Scahill</title>
<description>Hear a preview of Intercepted, a new podcast coming January 25 from the people behind the fearless, adversarial journalism of The Intercept. Every week, host Jeremy Scahill will discuss the crucial issues of our time with fellow reporters, and outspoken writers, artists and thinkers.</description>
<pubDate>Fri, 13 Jan 2017 18:38:00 -0000</pubDate>
<itunes:author>The Intercept / Panoply</itunes:author>
<itunes:episodeType>full</itunes:episodeType>
<itunes:subtitle>A preview of Intercepted, a new podcast coming January 25.</itunes:subtitle>
<itunes:summary>
<![CDATA[Hear a preview of Intercepted, a new podcast coming January 25 from the people behind the fearless, adversarial journalism of The Intercept. Every week, host Jeremy Scahill will discuss the crucial issues of our time with fellow reporters, and outspoken writers, artists and thinkers.]]>
</itunes:summary>
<itunes:duration>200</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<guid isPermaLink="false"><![CDATA[e6dc75b4-d9b9-11e6-9bea-d73080315ad2]]></guid>
<enclosure url="https://traffic.megaphone.fm/FL8608731318.mp3?updated=1484685184" length="3202403" type="audio/mpeg" />
</item>
</channel>
</rss>
-139
View File
@@ -1,139 +0,0 @@
<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<channel>
<title>Request For Explanation</title>
<link>https://request-for-explanation.github.io/podcast/</link>
<description>A weekly discussion of Rust RFCs</description>
<image>
<url>https://request-for-explanation.github.io/podcast/podcast.png</url>
<title>Request For Explanation</title>
<link>https://request-for-explanation.github.io/podcast/</link>
</image>
<atom:link href="http://request-for-explanation.github.io/podcast/rss.xml" rel="self" type="application/rss+xml" />
<googleplay:author>The Request For Explanation Podcast</googleplay:author>
<itunes:author>The Request For Explanation Podcast</itunes:author>
<googleplay:email>manishearth@gmail.com</googleplay:email>
<itunes:owner>
<itunes:name>Manish Goregaokar</itunes:name>
<itunes:email>manishearth@gmail.com</itunes:email>
</itunes:owner>
<googleplay:image href="https://request-for-explanation.github.io/podcast/podcast.png" />
<itunes:image href="https://request-for-explanation.github.io/podcast/podcast.png" />
<language>en-us</language>
<googleplay:category text="Technology"/>
<itunes:category text="Technology" />
<itunes:explicit>no</itunes:explicit>
<item>
<title>Episode #0 - What the Hell</title>
<link>https://request-for-explanation.github.io/podcast/ep0-what-the-hell/</link>
<pubDate>Mon, 19 Jun 2017 19:45:01 EST</pubDate>
<guid isPermaLink="false">https://request-for-explanation.github.io/podcast/ep0-what-the-hell/</guid>
<enclosure url="http://request-for-explanation.github.io/podcast/ep0-what-the-hell/episode.mp3" length="7057920" type="audio/mpeg" />
<description><![CDATA[This week we look at <a href="https://github.com/rust-lang/rfcs/pull/2005">RFC 2005</a> "Match Ergonomics Using Default Binding Modes"]]></description>
<itunes:order>1</itunes:order>
<itunes:duration>20:29</itunes:duration>
</item>
<item>
<title>Episode #1 - Constermash</title>
<link>https://request-for-explanation.github.io/podcast/ep1-constermash/</link>
<pubDate>Thu, 29 Jun 2017 17:30:00 PDT</pubDate>
<guid isPermaLink="false">https://request-for-explanation.github.io/podcast/ep1-constermash/</guid>
<enclosure url="http://request-for-explanation.github.io/podcast/ep1-constermash/episode.mp3" length="28588800" type="audio/mpeg" />
<description><![CDATA[This week we look at <a href="https://github.com/rust-lang/rfcs/pull/2000">RFC 2000</a> "Const Generics"]]></description>
<itunes:order>2</itunes:order>
<itunes:duration>16:09</itunes:duration>
</item>
<item>
<title>Episode #2 - Stealing Chickens on the Internet</title>
<link>https://request-for-explanation.github.io/podcast/ep2-stealing-chickens-on-the-internet/</link>
<pubDate>Thu, 6 July 2017 15:30:00 PDT</pubDate>
<guid isPermaLink="false">https://request-for-explanation.github.io/podcast/ep2-stealing-chickens-on-the-internet</guid>
<enclosure url="http://request-for-explanation.github.io/podcast/ep2-stealing-chickens-on-the-internet/episode.mp3" length="19608187" type="audio/mpeg" />
<description><![CDATA[This week we look at <a href="https://github.com/rust-lang/rfcs/pull/2052">RFC 2052</a> "Evolving Rust through Epochs"]]></description>
<itunes:order>3</itunes:order>
<itunes:duration>43:25</itunes:duration>
</item>
<item>
<title>Episode #3 - Aaron's Favorite Topic</title>
<link>https://request-for-explanation.github.io/podcast/ep3-aarons-favorite-topic/</link>
<pubDate>Mon, 10 July 2017 16:00:00 PDT</pubDate>
<guid isPermaLink="false">https://request-for-explanation.github.io/podcast/ep3-aarons-favorite-topic</guid>
<enclosure url="http://request-for-explanation.github.io/podcast/ep3-aarons-favorite-topic/episode.mp3" length="19070229" type="audio/mpeg" />
<description><![CDATA[This week we talk about the RFC process in general -- what it is, how it works, and how it came to be.]]></description>
<itunes:order>4</itunes:order>
<itunes:duration>54:01</itunes:duration>
</item>
<item>
<title>Episode #4 - Literally Haskell</title>
<link>https://request-for-explanation.github.io/podcast/ep4-literally-haskell/</link>
<pubDate>Mon, 17 July 2017 17:00:00 PDT</pubDate>
<guid isPermaLink="false">https://request-for-explanation.github.io/podcast/ep4-literally-haskell</guid>
<enclosure url="http://request-for-explanation.github.io/podcast/ep4-literally-haskell/episode.mp3" length="12973478" type="audio/mpeg" />
<description><![CDATA[This week we look at <a href="https://github.com/rust-lang/rfcs/pull/1598">RFC 1598</a> "Generic Associated Types"]]></description>
<itunes:order>5</itunes:order>
<itunes:duration>36:41</itunes:duration>
</item>
<item>
<title>Episode #5 - Are you my main?</title>
<link>https://request-for-explanation.github.io/podcast/ep5-are-you-my-main/</link>
<pubDate>Mon, 24 July 2017 16:00:00 PDT</pubDate>
<guid isPermaLink="false">https://request-for-explanation.github.io/podcast/ep5-are-you-my-main</guid>
<enclosure url="http://request-for-explanation.github.io/podcast/ep5-are-you-my-main/episode.mp3" length="8232966" type="audio/mpeg" />
<description><![CDATA[This week we look at <a href="https://github.com/rust-lang/rfcs/pull/1937">RFC 1937</a> "? in main", as well as discuss some news on other RFCs.]]></description>
<itunes:order>6</itunes:order>
<itunes:duration>22:33</itunes:duration>
</item>
<item>
<title>Episode #6 - Everything and the kitchen async</title>
<link>https://request-for-explanation.github.io/podcast/ep6-everything-and-the-kitchen-async/</link>
<pubDate>Mon, 31 July 2017 16:00:00 PDT</pubDate>
<guid isPermaLink="false">https://request-for-explanation.github.io/podcast/ep6-everything-and-the-kitchen-async/</guid>
<enclosure url="http://request-for-explanation.github.io/podcast/ep6-everything-and-the-kitchen-async/episode.mp3" length="9530774" type="audio/mpeg" />
<description><![CDATA[This week we look at <a href="https://github.com/rust-lang/rfcs/pull/2033">eRFC 2033</a> "Experimentally add coroutines to Rust"]]></description>
<itunes:order>7</itunes:order>
<itunes:duration>25:52</itunes:duration>
</item>
<item>
<title>Episode #7 - Unwrapping a great RFC</title>
<link>https://request-for-explanation.github.io/podcast/ep7-unwrapping-a-great-rfc/</link>
<pubDate>Tue, 8 Aug 2017 16:00:00 PDT</pubDate>
<guid isPermaLink="false">https://request-for-explanation.github.io/podcast/ep7-unwrapping-a-great-rfc/</guid>
<enclosure url="http://request-for-explanation.github.io/podcast/ep7-unwrapping-a-great-rfc/episode.mp3" length="8715317" type="audio/mpeg" />
<description><![CDATA[This week we look at <a href="https://github.com/rust-lang/rfcs/pull/2091">RFC 2091</a> "Implicit caller location"]]></description>
<itunes:order>8</itunes:order>
<itunes:duration>24:11</itunes:duration>
</item>
<item>
<title>Episode #8 - An Existential Crisis</title>
<link>https://request-for-explanation.github.io/podcast/ep8-an-existential-crisis/</link>
<pubDate>Tue, 15 Aug 2017 17:00:00 PDT</pubDate>
<guid isPermaLink="false">https://request-for-explanation.github.io/podcast/ep8-an-existential-crisis/</guid>
<enclosure url="http://request-for-explanation.github.io/podcast/ep8-an-existential-crisis/episode.mp3" length="13713219" type="audio/mpeg" />
<description><![CDATA[This week we look at <a href="https://github.com/rust-lang/rfcs/pull/2071">RFC 2071</a> "Add impl Trait type alias and variable declarations"]]></description>
<itunes:order>9</itunes:order>
<itunes:duration>38:33</itunes:duration>
</item>
<item>
<title>Episode #9 - A Once in a Lifetime RFC</title>
<link>https://request-for-explanation.github.io/podcast/ep9-a-once-in-a-lifetime-rfc/</link>
<pubDate>Mon, 28 Aug 2017 15:00:00 PDT</pubDate>
<guid isPermaLink="false">https://request-for-explanation.github.io/podcast/ep9-a-once-in-a-lifetime-rfc/</guid>
<enclosure url="http://request-for-explanation.github.io/podcast/ep9-a-once-in-a-lifetime-rfc/episode.mp3" length="15077388" type="audio/mpeg" />
<description><![CDATA[This week we look at <a href="https://github.com/rust-lang/rfcs/pull/2094">RFC 2094</a> "Non-lexical lifetimes"]]></description>
<itunes:order>10</itunes:order>
<itunes:duration>42:13</itunes:duration>
</item>
<item>
<title>Episode #10 - Two Paths Diverged in a Yellow Wood</title>
<link>https://request-for-explanation.github.io/podcast/ep10-two-paths-diverged-in-a-yellow-wood/</link>
<pubDate>Thu, 30 Aug 2017 1:30:00 PDT</pubDate>
<guid isPermaLink="false">https://request-for-explanation.github.io/podcast/ep10-two-paths-diverged-in-a-yellow-wood/</guid>
<enclosure url="http://request-for-explanation.github.io/podcast/ep10-two-paths-diverged-in-a-yellow-wood/episode.mp3" length="19994929" type="audio/mpeg" />
<description><![CDATA[This week we look at <a href="https://github.com/rust-lang/rfcs/pull/2126">RFC 2126</a> "Clarify and streamline paths and visibility" (aka "The modules RFC")]]></description>
<itunes:order>11</itunes:order>
<itunes:duration>56:40</itunes:duration>
</item>
</channel>
</rss>
@@ -1,457 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~files/feed-premium.xsl"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:feedpress="https://feed.press/xmlns" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:media="http://www.rssboard.org/media-rss" version="2.0">
<channel>
<feedpress:locale>en</feedpress:locale>
<atom:link rel="via" href="http://feeds.propublica.org/propublica/podcast"/>
<atom:link rel="hub" href="http://feedpress.superfeedr.com/"/>
<itunes:category text="News &amp; Politics"/>
<media:category scheme="http://www.itunes.com/dtds/podcast-1.0.dtd">News &amp; Politics</media:category>
<itunes:category text="Society &amp; Culture">
<itunes:category text="History"/>
</itunes:category>
<media:category scheme="http://www.itunes.com/dtds/podcast-1.0.dtd">Society &amp; Culture/History</media:category>
<media:rating>nonadult</media:rating>
<media:description type="plain">The ProPublica Podcast</media:description>
<media:credit role="author">ProPublica</media:credit>
<media:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</media:keywords>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<googleplay:description>The podcast that takes you behind the scenes with journalists to hear how they nailed their biggest stories.</googleplay:description>
<googleplay:author>ProPublica</googleplay:author>
<googleplay:email>celeste.lecompte@propublica.org</googleplay:email>
<googleplay:explicit>no</googleplay:explicit>
<title>The Breakthrough</title>
<link>http://www.propublica.org/podcast</link>
<description>Latest Articles and Investigations from ProPublica, an independent, non-profit newsroom that produces investigative journalism in the public interest.</description>
<language>en</language>
<dc:creator>ProPublica</dc:creator>
<copyright>Copyright 2017 Pro Publica Inc.</copyright>
<pubDate>Fri, 22 Sep 2017 13:22:48 +0000</pubDate>
<dc:date>2017-09-22T13:22:48+00:00</dc:date>
<dc:language>en-us</dc:language>
<dc:rights>Copyright 2017 Pro Publica Inc.</dc:rights>
<atom:link href="http://feeds.propublica.org/propublica/podcast" rel="self" type="application/rss+xml"/>
<itunes:subtitle>The ProPublica Podcast</itunes:subtitle>
<itunes:author>ProPublica</itunes:author>
<itunes:summary>The podcast that takes you behind the scenes with journalists to hear how they nailed their biggest stories.</itunes:summary>
<itunes:explicit>no</itunes:explicit>
<itunes:owner>
<itunes:email>celeste.lecompte@propublica.org</itunes:email>
<itunes:name>ProPublica</itunes:name>
</itunes:owner>
<itunes:image href="http://www.propublica.org/images/podcast_logo_2.png"/>
<item>
<title>The Breakthrough: Hopelessness and Exploitation Inside Homes for Mentally Ill</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary>A reporter finds that homes meant to replace New Yorks troubled psychiatric hospitals might be just as bad.</itunes:summary>
<enclosure url="http://tracking.feedpress.it/link/10581/6726758/20170908-cliff-levy.mp3" length="33396551" type="audio/mpeg"/>
<itunes:duration>00:27:50</itunes:duration>
<link>https://www.propublica.org/podcast/the-breakthrough-hopelessness-exploitation-homes-for-mentally-ill#134472</link>
<pubDate>Fri, 08 Sep 2017 12:00:00 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-hopelessness-exploitation-homes-for-mentally-ill#134472</guid>
<description><![CDATA[
<p>A reporter finds that homes meant to replace New Yorks troubled psychiatric hospitals might be just as bad.</p>
]]></description>
<dc:subject/>
<dc:date>2017-09-08T12:00:00+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
A reporter finds that homes meant to replace New Yorks troubled psychiatric hospitals might be just as bad.
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: Behind the Scenes of Hillary Clintons Failed Bid for President</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary>Jonathan Allen and Amie Parnes didnt know their book would be called Shattered, or that their extraordinary access would let them chronicle the mounting signs of a doomed campaign.</itunes:summary>
<enclosure url="http://tracking.feedpress.it/link/10581/6726759/16_JohnAllen-CRAFT.mp3" length="17964071" type="audio/mpeg"/>
<itunes:duration>00:18:45</itunes:duration>
<link>https://www.propublica.org/podcast/the-breakthrough-hillary-clinton-failed-presidential-bid#133721</link>
<pubDate>Fri, 25 Aug 2017 12:00:00 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-hillary-clinton-failed-presidential-bid#133721</guid>
<description><![CDATA[
<p>Jonathan Allen and Amie Parnes didnt know their book would be called Shattered, or that their extraordinary access would let them chronicle the mounting signs of a doomed campaign.</p>
]]></description>
<dc:subject/>
<dc:date>2017-08-25T12:00:00+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
Jonathan Allen and Amie Parnes didnt know their book would be called Shattered, or that their extraordinary access would let them chronicle the mounting signs of a doomed campaign.
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: How a Small News Outlet Brought Down the State Hero</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary>VTDiggers Anne Galloway was suspicious the moment she heard about a too-good-to-be-true development. She didnt know how right she was.</itunes:summary>
<enclosure url="http://tracking.feedpress.it/link/10581/6726760/15_VTDigger-CRAFT.mp3" length="" type="audio/mpeg"/>
<itunes:duration/>
<link>https://www.propublica.org/podcast/the-breakthrough-how-a-small-news-outlet-brought-down-the-state-hero#133361</link>
<pubDate>Fri, 11 Aug 2017 12:00:00 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-how-a-small-news-outlet-brought-down-the-state-hero#133361</guid>
<description><![CDATA[
<p>VTDiggers Anne Galloway was suspicious the moment she heard about a too-good-to-be-true development. She didnt know how right she was.</p>
]]></description>
<dc:subject/>
<dc:date>2017-08-11T12:00:00+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
VTDiggers Anne Galloway was suspicious the moment she heard about a too-good-to-be-true development. She didnt know how right she was.
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: Reporting on Life and Death in the Delivery Room</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary>ProPublica reporter Nina Martin and her team used social media and old-fashioned shoe leather to show how the U.S. has the worst maternal death rate in the developed world.</itunes:summary>
<enclosure url="http://tracking.feedpress.it/link/10581/6726761/14_MaternalMortality-CRAFT.mp3" length="" type="audio/mpeg"/>
<itunes:duration/>
<link>https://www.propublica.org/podcast/the-breakthrough-reporting-on-life-and-death-in-the-delivery-room#133354</link>
<pubDate>Fri, 28 Jul 2017 12:00:00 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-reporting-on-life-and-death-in-the-delivery-room#133354</guid>
<description><![CDATA[
<p>ProPublica reporter Nina Martin and her team used social media and old-fashioned shoe leather to show how the U.S. has the worst maternal death rate in the developed world.</p>
]]></description>
<dc:subject>Health CareLost Mothers</dc:subject>
<dc:date>2017-07-28T12:00:00+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
ProPublica reporter Nina Martin and her team used social media and old-fashioned shoe leather to show how the U.S. has the worst maternal death rate in the developed world.
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: How an ICIJ Reporter Dug Up the World Banks Best Kept Secret</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary>Sasha Chavkin chased it down across three continents, and into places he was warned weren't safe.</itunes:summary>
<enclosure url="http://tracking.feedpress.it/link/10581/6726762/13_WorldBank-CRAFT.mp3" length="" type="audio/mpeg"/>
<itunes:duration/>
<link>https://www.propublica.org/podcast/the-breakthrough-how-an-icij-reporter-dug-up-world-banks-best-kept-secret#133343</link>
<pubDate>Fri, 14 Jul 2017 12:00:00 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-how-an-icij-reporter-dug-up-world-banks-best-kept-secret#133343</guid>
<description><![CDATA[
<p>Sasha Chavkin chased it down across three continents, and into places he was warned weren&#039;t safe.</p>
]]></description>
<dc:subject/>
<dc:date>2017-07-14T12:00:00+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
Sasha Chavkin chased it down across three continents, and into places he was warned weren't safe.
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: A Reporter Crosses Borders to Uncover Labor Abuse</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary>ProPublicas Michael Grabell travels from the heart of Ohio to the mountains of Guatemala to track down immigrant workers harmed in American poultry plants.</itunes:summary>
<enclosure url="http://tracking.feedpress.it/link/10581/6726763/12_CaseFarms_Grabell-CRAFT.mp3" length="" type="audio/mpeg"/>
<itunes:duration/>
<link>https://www.propublica.org/podcast/the-breakthrough-case-farms-labor-abuse-guatemala-michael-grabell#133335</link>
<pubDate>Fri, 30 Jun 2017 12:00:00 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-case-farms-labor-abuse-guatemala-michael-grabell#133335</guid>
<description><![CDATA[
<p>ProPublicas Michael Grabell travels from the heart of Ohio to the mountains of Guatemala to track down immigrant workers harmed in American poultry plants.</p>
]]></description>
<dc:subject>Labor</dc:subject>
<dc:date>2017-06-30T12:00:00+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
ProPublicas Michael Grabell travels from the heart of Ohio to the mountains of Guatemala to track down immigrant workers harmed in American poultry plants.
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: Uncovering NYC Cops Making Millions in Suspicious Deals</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary>On our first episode of this seasons The Breakthrough, we talk with WNYCs Robert Lewis tells us how his reporting triggered an internal investigation of suspicious dealings made by active-duty New York police officers.</itunes:summary>
<enclosure url="http://tracking.feedpress.it/link/10581/6726764/11_RobertLewis-CRAFT.mp3" length="" type="audio/mpeg"/>
<itunes:duration/>
<link>https://www.propublica.org/podcast/the-breakthrough-uncovering-nyc-cops-making-millions-in-suspicious-deals#133325</link>
<pubDate>Fri, 16 Jun 2017 12:00:00 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-uncovering-nyc-cops-making-millions-in-suspicious-deals#133325</guid>
<description><![CDATA[
<p>On our first episode of this seasons The Breakthrough, we talk with WNYCs Robert Lewis tells us how his reporting triggered an internal investigation of suspicious dealings made by active-duty New York police officers.</p>
]]></description>
<dc:subject/>
<dc:date>2017-06-16T12:00:00+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
On our first episode of this seasons The Breakthrough, we talk with WNYCs Robert Lewis tells us how his reporting triggered an internal investigation of suspicious dealings made by active-duty New…</itunes:subtitle>
</item>
<item>
<title>Our Podcast, The Breakthrough, Is Back</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary>In January, we launched The Breakthrough, which tells the stories behind investigative reporting. And were about to start a new season, on June 16.</itunes:summary>
<enclosure url="http://tracking.feedpress.it/link/10581/6726765/10_breakthrough_promo-CRAFT.mp3" length="" type="audio/mpeg"/>
<itunes:duration/>
<link>https://www.propublica.org/podcast/our-podcast-the-breakthrough-is-back#133309</link>
<pubDate>Fri, 09 Jun 2017 12:00:00 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/our-podcast-the-breakthrough-is-back#133309</guid>
<description><![CDATA[
<p>In January, we launched The Breakthrough, which tells the stories behind investigative reporting. And were about to start a new season, on June 16.</p>
]]></description>
<dc:subject/>
<dc:date>2017-06-09T12:00:00+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
In January, we launched The Breakthrough, which tells the stories behind investigative reporting. And were about to start a new season, on June 16.
</itunes:subtitle>
</item>
<item>
<title>We Want Your Thoughts on Our Podcast</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary>We recently relaunched our podcast, in which journalists tell us how they nailed their biggest stories. Now we want to hear from you.</itunes:summary>
<enclosure url="http://tracking.feedpress.it/link/10581/5486888/9_Breakthrough_Survey.mp3" length="" type="audio/mpeg"/>
<itunes:duration/>
<link>https://www.propublica.org/podcast/we-want-your-thoughts-on-our-podcast#106727</link>
<pubDate>Sat, 11 Mar 2017 00:54:00 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/we-want-your-thoughts-on-our-podcast#106727</guid>
<description><![CDATA[
<p>We recently relaunched our podcast, in which journalists tell us how they nailed their biggest stories. Now we want to hear from you.</p>
]]></description>
<dc:subject/>
<dc:date>2017-03-11T00:54:00+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
We recently relaunched our podcast, in which journalists tell us how they nailed their biggest stories. Now we want to hear from you.
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: How Reporters Really Use Unnamed Sources</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary/>
<itunes:duration>00:16:27</itunes:duration>
<link>https://www.propublica.org/podcast/the-breakthrough-how-reporters-really-use-unnamed-sources#66520</link>
<pubDate>Fri, 24 Feb 2017 14:00:00 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-how-reporters-really-use-unnamed-sources#66520</guid>
<description><![CDATA[
]]></description>
<dc:subject/>
<dc:date>2017-02-24T14:00:00+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: Uncovering the FBIs Secret Rules</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary/>
<itunes:duration>00:20:28</itunes:duration>
<link>https://www.propublica.org/podcast/the-breakthrough-uncovering-the-fbis-secret-rules#66523</link>
<pubDate>Fri, 17 Feb 2017 17:40:57 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-uncovering-the-fbis-secret-rules#66523</guid>
<description><![CDATA[
]]></description>
<dc:subject/>
<dc:date>2017-02-17T17:40:57+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: Reporters Examine Murder Where Cops Struggle to Curb It</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary/>
<itunes:duration>00:20:01</itunes:duration>
<link>https://www.propublica.org/podcast/the-breakthrough-reporters-examine-murder-where-cops-struggle-to-curb-it#66526</link>
<pubDate>Fri, 10 Feb 2017 17:25:36 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-reporters-examine-murder-where-cops-struggle-to-curb-it#66526</guid>
<description><![CDATA[
]]></description>
<dc:subject/>
<dc:date>2017-02-10T17:25:36+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: What American Journalists Can Learn From Reporting Under Putin</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary/>
<itunes:duration>00:31:54</itunes:duration>
<link>https://www.propublica.org/podcast/the-breakthrough-what-american-journalists-can-learn-reporting-under-putin#66529</link>
<pubDate>Fri, 03 Feb 2017 14:00:40 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-what-american-journalists-can-learn-reporting-under-putin#66529</guid>
<description><![CDATA[
]]></description>
<dc:subject/>
<dc:date>2017-02-03T14:00:40+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: Uncovering Danger at the Pharmacy Counter</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary/>
<itunes:duration>00:16:38</itunes:duration>
<link>https://www.propublica.org/podcast/the-breakthrough-uncovering-danger-at-the-pharmacy-counter#66532</link>
<pubDate>Fri, 27 Jan 2017 17:03:24 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-uncovering-danger-at-the-pharmacy-counter#66532</guid>
<description><![CDATA[
]]></description>
<dc:subject/>
<dc:date>2017-01-27T17:03:24+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: How a Reporter Solved a Decades-Old Murder</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary/>
<enclosure url="http://tracking.feedpress.it/link/10581/6726766/4_Breakthrough_ MSKiller.mp3" length="56458604" type="audio/mpeg"/>
<itunes:duration>23:31</itunes:duration>
<link>https://www.propublica.org/podcast/the-breakthrough-how-a-reporter-solved-a-decades-old-murder#66537</link>
<pubDate>Fri, 20 Jan 2017 14:00:14 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-how-a-reporter-solved-a-decades-old-murder#66537</guid>
<description><![CDATA[
]]></description>
<dc:subject/>
<dc:date>2017-01-20T14:00:14+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: Meet the Reporter Who Went Undercover in the Hermit Kingdom</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary/>
<enclosure url="http://tracking.feedpress.it/link/10581/5133080/3_Breakthrough_SukiKim.mp3" length="71396156" type="audio/mpeg"/>
<itunes:duration>00:29:44</itunes:duration>
<link>https://www.propublica.org/podcast/the-breakthrough-meet-the-reporter-went-undercover-in-the-hermit-kingdom#66540</link>
<pubDate>Fri, 13 Jan 2017 14:00:24 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-meet-the-reporter-went-undercover-in-the-hermit-kingdom#66540</guid>
<description><![CDATA[
]]></description>
<dc:subject/>
<dc:date>2017-01-13T14:00:24+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
</itunes:subtitle>
</item>
<item>
<title>The Breakthrough: The $2 Drug Test</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary/>
<enclosure url="http://tracking.feedpress.it/link/10581/5094042/2_Breakthrough_DrugTest.mp3" length="63031678" type="audio/mpeg"/>
<itunes:duration>00:26:17</itunes:duration>
<link>https://www.propublica.org/podcast/the-breakthrough-the-2-dollar-drug-test#66543</link>
<pubDate>Fri, 06 Jan 2017 22:22:00 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/the-breakthrough-the-2-dollar-drug-test#66543</guid>
<description><![CDATA[
]]></description>
<dc:subject>Busted</dc:subject>
<dc:date>2017-01-06T22:22:00+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
</itunes:subtitle>
</item>
<item>
<title>Introducing Our New Podcast: The Breakthrough</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary/>
<enclosure url="http://tracking.feedpress.it/link/10581/5094043/1_TheBreakthrough_Promo.mp3" length="4910060" type="audio/mpeg"/>
<itunes:duration>00:02:03</itunes:duration>
<link>https://www.propublica.org/podcast/introducing-our-new-podcast-the-breakthrough#66546</link>
<pubDate>Fri, 06 Jan 2017 22:21:18 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/introducing-our-new-podcast-the-breakthrough#66546</guid>
<description><![CDATA[
]]></description>
<dc:subject/>
<dc:date>2017-01-06T22:21:18+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
</itunes:subtitle>
</item>
<item>
<title>Renewable Energy: An Exxon Investigation Given Second Life as Trump Taps Exec for Cabinet</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary/>
<enclosure url="http://tracking.feedpress.it/link/10581/5023664/52_NeelaBanerjee.mp3" length="34999184" type="audio/mpeg"/>
<itunes:duration>00:14:35</itunes:duration>
<link>https://www.propublica.org/podcast/renewable-energy-an-exxon-investigation-given-second-life-as-trump-taps-exe#66549</link>
<pubDate>Fri, 23 Dec 2016 21:57:02 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/renewable-energy-an-exxon-investigation-given-second-life-as-trump-taps-exe#66549</guid>
<description><![CDATA[
]]></description>
<dc:subject/>
<dc:date>2016-12-23T21:57:02+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
</itunes:subtitle>
</item>
<item>
<title>How We Found a Pro-Trump Group Blew Past Campaign Finance Laws</title>
<itunes:author>ProPublica</itunes:author>
<itunes:summary/>
<enclosure url="http://tracking.feedpress.it/link/10581/4984992/51_Kate_Robert.mp3" length="34152423" type="audio/mpeg"/>
<itunes:duration>00:14:14</itunes:duration>
<link>https://www.propublica.org/podcast/how-we-found-a-pro-trump-group-blew-past-campaign-finance-laws#66552</link>
<pubDate>Fri, 16 Dec 2016 22:45:08 +0000</pubDate>
<guid isPermaLink="false">https://www.propublica.org/podcast/how-we-found-a-pro-trump-group-blew-past-campaign-finance-laws#66552</guid>
<description><![CDATA[
]]></description>
<dc:subject/>
<dc:date>2016-12-16T22:45:08+00:00</dc:date>
<dc:creator>ProPublica</dc:creator>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>journalism, news, investigative journalism, interview, propublica, media, behind the scenes</itunes:keywords>
<itunes:subtitle>
</itunes:subtitle>
</item>
</channel>
</rss>
+40
View File
@@ -0,0 +1,40 @@
# Snapshots of RSS feeds taken with InternetArchive's wayback machine.
## Links
#### Intercepted
Web view: https://web.archive.org/web/20180120083840/https://feeds.feedburner.com/InterceptedWithJeremyScahill
Raw file: https://web.archive.org/web/20180120083840if_/https://feeds.feedburner.com/InterceptedWithJeremyScahill
Updated
* [Web view](https://web.archive.org/web/20180203132146/https://feeds.feedburner.com/InterceptedWithJeremyScahill)
* [Raw file](https://web.archive.org/web/20180203132146/https://feeds.feedburner.com/InterceptedWithJeremyScahill)
#### The TipOff
Web view: https://web.archive.org/web/20180120110727/https://rss.acast.com/thetipoff
Raw file: https://web.archive.org/web/20180120110727if_/https://rss.acast.com/thetipoff
#### Linux Unplugged
Web view: https://web.archive.org/web/20180120110314/https://feeds.feedburner.com/linuxunplugged
Raw file: https://web.archive.org/web/20180120110314if_/https://feeds.feedburner.com/linuxunplugged
#### Steal the stars
Web view: https://web.archive.org/web/20180120104957/https://rss.art19.com/steal-the-stars
Raw file: https://web.archive.org/web/20180120104957if_/https://rss.art19.com/steal-the-stars
#### Greater than Code
Web view: https://web.archive.org/web/20180120104741/https://www.greaterthancode.com/feed/podcast
Raw file: https://web.archive.org/web/20180120104741if_/https://www.greaterthancode.com/feed/podcast
+10 -11
View File
@@ -5,17 +5,16 @@ version = "0.1.0"
workspace = "../"
[dependencies]
error-chain = "0.11"
hyper = "0.11"
log = "0.3"
mime_guess = "1.8"
rand = "0.3"
reqwest = "0.8"
tempdir = "0.3"
[dependencies.diesel]
features = ["sqlite"]
version = "0.16"
error-chain = "0.11.0"
hyper = "0.11.18"
log = "0.4.1"
mime_guess = "1.8.3"
reqwest = "0.8.4"
tempdir = "0.3.6"
glob = "0.2.11"
failure = "0.1.1"
failure_derive = "0.1.1"
[dependencies.hammond-data]
path = "../hammond-data"
+154 -117
View File
@@ -1,22 +1,31 @@
use reqwest;
use glob::glob;
use hyper::header::*;
use tempdir::TempDir;
use rand;
use rand::Rng;
use mime_guess;
use reqwest;
use reqwest::RedirectPolicy;
use tempdir::TempDir;
use std::fs;
use std::fs::{rename, DirBuilder, File};
use std::io::{BufWriter, Read, Write};
use std::path::Path;
use std::sync::{Arc, Mutex};
use errors::*;
use hammond_data::index_feed::Database;
use hammond_data::models::{Episode, Podcast};
use hammond_data::{DL_DIR, HAMMOND_CACHE};
use hammond_data::{EpisodeWidgetQuery, PodcastCoverQuery, Save};
use hammond_data::xdg_dirs::HAMMOND_CACHE;
// use failure::Error;
use errors::DownloadError;
// TODO: Replace path that are of type &str with std::path.
// TODO: Have a convention/document absolute/relative paths, if they should end with / or not.
pub trait DownloadProgress {
fn set_downloaded(&mut self, downloaded: u64);
fn set_size(&mut self, bytes: u64);
fn should_cancel(&self) -> bool;
}
// Adapted from https://github.com/mattgathu/rget .
// I never wanted to write a custom downloader.
// Sorry to those who will have to work with that code.
@@ -24,56 +33,61 @@ use hammond_data::{DL_DIR, HAMMOND_CACHE};
// or bindings for a lib like youtube-dl(python),
// But cant seem to find one.
// TODO: Write unit-tests.
fn download_into(dir: &str, file_title: &str, url: &str) -> Result<String> {
fn download_into(
dir: &str,
file_title: &str,
url: &str,
progress: Option<Arc<Mutex<DownloadProgress>>>,
) -> Result<String, DownloadError> {
info!("GET request to: {}", url);
let client = reqwest::Client::builder().referer(false).build()?;
// Haven't included the loop check as
// Steal the Stars would tigger it as
// it has a loop back before giving correct url
let policy = RedirectPolicy::custom(|attempt| {
info!("Redirect Attempt URL: {:?}", attempt.url());
if attempt.previous().len() > 5 {
attempt.too_many_redirects()
} else if Some(attempt.url()) == attempt.previous().last() {
attempt.loop_detected()
} else {
attempt.follow()
}
});
let client = reqwest::Client::builder()
.redirect(policy)
.referer(false)
.build()?;
let mut resp = client.get(url).send()?;
info!("Status Resp: {}", resp.status());
if !resp.status().is_success() {
// TODO: Return an error instead of panicking.
panic!("Bad request response.");
return Err(DownloadError::UnexpectedResponse(resp.status()));
}
let headers = resp.headers().clone();
let ct_len = headers.get::<ContentLength>().map(|ct_len| **ct_len);
let ct_type = headers.get::<ContentType>();
ct_len.map(|x| info!("File Lenght: {}", x));
ct_type.map(|x| info!("Content Type: {}", x));
// This could be prettier.
// Determine the file extension from the http content-type header.
let ext = if let Some(t) = ct_type {
let mime = mime_guess::get_extensions(t.type_().as_ref(), t.subtype().as_ref());
if let Some(m) = mime {
if m.contains(&t.subtype().as_ref()) {
t.subtype().as_ref().to_string()
} else {
m.first().unwrap().to_string()
}
} else {
error!("Unkown mime type. {}", t);
"unkown".to_string()
}
} else {
error!("Unkown mime type.");
"unkown".to_string()
};
let ext = get_ext(ct_type.cloned()).unwrap_or_else(|| String::from("unknown"));
info!("Extension: {}", ext);
// Construct a temp file to save desired content.
let tempdir = TempDir::new_in(dir, "")?;
let mut rng = rand::thread_rng();
// It has to be a `new_in` instead of new cause rename can't move cross filesystems.
let tempdir = TempDir::new_in(HAMMOND_CACHE.to_str().unwrap(), "temp_download")?;
let out_file = format!("{}/temp.part", tempdir.path().to_str().unwrap(),);
let out_file = format!(
"{}/{}.part",
tempdir.path().to_str().unwrap(),
rng.gen::<usize>()
);
ct_len.map(|x| {
if let Some(p) = progress.clone() {
let mut m = p.lock().unwrap();
m.set_size(x);
}
});
// Save requested content into the file.
save_io(&out_file, &mut resp, ct_len)?;
save_io(&out_file, &mut resp, ct_len, progress)?;
// Construct the desired path.
let target = format!("{}/{}.{}", dir, file_title, ext);
@@ -83,9 +97,29 @@ fn download_into(dir: &str, file_title: &str, url: &str) -> Result<String> {
Ok(target)
}
/// Determine the file extension from the http content-type header.
fn get_ext(content: Option<ContentType>) -> Option<String> {
let cont = content.clone()?;
content
.and_then(|c| mime_guess::get_extensions(c.type_().as_ref(), c.subtype().as_ref()))
.and_then(|c| {
if c.contains(&cont.subtype().as_ref()) {
Some(cont.subtype().as_ref().to_string())
} else {
Some(c.first().unwrap().to_string())
}
})
}
// TODO: Write unit-tests.
// TODO: Refactor... Somehow.
/// Handles the I/O of fetching a remote file and saving into a Buffer and A File.
fn save_io(file: &str, resp: &mut reqwest::Response, content_lenght: Option<u64>) -> Result<()> {
fn save_io(
file: &str,
resp: &mut reqwest::Response,
content_lenght: Option<u64>,
progress: Option<Arc<Mutex<DownloadProgress>>>,
) -> Result<(), DownloadError> {
info!("Downloading into: {}", file);
let chunk_size = match content_lenght {
Some(x) => x as usize / 99,
@@ -100,6 +134,19 @@ fn save_io(file: &str, resp: &mut reqwest::Response, content_lenght: Option<u64>
buffer.truncate(bcount);
if !buffer.is_empty() {
writer.write_all(buffer.as_slice())?;
// This sucks.
// Actually the whole download module is hack, so w/e.
if let Some(prog) = progress.clone() {
let len = writer.get_ref().metadata().map(|x| x.len());
if let Ok(l) = len {
if let Ok(mut m) = prog.lock() {
if m.should_cancel() {
return Err(DownloadError::DownloadCancelled);
}
m.set_downloaded(l);
}
}
}
} else {
break;
}
@@ -108,17 +155,12 @@ fn save_io(file: &str, resp: &mut reqwest::Response, content_lenght: Option<u64>
Ok(())
}
pub fn get_download_folder(pd_title: &str) -> Result<String> {
// It might be better to make it a hash of the title
let download_fold = format!("{}/{}", DL_DIR.to_str().unwrap(), pd_title);
// Create the folder
DirBuilder::new().recursive(true).create(&download_fold)?;
Ok(download_fold)
}
// TODO: Refactor
pub fn get_episode(connection: &Database, ep: &mut Episode, download_folder: &str) -> Result<()> {
pub fn get_episode(
ep: &mut EpisodeWidgetQuery,
download_folder: &str,
progress: Option<Arc<Mutex<DownloadProgress>>>,
) -> Result<(), DownloadError> {
// Check if its alrdy downloaded
if ep.local_uri().is_some() {
if Path::new(ep.local_uri().unwrap()).exists() {
@@ -127,101 +169,96 @@ pub fn get_episode(connection: &Database, ep: &mut Episode, download_folder: &st
// If the path is not valid, then set it to None.
ep.set_local_uri(None);
ep.save(connection)?;
ep.save()?;
};
let res = download_into(download_folder, ep.title().unwrap(), ep.uri());
let path = download_into(
download_folder,
&ep.rowid().to_string(),
ep.uri().unwrap(),
progress,
)?;
if let Ok(path) = res {
// If download succedes set episode local_uri to dlpath.
ep.set_local_uri(Some(&path));
ep.save(connection)?;
Ok(())
} else {
error!("Something whent wrong while downloading.");
Err(res.unwrap_err())
}
// 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(())
}
pub fn cache_image(pd: &Podcast) -> Option<String> {
if pd.image_uri().is_none() {
return None;
}
pub fn cache_image(pd: &PodcastCoverQuery) -> Result<String, DownloadError> {
let url = pd.image_uri()
.ok_or_else(|| DownloadError::NoImageLocation)?
.to_owned();
let url = pd.image_uri().unwrap().to_owned();
if url == "" {
return None;
return Err(DownloadError::NoImageLocation);
}
let download_fold = format!(
"{}{}",
HAMMOND_CACHE.to_str().unwrap(),
pd.title().to_owned()
);
let cache_path = HAMMOND_CACHE
.to_str()
.ok_or_else(|| DownloadError::InvalidCacheLocation)?;
let cache_download_fold = format!("{}{}", cache_path, pd.title().to_owned());
// Hacky way
// TODO: make it so it returns the first cover.* file encountered.
let png = format!("{}/cover.png", download_fold);
let jpg = format!("{}/cover.jpg", download_fold);
let jpe = format!("{}/cover.jpe", download_fold);
let jpeg = format!("{}/cover.jpeg", download_fold);
if Path::new(&png).exists() {
return Some(png);
} else if Path::new(&jpe).exists() {
return Some(jpe);
} else if Path::new(&jpg).exists() {
return Some(jpg);
} else if Path::new(&jpeg).exists() {
return Some(jpeg);
// Weird glob magic.
if let Ok(mut foo) = glob(&format!("{}/cover.*", cache_download_fold)) {
// For some reason there is no .first() method so nth(0) is used
let path = foo.nth(0).and_then(|x| x.ok());
if let Some(p) = path {
return Ok(p.to_str()
.ok_or_else(|| DownloadError::InvalidCachedImageLocation)?
.into());
}
};
// Create the folders if they don't exist.
DirBuilder::new()
.recursive(true)
.create(&download_fold)
.unwrap();
.create(&cache_download_fold)?;
let dlpath = download_into(&download_fold, "cover", &url);
if let Ok(path) = dlpath {
info!("Cached img into: {}", &path);
Some(path)
} else {
error!("Failed to get feed image.");
error!("Error: {}", dlpath.unwrap_err());
None
}
let path = download_into(&cache_download_fold, "cover", &url, None)?;
info!("Cached img into: {}", &path);
Ok(path)
}
#[cfg(test)]
mod tests {
use super::*;
use hammond_data::{DL_DIR, HAMMOND_CACHE};
use hammond_data::models::NewPodcast;
use hammond_data::Source;
use hammond_data::dbqueries;
use hammond_data::pipeline;
use std::fs;
#[test]
fn test_get_dl_folder() {
let foo_ = format!("{}/{}", DL_DIR.to_str().unwrap(), "foo");
assert_eq!(get_download_folder("foo").unwrap(), foo_);
let _ = fs::remove_dir_all(foo_);
}
#[test]
// This test inserts an rss feed to your `XDG_DATA/hammond/hammond.db` so we make it explicit
// to run it.
#[ignore]
fn test_cache_image() {
let pd = NewPodcast {
title: "New Rustacean".to_string(),
description: "".to_string(),
link: "".to_string(),
image_uri: Some("http://newrustacean.com/podcast.png".to_string()),
source_id: 0,
};
let pd = pd.into_podcast();
let url = "https://web.archive.org/web/20180120110727if_/https://rss.acast.com/thetipoff";
// Create and index a source
let source = Source::from_url(url).unwrap();
// Copy it's id
let sid = source.id();
// Convert Source it into a future Feed and index it
pipeline::run(vec![source], true).unwrap();
// Get the Podcast
let pd = dbqueries::get_podcast_from_source_id(sid).unwrap().into();
let img_path = cache_image(&pd);
let foo_ = format!(
"{}{}/cover.png",
"{}{}/cover.jpeg",
HAMMOND_CACHE.to_str().unwrap(),
"New Rustacean"
pd.title()
);
assert_eq!(img_path, Some(foo_));
assert_eq!(img_path.unwrap(), foo_);
fs::remove_file(foo_).unwrap();
}
}
+36 -6
View File
@@ -1,11 +1,41 @@
use diesel::result;
use hammond_data::errors::DataError;
use reqwest;
use std::io;
error_chain! {
foreign_links {
ReqError(reqwest::Error);
IoError(io::Error);
DieselResultError(result::Error);
#[derive(Fail, Debug)]
pub enum DownloadError {
#[fail(display = "Reqwest error: {}", _0)]
RequestError(#[cause] reqwest::Error),
#[fail(display = "Data error: {}", _0)]
DataError(#[cause] DataError),
#[fail(display = "Io error: {}", _0)]
IoError(#[cause] io::Error),
#[fail(display = "Unexpected server response: {}", _0)]
UnexpectedResponse(reqwest::StatusCode),
#[fail(display = "The Download was cancelled.")]
DownloadCancelled,
#[fail(display = "Remote Image location not found.")]
NoImageLocation,
#[fail(display = "Failed to parse CacheLocation.")]
InvalidCacheLocation,
#[fail(display = "Failed to parse Cached Image Location.")]
InvalidCachedImageLocation,
}
impl From<reqwest::Error> for DownloadError {
fn from(err: reqwest::Error) -> Self {
DownloadError::RequestError(err)
}
}
impl From<io::Error> for DownloadError {
fn from(err: io::Error) -> Self {
DownloadError::IoError(err)
}
}
impl From<DataError> for DownloadError {
fn from(err: DataError) -> Self {
DownloadError::DataError(err)
}
}
+7 -5
View File
@@ -1,14 +1,16 @@
#![recursion_limit = "1024"]
#![deny(unused_extern_crates, unused)]
extern crate diesel;
extern crate failure;
#[macro_use]
extern crate error_chain;
extern crate hammond_data;
extern crate hyper;
extern crate failure_derive;
#[macro_use]
extern crate log;
extern crate glob;
extern crate hammond_data;
extern crate hyper;
extern crate mime_guess;
extern crate rand;
extern crate reqwest;
extern crate tempdir;
+17 -10
View File
@@ -6,19 +6,26 @@ version = "0.1.0"
workspace = "../"
[dependencies]
dissolve = "0.2"
gdk = "0.6"
gdk-pixbuf = "0.2"
gio = "0.2"
glib = "0.3"
log = "0.3"
loggerv = "0.4"
open = "1.2"
rayon = "0.9"
chrono = "0.4.0"
dissolve = "0.2.2"
gdk = "0.7.0"
gdk-pixbuf = "0.3.0"
gio = "0.3.0"
glib = "0.4.1"
humansize = "1.1.0"
lazy_static = "1.0.0"
log = "0.4.1"
loggerv = "0.7.0"
open = "1.2.1"
rayon = "0.9.0"
send-cell = "0.1.2"
url = "1.6.0"
failure = "0.1.1"
failure_derive = "0.1.1"
[dependencies.gtk]
features = ["v3_22"]
version = "0.2"
version = "0.3.0"
[dependencies.hammond-data]
path = "../hammond-data"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

+29 -1
View File
@@ -1,7 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.1 -->
<!-- Generated with glade 3.21.0
Copyright (C) 2017 - 2018
This file is part of Hammond.
Hammond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Hammond is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Hammond. If not, see <http://www.gnu.org/licenses/>.
Authors:
Jordan Petridis
Tobias Bernard
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name Hammond -->
<!-- interface-description A podcast client for the GNOME Desktop -->
<!-- interface-copyright 2017 - 2018 -->
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
<object class="GtkBox" id="empty_view">
<property name="visible">True</property>
<property name="can_focus">False</property>
+290 -173
View File
@@ -1,103 +1,312 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.1 -->
<!-- Generated with glade 3.21.0
Copyright (C) 2017 - 2018
This file is part of Hammond.
Hammond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Hammond is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Hammond. If not, see <http://www.gnu.org/licenses/>.
Authors:
Jordan Petridis
Tobias Bernard
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkBox" id="episode_box">
<property name="width_request">100</property>
<property name="height_request">25</property>
<!-- interface-license-type gplv3 -->
<!-- interface-name Hammond -->
<!-- interface-description A podcast client for the GNOME Desktop -->
<!-- interface-copyright 2017 - 2018 -->
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
<object class="GtkBox" id="episode_container">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">5</property>
<property name="margin_bottom">5</property>
<property name="spacing">5</property>
<property name="valign">center</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="play_button">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<property name="margin_top">5</property>
<property name="margin_bottom">5</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-media-play</property>
<property name="use_fallback">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="download_button">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<property name="margin_top">5</property>
<property name="margin_bottom">5</property>
<property name="always_show_image">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-save</property>
<property name="use_fallback">True</property>
<property name="valign">start</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<child>
<object class="GtkLabel" id="title_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Episode Title</property>
<property name="ellipsize">end</property>
<property name="single_line_mode">True</property>
<property name="max_width_chars">64</property>
<property name="track_visited_links">False</property>
<property name="lines">1</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="date_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">3 Jan</property>
<property name="single_line_mode">True</property>
<property name="track_visited_links">False</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="separator1">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">·</property>
<property name="track_visited_links">False</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="duration_label">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">42 min</property>
<property name="single_line_mode">True</property>
<property name="track_visited_links">False</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="separator2">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">·</property>
<property name="track_visited_links">False</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="local_size">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">0 MB</property>
<property name="single_line_mode">True</property>
<property name="track_visited_links">False</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="prog_separator">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">/</property>
<property name="single_line_mode">True</property>
<property name="track_visited_links">False</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="total_size">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">XX MB</property>
<property name="single_line_mode">True</property>
<property name="track_visited_links">False</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">Cancel</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="valign">center</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="download_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="tooltip_text" translatable="yes">Download this episode</property>
<property name="halign">end</property>
<property name="valign">center</property>
<property name="always_show_image">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">document-save-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="play_button">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="tooltip_text" translatable="yes">Play this episode</property>
<property name="valign">center</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">media-playback-start-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">6</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="pack_type">end</property>
<property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="delete_button">
<property name="name">delete_button</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-delete</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="mark_unplayed_button">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Mark episode as Unplayed.</property>
<property name="halign">end</property>
<property name="valign">center</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-undo</property>
</object>
</child>
<object class="GtkProgressBar" id="progress_bar">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_bottom">6</property>
<property name="pulse_step">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -106,97 +315,5 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="mark_played_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Mark episode as played.</property>
<property name="halign">end</property>
<property name="valign">center</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-apply</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="title_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
<property name="ellipsize">end</property>
<property name="lines">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="expand_desc">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label_fill">True</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<property name="min_content_height">100</property>
<property name="max_content_height">600</property>
<property name="propagate_natural_width">True</property>
<property name="propagate_natural_height">True</property>
<child>
<object class="GtkTextView" id="desc_text_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_bottom">5</property>
<property name="editable">False</property>
<property name="wrap_mode">word-char</property>
<property name="cursor_visible">False</property>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Description:</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</interface>
+383
View File
@@ -0,0 +1,383 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.21.0
Copyright (C) 2017 - 2018
This file is part of Hammond.
Hammond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Hammond is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Hammond. If not, see <http://www.gnu.org/licenses/>.
Authors:
Jordan Petridis
Tobias Bernard
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name Hammond -->
<!-- interface-description A podcast client for the GNOME Desktop -->
<!-- interface-copyright 2017 - 2018 -->
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
<object class="GtkBox" id="container">
<property name="name">container</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="name">scrolled_window</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="frame_parent">
<property name="width_request">720</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="margin_top">24</property>
<property name="margin_bottom">24</property>
<property name="orientation">vertical</property>
<property name="spacing">24</property>
<child>
<object class="GtkBox" id="today_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Today</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.5"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkListBox" id="today_list">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="yday_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Yesterday</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.5"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkListBox" id="yday_list">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="week_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">This Week</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.5"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkListBox" id="week_list">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkBox" id="month_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">This Month</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.5"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkListBox" id="month_list">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="rest_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Older</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.5"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkListBox" id="rest_list">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="selection_mode">none</property>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</interface>
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.21.0
Copyright (C) 2017 - 2018
This file is part of Hammond.
Hammond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Hammond is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Hammond. If not, see <http://www.gnu.org/licenses/>.
Authors:
Jordan Petridis
Tobias Bernard
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name Hammond -->
<!-- interface-description A podcast client for the GNOME Desktop -->
<!-- interface-copyright 2017 - 2018 -->
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
<object class="GtkBox" id="container">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkImage" id="cover">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">6</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
<property name="pixel_size">64</property>
<property name="icon_name">image-x-generic-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</interface>
+252 -61
View File
@@ -1,21 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.1 -->
<!-- Generated with glade 3.21.0
Copyright (C) 2017 - 2018
This file is part of Hammond.
Hammond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Hammond is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Hammond. If not, see <http://www.gnu.org/licenses/>.
Authors:
Jordan Petridis
Tobias Bernard
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkPopover" id="add-popover">
<property name="visible">True</property>
<!-- interface-license-type gplv3 -->
<!-- interface-name Hammond -->
<!-- interface-description A podcast client for the GNOME Desktop -->
<!-- interface-copyright 2017 - 2018 -->
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
<object class="GtkPopover" id="add_popover">
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Add a new feed</property>
<property name="valign">center</property>
<property name="relative_to">add_toggle</property>
<property name="position">bottom</property>
<child>
<object class="GtkBox" id="add-box">
<object class="GtkBox" id="add_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="add-box-enter-address-label">
<object class="GtkLabel" id="enter_address_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
@@ -32,12 +65,12 @@
</packing>
</child>
<child>
<object class="GtkBox" id="add-entry-box">
<object class="GtkBox" id="add_entry_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkEntry" id="new-url">
<object class="GtkEntry" id="new_url">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="width_chars">30</property>
@@ -50,14 +83,15 @@
</packing>
</child>
<child>
<object class="GtkStack" id="add-button-stack">
<object class="GtkStack" id="add_button_stack">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="interpolate_size">True</property>
<child>
<object class="GtkButton" id="add-button">
<object class="GtkButton" id="add_button">
<property name="label" translatable="yes">Add</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<style>
@@ -96,7 +130,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="add-box-already-subscribed-label">
<object class="GtkLabel" id="result_label">
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">You are already subscribed to that feed!</property>
@@ -110,67 +144,130 @@
</object>
</child>
</object>
<object class="GtkHeaderBar" id="headerbar1">
<property name="visible">True</property>
<object class="GtkHeaderBar" id="headerbar">
<property name="can_focus">False</property>
<property name="title">Hammond</property>
<property name="has_subtitle">False</property>
<property name="show_close_button">True</property>
<child>
<object class="GtkButton" id="homebutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="valign">center</property>
<property name="always_show_image">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-home</property>
<property name="use_fallback">True</property>
</object>
</child>
</object>
<packing>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="refbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="valign">center</property>
<property name="use_underline">True</property>
<property name="always_show_image">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-refresh</property>
<property name="use_fallback">True</property>
</object>
</child>
</object>
<packing>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkMenuButton" id="add-toggle-button">
<object class="GtkMenuButton" id="add_toggle">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Add a new feed</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="add-button-image">
<object class="GtkImage" id="add-button-image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-add</property>
<property name="use_fallback">True</property>
<property name="icon_name">list-add-symbolic</property>
<property name="icon_size">1</property>
</object>
</child>
<style>
<class name="image-button"/>
</style>
</object>
</child>
<child>
<object class="GtkButton" id="back_button">
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="tooltip_text" translatable="yes">Back</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="back-button-image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">go-previous-symbolic</property>
<property name="icon_size">1</property>
</object>
</child>
<style>
<class name="image-button"/>
</style>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="update_notification">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<child>
<object class="GtkSpinner" id="update_spinner">
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="update_label">
<property name="can_focus">False</property>
<property name="label" translatable="yes">Fetching new episodes</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">3</property>
</packing>
</child>
<child type="title">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkStackSwitcher" id="switch">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="show_title">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">Show Title</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkMenuButton" id="menu_toggle">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="valign">center</property>
<property name="popover">menu_popover</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">open-menu-symbolic</property>
<property name="icon_size">1</property>
</object>
</child>
@@ -180,8 +277,102 @@
</object>
<packing>
<property name="pack_type">end</property>
<property name="position">3</property>
<property name="position">2</property>
</packing>
</child>
</object>
<object class="GtkPopover" id="menu_popover">
<property name="can_focus">False</property>
<property name="relative_to">menu_toggle</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">10</property>
<property name="margin_right">10</property>
<property name="margin_top">10</property>
<property name="margin_bottom">10</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="text" translatable="yes">Preferences</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkModelButton" id="update_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="text" translatable="yes">Check for new episodes</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkModelButton" id="about_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="text" translatable="yes">About</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="text" translatable="yes">Help</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">7</property>
</packing>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="text" translatable="yes">Keyboard Shortcuts</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">8</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
-204
View File
@@ -1,204 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.1 -->
<interface domain="gnome-music">
<requires lib="gtk+" version="3.12"/>
<object class="GtkBox" id="podcast_widget">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin_left">32</property>
<property name="margin_right">32</property>
<property name="margin_start">32</property>
<property name="margin_end">32</property>
<property name="margin_top">64</property>
<property name="margin_bottom">32</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="orientation">vertical</property>
<property name="spacing">15</property>
<child>
<object class="GtkImage" id="cover">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">start</property>
<property name="margin_left">1</property>
<property name="margin_right">1</property>
<property name="margin_start">1</property>
<property name="margin_end">1</property>
<property name="stock">gtk-missing-image</property>
<property name="use_fallback">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<child>
<object class="GtkLabel" id="title_label">
<property name="width_request">50</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="label" translatable="yes">Foobar</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
<property name="wrap">True</property>
<property name="max_width_chars">28</property>
<property name="track_visited_links">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="unsub_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Unsubrscribe from this Podcast.
Warn: This will delete downloaded content associated with this Podcast.</property>
<property name="stock">gtk-delete</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="mark_all_played_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Mark all episodes as Played.</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-apply</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<property name="min_content_width">200</property>
<property name="max_content_width">200</property>
<property name="propagate_natural_width">True</property>
<property name="propagate_natural_height">True</property>
<child>
<object class="GtkTextView" id="desc_text_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
<property name="wrap_mode">word-char</property>
<property name="cursor_visible">False</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<child>
<object class="GtkViewport" id="view">
<property name="width_request">400</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">none</property>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
@@ -1,89 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkBox" id="fb_child">
<property name="width_request">256</property>
<property name="height_request">256</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkOverlay">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
<child type="overlay">
<object class="GtkImage" id="pd_cover">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="stock">gtk-missing-image</property>
<property name="use_fallback">True</property>
<property name="icon_size">6</property>
</object>
</child>
<child type="overlay">
<object class="GtkImage" id="banner">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="halign">end</property>
<property name="valign">start</property>
<property name="stock">gtk-missing-image</property>
</object>
<packing>
<property name="index">1</property>
</packing>
</child>
<child type="overlay">
<object class="GtkLabel" id="banner_label">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="halign">end</property>
<property name="valign">start</property>
<property name="margin_right">40</property>
<property name="margin_top">38</property>
<property name="label" translatable="yes">Num</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
<property name="track_visited_links">False</property>
<property name="xalign">1</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="index">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="pd_title">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label" translatable="yes">label</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
<property name="ellipsize">end</property>
<property name="single_line_mode">True</property>
<property name="max_width_chars">35</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
@@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkBox" id="fb_parent">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkFlowBox" id="flowbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">baseline</property>
<property name="valign">start</property>
<property name="homogeneous">True</property>
<property name="column_spacing">5</property>
<property name="row_spacing">2</property>
<property name="max_children_per_line">20</property>
<property name="selection_mode">none</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</interface>
+282
View File
@@ -0,0 +1,282 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.21.0
Copyright (C) 2017 - 2018
This file is part of Hammond.
Hammond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Hammond is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Hammond. If not, see <http://www.gnu.org/licenses/>.
Authors:
Jordan Petridis
Tobias Bernard
-->
<interface domain="">
<requires lib="gtk+" version="3.12"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name Hammond -->
<!-- interface-description A podcast client for the GNOME Desktop -->
<!-- interface-copyright 2017 - 2018 -->
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
<object class="GtkBox" id="container">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="name">scrolled_window</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="margin_top">24</property>
<property name="margin_bottom">24</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="width_request">624</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="orientation">vertical</property>
<property name="spacing">24</property>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="spacing">12</property>
<child>
<object class="GtkImage" id="cover">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">128</property>
<property name="icon_name">image-x-generic-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child type="center">
<object class="GtkLabel" id="description">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">end</property>
<property name="label" translatable="yes">Show description</property>
<property name="wrap">True</property>
<property name="max_width_chars">57</property>
<attributes>
<attribute name="weight" value="medium"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkMenuButton" id="settings_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="link_button">
<property name="label" translatable="yes">Website</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="unsub_button">
<property name="label" translatable="yes">Unsubscribe</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<style>
<class name="destructive-action"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="episodes">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
<placeholder/>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</interface>
+67
View File
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.21.0
Copyright (C) 2017 - 2018
This file is part of Hammond.
Hammond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Hammond is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Hammond. If not, see <http://www.gnu.org/licenses/>.
Authors:
Jordan Petridis
Tobias Bernard
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name Hammond -->
<!-- interface-description A podcast client for the GNOME Desktop -->
<!-- interface-copyright 2017 - 2018 -->
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
<object class="GtkBox" id="fb_child">
<property name="width_request">256</property>
<property name="height_request">256</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkOverlay">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
<child type="overlay">
<object class="GtkImage" id="pd_cover">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="pixel_size">256</property>
<property name="icon_name">image-x-generic-symbolic</property>
<property name="icon_size">0</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</interface>
+73
View File
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.21.0
Copyright (C) 2017 - 2018
This file is part of Hammond.
Hammond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Hammond is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Hammond. If not, see <http://www.gnu.org/licenses/>.
Authors:
Jordan Petridis
Tobias Bernard
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name Hammond -->
<!-- interface-description A podcast client for the GNOME Desktop -->
<!-- interface-copyright 2017 - 2018 -->
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
<object class="GtkBox" id="fb_parent">
<property name="name">fb_parent</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="name">scrolled_window</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkFlowBox" id="flowbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">start</property>
<property name="margin_top">24</property>
<property name="margin_bottom">24</property>
<property name="homogeneous">True</property>
<property name="column_spacing">12</property>
<property name="row_spacing">12</property>
<property name="max_children_per_line">20</property>
<property name="selection_mode">none</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</interface>
+11
View File
@@ -0,0 +1,11 @@
row {
border-bottom: solid 1px rgba(0,0,0, 0.1);
}
row:last-child {
border-bottom: none;
}
list, border {
border-radius: 4px;
}
+4
View File
@@ -0,0 +1,4 @@
# subdir('icons')
install_data('org.gnome.Hammond.desktop', install_dir : datadir + '/applications')
install_data('org.gnome.Hammond.appdata.xml', install_dir : datadir + '/appdata')
@@ -4,20 +4,20 @@
<name>Hammond</name>
<project_license>GPL-3.0</project_license>
<metadata_license>CC0-1.0</metadata_license>
<developer_name>Daniel García Moreno</developer_name>
<summary>Gtk+ Matrix.org client</summary>
<developer_name>Jordan Petridis</developer_name>
<summary>GNOME Podcast Client written in Rust</summary>
<url type="homepage">https://gitlab.gnome.org/alatiera/Hammond</url>
<description>
Hammond is a Fast, Safe and Reliable Gtk+ Podcast client written in Rust
Hammond is a Gtk+ Podcast client for the GNOME Desktop written in Rust
</description>
<screenshots>
<screenshot>
<image type="source">https://gitlab.gnome.org/alatiera/Hammond/raw/master/assets/podcasts_view.png</image>
<image type="source">https://gitlab.gnome.org/alatiera/Hammond/raw/master/assets/podcast_widget.png</image>
<image type="source">https://gitlab.gnome.org/alatiera/Hammond/raw/master/screenshots/podcasts_view.png</image>
<image type="source">https://gitlab.gnome.org/alatiera/Hammond/raw/master/screenshots/podcast_widget.png</image>
</screenshot>
</screenshots>
<releases>
<release version="0.1.1" date="2017-11-13"/>
<release version="0.3.0" date="2018-02-11"/>
</releases>
<update_contact>jordanpetridis@protonmail.com</update_contact>
</component>
+7 -5
View File
@@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gtk/hammond/">
<file>banner.png</file>
<gresource prefix="/org/gnome/hammond/">
<file preprocess="xml-stripblanks">gtk/episode_widget.ui</file>
<file preprocess="xml-stripblanks">gtk/podcast_widget.ui</file>
<file preprocess="xml-stripblanks">gtk/show_widget.ui</file>
<file preprocess="xml-stripblanks">gtk/empty_view.ui</file>
<file preprocess="xml-stripblanks">gtk/podcasts_view.ui</file>
<file preprocess="xml-stripblanks">gtk/podcasts_child.ui</file>
<file preprocess="xml-stripblanks">gtk/episodes_view.ui</file>
<file preprocess="xml-stripblanks">gtk/episodes_view_widget.ui</file>
<file preprocess="xml-stripblanks">gtk/shows_view.ui</file>
<file preprocess="xml-stripblanks">gtk/shows_child.ui</file>
<file preprocess="xml-stripblanks">gtk/headerbar.ui</file>
<file compressed="true">gtk/style.css</file>
</gresource>
</gresources>
+168
View File
@@ -0,0 +1,168 @@
use gio::{ApplicationExt, ApplicationExtManual, ApplicationFlags};
use glib;
use gtk;
use gtk::prelude::*;
use hammond_data::{Podcast, Source};
use hammond_data::utils::checkup;
use headerbar::Header;
use stacks::Content;
use utils;
use std::sync::Arc;
use std::sync::mpsc::{channel, Receiver, Sender};
use std::time::Duration;
#[derive(Clone, Debug)]
pub enum Action {
UpdateSources(Option<Source>),
RefreshAllViews,
RefreshEpisodesView,
RefreshEpisodesViewBGR,
RefreshShowsView,
RefreshWidget,
RefreshWidgetIfVis,
ReplaceWidget(Arc<Podcast>),
RefreshWidgetIfSame(i32),
ShowWidgetAnimated,
ShowShowsAnimated,
HeaderBarShowTile(String),
HeaderBarNormal,
HeaderBarShowUpdateIndicator,
HeaderBarHideUpdateIndicator,
}
#[derive(Debug)]
pub struct App {
app_instance: gtk::Application,
window: gtk::Window,
header: Arc<Header>,
content: Arc<Content>,
receiver: Receiver<Action>,
sender: Sender<Action>,
}
impl App {
pub fn new() -> App {
let application = gtk::Application::new("org.gnome.Hammond", ApplicationFlags::empty())
.expect("Application Initialization failed...");
// Weird magic I copy-pasted that sets the Application Name in the Shell.
glib::set_application_name("Hammond");
glib::set_prgname(Some("Hammond"));
// Create the main window
let window = gtk::Window::new(gtk::WindowType::Toplevel);
window.set_default_size(860, 640);
window.set_title("Hammond");
let app_clone = application.clone();
window.connect_delete_event(move |_, _| {
app_clone.quit();
Inhibit(false)
});
let (sender, receiver) = channel();
// Create a content instance
let content =
Arc::new(Content::new(sender.clone()).expect("Content Initialization failed."));
// Create the headerbar
let header = Arc::new(Header::new(&content, &window, sender.clone()));
// Add the content main stack to the window.
window.add(&content.get_stack());
App {
app_instance: application,
window,
header,
content,
receiver,
sender,
}
}
pub fn setup_timed_callbacks(&self) {
let sender = self.sender.clone();
// Update the feeds right after the Application is initialized.
gtk::timeout_add_seconds(2, move || {
utils::refresh_feed_wrapper(None, sender.clone());
glib::Continue(false)
});
let sender = self.sender.clone();
// Auto-updater, runs every hour.
// TODO: expose the interval in which it run to a user setting.
gtk::timeout_add_seconds(3600, move || {
utils::refresh_feed_wrapper(None, sender.clone());
glib::Continue(true)
});
// Run a database checkup once the application is initialized.
gtk::timeout_add(300, || {
if let Err(err) = checkup() {
error!("Check up failed: {}", err);
}
glib::Continue(false)
});
}
pub fn run(self) {
let window = self.window.clone();
let app = self.app_instance.clone();
self.app_instance.connect_startup(move |_| {
build_ui(&window, &app);
});
self.setup_timed_callbacks();
let content = self.content.clone();
let headerbar = self.header.clone();
let sender = self.sender.clone();
let receiver = self.receiver;
gtk::idle_add(move || {
match receiver.recv_timeout(Duration::from_millis(10)) {
Ok(Action::UpdateSources(source)) => {
if let Some(s) = source {
utils::refresh_feed_wrapper(Some(vec![s]), sender.clone());
} else {
utils::refresh_feed_wrapper(None, sender.clone());
}
}
Ok(Action::RefreshAllViews) => content.update(),
Ok(Action::RefreshShowsView) => content.update_shows_view(),
Ok(Action::RefreshWidget) => content.update_widget(),
Ok(Action::RefreshWidgetIfVis) => content.update_widget_if_visible(),
Ok(Action::RefreshWidgetIfSame(id)) => content.update_widget_if_same(id),
Ok(Action::RefreshEpisodesView) => content.update_episode_view(),
Ok(Action::RefreshEpisodesViewBGR) => content.update_episode_view_if_baground(),
Ok(Action::ReplaceWidget(pd)) => {
if let Err(err) = content.get_shows().replace_widget(pd) {
error!("Something went wrong while trying to update the ShowWidget.");
error!("Error: {}", err);
}
}
Ok(Action::ShowWidgetAnimated) => content.get_shows().switch_widget_animated(),
Ok(Action::ShowShowsAnimated) => content.get_shows().switch_podcasts_animated(),
Ok(Action::HeaderBarShowTile(title)) => headerbar.switch_to_back(&title),
Ok(Action::HeaderBarNormal) => headerbar.switch_to_normal(),
Ok(Action::HeaderBarShowUpdateIndicator) => headerbar.show_update_notification(),
Ok(Action::HeaderBarHideUpdateIndicator) => headerbar.hide_update_notification(),
Err(_) => (),
}
Continue(true)
});
ApplicationExtManual::run(&self.app_instance, &[]);
}
}
fn build_ui(window: &gtk::Window, app: &gtk::Application) {
window.set_application(app);
window.show_all();
window.activate();
app.connect_activate(move |_| ());
}
+228 -57
View File
@@ -1,69 +1,240 @@
use gtk;
use gtk::prelude::*;
use hammond_data::index_feed;
use hammond_data::index_feed::Database;
use failure::Error;
use failure::ResultExt;
use url::Url;
use podcasts_view::update_podcasts_view;
use utils;
use hammond_data::Source;
use hammond_data::dbqueries;
pub fn get_headerbar(db: &Database, stack: &gtk::Stack) -> gtk::HeaderBar {
let builder = gtk::Builder::new_from_resource("/org/gtk/hammond/gtk/headerbar.ui");
use std::sync::mpsc::Sender;
let header: gtk::HeaderBar = builder.get_object("headerbar1").unwrap();
let home_button: gtk::Button = builder.get_object("homebutton").unwrap();
let refresh_button: gtk::Button = builder.get_object("refbutton").unwrap();
use app::Action;
use stacks::Content;
let add_toggle_button: gtk::MenuButton = builder.get_object("add-toggle-button").unwrap();
let add_popover: gtk::Popover = builder.get_object("add-popover").unwrap();
let new_url: gtk::Entry = builder.get_object("new-url").unwrap();
let add_button: gtk::Button = builder.get_object("add-button").unwrap();
// TODO: check if url exists in the db and lock the button
new_url.connect_changed(move |url| {
println!("{:?}", url.get_text());
});
add_button.connect_clicked(clone!(db, stack, add_popover => move |_| {
let url = new_url.get_text().unwrap_or_default();
on_add_bttn_clicked(&db, &stack, &url);
// TODO: lock the button instead of hiding and add notification of feed added.
// TODO: map the spinner
add_popover.hide();
}));
add_popover.hide();
add_toggle_button.set_popover(&add_popover);
// TODO: make it a back arrow button, that will hide when appropriate,
// and add a StackSwitcher when more views are added.
home_button.connect_clicked(clone!(db, stack => move |_| {
let vis = stack.get_visible_child_name().unwrap();
stack.set_visible_child_name("fb_parent");
if vis != "pdw" {
update_podcasts_view(&db, &stack);
}
}));
// FIXME: There appears to be a memmory leak here.
refresh_button.connect_clicked(clone!(stack, db => move |_| {
utils::refresh_feed(&db, &stack, None, None);
}));
header
#[derive(Debug, Clone)]
pub struct Header {
container: gtk::HeaderBar,
add_toggle: gtk::MenuButton,
switch: gtk::StackSwitcher,
back_button: gtk::Button,
show_title: gtk::Label,
about_button: gtk::ModelButton,
update_button: gtk::ModelButton,
update_box: gtk::Box,
update_label: gtk::Label,
update_spinner: gtk::Spinner,
}
fn on_add_bttn_clicked(db: &Database, stack: &gtk::Stack, url: &str) {
let source = {
let tempdb = db.lock().unwrap();
index_feed::insert_return_source(&tempdb, url)
};
info!("{:?} feed added", url);
impl Default for Header {
fn default() -> Header {
let builder = gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/headerbar.ui");
if let Ok(s) = source {
// update the db
utils::refresh_feed(db, stack, Some(vec![s]), None);
} else {
error!("Expected Error, feed probably already exists.");
error!("Error: {:?}", source.unwrap_err());
let header: gtk::HeaderBar = builder.get_object("headerbar").unwrap();
let add_toggle: gtk::MenuButton = builder.get_object("add_toggle").unwrap();
let switch: gtk::StackSwitcher = builder.get_object("switch").unwrap();
let back_button: gtk::Button = builder.get_object("back_button").unwrap();
let show_title: gtk::Label = builder.get_object("show_title").unwrap();
let update_button: gtk::ModelButton = builder.get_object("update_button").unwrap();
let update_box: gtk::Box = builder.get_object("update_notification").unwrap();
let update_label: gtk::Label = builder.get_object("update_label").unwrap();
let update_spinner: gtk::Spinner = builder.get_object("update_spinner").unwrap();
let about_button: gtk::ModelButton = builder.get_object("about_button").unwrap();
Header {
container: header,
add_toggle,
switch,
back_button,
show_title,
about_button,
update_button,
update_box,
update_label,
update_spinner,
}
}
}
// TODO: Refactor components into smaller state machines
impl Header {
pub fn new(content: &Content, window: &gtk::Window, sender: Sender<Action>) -> Header {
let h = Header::default();
h.init(content, window, sender);
h
}
pub fn init(&self, content: &Content, window: &gtk::Window, sender: Sender<Action>) {
let builder = gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/headerbar.ui");
let add_popover: gtk::Popover = builder.get_object("add_popover").unwrap();
let new_url: gtk::Entry = builder.get_object("new_url").unwrap();
let add_button: gtk::Button = builder.get_object("add_button").unwrap();
let result_label: gtk::Label = builder.get_object("result_label").unwrap();
self.switch.set_stack(&content.get_stack());
new_url.connect_changed(clone!(add_button => move |url| {
if let Err(err) = on_url_change(url, &result_label, &add_button) {
error!("Error: {}", err);
}
}));
add_button.connect_clicked(clone!(add_popover, new_url, sender => move |_| {
if let Err(err) = on_add_bttn_clicked(&new_url, sender.clone()) {
error!("Error: {}", err);
}
add_popover.hide();
}));
self.add_toggle.set_popover(&add_popover);
self.update_button
.connect_clicked(clone!(sender => move |_| {
sender
.send(Action::UpdateSources(None))
.expect("Action channel blew up.");
}));
self.about_button
.connect_clicked(clone!(window => move |_| {
about_dialog(&window);
}));
// Add the Headerbar to the window.
window.set_titlebar(&self.container);
let switch = &self.switch;
let add_toggle = &self.add_toggle;
let show_title = &self.show_title;
self.back_button.connect_clicked(
clone!(switch, add_toggle, show_title, sender => move |back| {
switch.show();
add_toggle.show();
back.hide();
show_title.hide();
if let Err(err) = sender.send(Action::ShowShowsAnimated) {
error!("Action channel blew up: {}", err);
}
}),
);
}
pub fn switch_to_back(&self, title: &str) {
self.switch.hide();
self.add_toggle.hide();
self.back_button.show();
self.set_show_title(title);
self.show_title.show();
}
pub fn switch_to_normal(&self) {
self.switch.show();
self.add_toggle.show();
self.back_button.hide();
self.show_title.hide();
}
pub fn set_show_title(&self, title: &str) {
self.show_title.set_text(title)
}
pub fn show_update_notification(&self) {
self.update_spinner.start();
self.update_box.show();
self.update_spinner.show();
self.update_label.show();
}
pub fn hide_update_notification(&self) {
self.update_spinner.stop();
self.update_box.hide();
self.update_spinner.hide();
self.update_label.hide();
}
}
fn on_add_bttn_clicked(entry: &gtk::Entry, sender: Sender<Action>) -> Result<(), Error> {
let url = entry.get_text().unwrap_or_default();
let source = Source::from_url(&url).context("Failed to convert url to a Source entry.")?;
entry.set_text("");
sender
.send(Action::UpdateSources(Some(source)))
.context("App channel blew up.")?;
Ok(())
}
fn on_url_change(
entry: &gtk::Entry,
result: &gtk::Label,
add_button: &gtk::Button,
) -> Result<(), Error> {
let uri = entry
.get_text()
.ok_or_else(|| format_err!("GtkEntry blew up somehow."))?;
debug!("Url: {}", uri);
let url = Url::parse(&uri);
// TODO: refactor to avoid duplication
match url {
Ok(u) => {
if !dbqueries::source_exists(u.as_str())? {
add_button.set_sensitive(true);
result.hide();
result.set_label("");
} else {
add_button.set_sensitive(false);
result.set_label("Show already exists.");
result.show();
}
Ok(())
}
Err(err) => {
add_button.set_sensitive(false);
if !uri.is_empty() {
result.set_label("Invalid url.");
result.show();
error!("Error: {}", err);
} else {
result.hide();
}
Ok(())
}
}
}
// Totally copied it from fractal.
// https://gitlab.gnome.org/danigm/fractal/blob/503e311e22b9d7540089d735b92af8e8f93560c5/fractal-gtk/src/app.rs#L1883-1912
fn about_dialog(window: &gtk::Window) {
// Feel free to add yourself if you contribured.
let authors = &[
"Constantin Nickel",
"Gabriele Musco",
"James Wykeham-Martin",
"Jordan Petridis",
"Julian Sparber",
];
let dialog = gtk::AboutDialog::new();
// Waiting for a logo.
// dialog.set_logo_icon_name("org.gnome.Hammond");
dialog.set_logo_icon_name("multimedia-player");
dialog.set_comments("A Podcast Client for the GNOME Desktop.");
dialog.set_copyright("© 2017, 2018 Jordan Petridis");
dialog.set_license_type(gtk::License::Gpl30);
dialog.set_modal(true);
// TODO: make it show it fetches the commit hash from which it was built
// and the version number is kept in sync automaticly
dialog.set_version("0.3");
dialog.set_program_name("Hammond");
// TODO: Need a wiki page first.
// dialog.set_website("https://wiki.gnome.org/Design/Apps/Potential/Podcasts");
// dialog.set_website_label("Learn more about Hammond");
dialog.set_transient_for(window);
dialog.set_artists(&["Tobias Bernard"]);
dialog.set_authors(authors);
dialog.show();
}
+44 -75
View File
@@ -1,27 +1,36 @@
#![cfg_attr(feature = "cargo-clippy", allow(clone_on_ref_ptr, needless_pass_by_value))]
// #![deny(unused_extern_crates, unused)]
extern crate gdk;
extern crate gdk_pixbuf;
extern crate gio;
extern crate glib;
extern crate gtk;
// extern crate diesel;
#[macro_use]
extern crate failure;
// #[macro_use]
// extern crate failure_derive;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate log;
extern crate chrono;
extern crate dissolve;
extern crate hammond_data;
extern crate hammond_downloader;
#[macro_use]
extern crate log;
extern crate humansize;
extern crate loggerv;
extern crate open;
extern crate send_cell;
extern crate url;
// extern crate rayon;
// use rayon::prelude::*;
use log::LogLevel;
use hammond_data::dbcheckup;
use std::sync::{Arc, Mutex};
use log::Level;
use gtk::prelude::*;
use gio::{ActionMapExt, ApplicationExt, MenuExt, SimpleActionExt};
// http://gtk-rs.org/tuto/closures
#[macro_export]
@@ -42,81 +51,41 @@ macro_rules! clone {
);
}
mod views;
mod widgets;
mod headerbar;
// They do not need to be public
// But it helps when looking at the generated docs.
pub mod views;
pub mod widgets;
pub mod stacks;
mod utils;
mod static_resource;
pub mod headerbar;
pub mod app;
use views::podcasts_view;
pub mod utils;
pub mod manager;
pub mod static_resource;
/*
THIS IS STILL A PROTOTYPE.
*/
fn build_ui(app: &gtk::Application) {
let db = Arc::new(Mutex::new(hammond_data::establish_connection()));
let menu = gio::Menu::new();
menu.append("Quit", "app.quit");
menu.append("Checkup", "app.check");
app.set_app_menu(&menu);
// Get the main window
let window = gtk::ApplicationWindow::new(app);
window.set_default_size(1150, 650);
// Setup the Stack that will manage the switch between podcasts_view and podcast_widget.
let stack = podcasts_view::setup_stack(&db);
window.add(&stack);
window.connect_delete_event(|w, _| {
w.destroy();
Inhibit(false)
});
// Setup quit in the app menu since default is overwritten.
let quit = gio::SimpleAction::new("quit", None);
let window2 = window.clone();
quit.connect_activate(move |_, _| {
window2.destroy();
});
app.add_action(&quit);
// Setup the dbcheckup in the app menu.
let check = gio::SimpleAction::new("check", None);
check.connect_activate(clone!(db => move |_, _| {
let _ = dbcheckup::run(&db);
}));
app.add_action(&check);
// queue a db update 1 minute after the startup.
gtk::idle_add(clone!(db, stack => move || {
utils::refresh_feed(&db, &stack, None, Some(60));
glib::Continue(false)
}));
// Get the headerbar
let header = headerbar::get_headerbar(&db, &stack);
window.set_titlebar(&header);
window.show_all();
window.activate();
app.connect_activate(move |_| ());
}
use app::App;
fn main() {
// TODO: make the the logger a cli -vv option
loggerv::init_with_level(LogLevel::Info).unwrap();
loggerv::init_with_level(Level::Info).expect("Error initializing loggerv.");
gtk::init().expect("Error initializing gtk.");
static_resource::init().expect("Something went wrong with the resource file initialization.");
hammond_data::init().expect("Hammond Initialazation failed.");
let application = gtk::Application::new("org.gnome.Hammond", gio::ApplicationFlags::empty())
.expect("Initialization failed...");
// Add custom style
let provider = gtk::CssProvider::new();
gtk::CssProvider::load_from_resource(&provider, "/org/gnome/hammond/gtk/style.css");
gtk::StyleContext::add_provider_for_screen(
&gdk::Screen::get_default().expect("Error initializing gtk css provider."),
&provider,
600,
);
application.connect_startup(move |app| {
build_ui(app);
});
// This set's the app to dark mode.
// It wiil be in the user's preference later.
// Uncomment it to run with the dark theme variant.
// let settings = gtk::Settings::get_default().unwrap();
// settings.set_property_gtk_application_prefer_dark_theme(true);
application.run(&[]);
App::new().run();
}
+202
View File
@@ -0,0 +1,202 @@
use failure::Error;
// use hammond_data::Episode;
use hammond_data::dbqueries;
use hammond_downloader::downloader::{get_episode, DownloadProgress};
use app::Action;
use std::collections::HashMap;
use std::sync::{Arc, Mutex, RwLock};
use std::sync::mpsc::Sender;
// use std::sync::atomic::AtomicUsize;
// use std::path::PathBuf;
use std::thread;
// This is messy, undocumented and hacky af.
// I am terrible at writting downloaders and download managers.
#[derive(Debug)]
pub struct Progress {
total_bytes: u64,
downloaded_bytes: u64,
cancel: bool,
}
impl Default for Progress {
fn default() -> Self {
Progress {
total_bytes: 0,
downloaded_bytes: 0,
cancel: false,
}
}
}
impl Progress {
pub fn get_fraction(&self) -> f64 {
let ratio = self.downloaded_bytes as f64 / self.total_bytes as f64;
debug!("{:?}", self);
debug!("Ratio completed: {}", ratio);
if ratio >= 1.0 {
return 1.0;
};
ratio
}
pub fn get_total_size(&self) -> u64 {
self.total_bytes
}
pub fn get_downloaded(&self) -> u64 {
self.downloaded_bytes
}
pub fn cancel(&mut self) {
self.cancel = true;
}
}
impl DownloadProgress for Progress {
fn set_downloaded(&mut self, downloaded: u64) {
self.downloaded_bytes = downloaded
}
fn set_size(&mut self, bytes: u64) {
self.total_bytes = bytes;
}
fn should_cancel(&self) -> bool {
self.cancel
}
}
lazy_static! {
pub static ref ACTIVE_DOWNLOADS: Arc<RwLock<HashMap<i32, Arc<Mutex<Progress>>>>> = {
Arc::new(RwLock::new(HashMap::new()))
};
}
pub fn add(id: i32, directory: &str, sender: Sender<Action>) -> Result<(), Error> {
// Create a new `Progress` struct to keep track of dl progress.
let prog = Arc::new(Mutex::new(Progress::default()));
{
let mut m = ACTIVE_DOWNLOADS
.write()
.map_err(|_| format_err!("Failed to get a lock on the mutex."))?;
m.insert(id, prog.clone());
}
let dir = directory.to_owned();
thread::spawn(move || {
if let Ok(episode) = dbqueries::get_episode_from_rowid(id) {
let pid = episode.podcast_id();
let id = episode.rowid();
if let Err(err) = get_episode(&mut episode.into(), dir.as_str(), Some(prog)) {
error!("Error while trying to download an episode");
error!("Error: {}", err);
}
{
if let Ok(mut m) = ACTIVE_DOWNLOADS.write() {
info!("Removed: {:?}", m.remove(&id));
}
}
// {
// if let Ok(m) = ACTIVE_DOWNLOADS.read() {
// debug!("ACTIVE DOWNLOADS: {:#?}", m);
// }
// }
sender
.send(Action::RefreshEpisodesView)
.expect("Action channel blew up.");
sender
.send(Action::RefreshWidgetIfSame(pid))
.expect("Action channel blew up.");
}
});
Ok(())
}
#[cfg(test)]
mod tests {
use super::*;
use hammond_data::{Episode, Source};
use hammond_data::dbqueries;
use hammond_data::pipeline;
use hammond_data::utils::get_download_folder;
use hammond_downloader::downloader::get_episode;
use std::{thread, time};
use std::fs;
use std::path::Path;
use std::sync::mpsc::channel;
#[test]
// This test inserts an rss feed to your `XDG_DATA/hammond/hammond.db` so we make it explicit
// to run it.
#[ignore]
// THIS IS NOT A RELIABLE TEST
// Just quick sanity check
fn test_start_dl() {
let url = "https://web.archive.org/web/20180120110727if_/https://rss.acast.com/thetipoff";
// Create and index a source
let source = Source::from_url(url).unwrap();
// Copy it's id
let sid = source.id();
pipeline::run(vec![source], true).unwrap();
// Get the Podcast
let pd = dbqueries::get_podcast_from_source_id(sid).unwrap();
let title = "Coming soon... The Tip Off";
// Get an episode
let episode: Episode = dbqueries::get_episode_from_pk(title, pd.id()).unwrap();
let (sender, _rx) = channel();
let download_fold = get_download_folder(&pd.title()).unwrap();
add(episode.rowid(), download_fold.as_str(), sender).unwrap();
assert_eq!(ACTIVE_DOWNLOADS.read().unwrap().len(), 1);
// Give it soem time to download the file
thread::sleep(time::Duration::from_secs(20));
let final_path = format!("{}/{}.mp3", &download_fold, episode.rowid());
assert!(Path::new(&final_path).exists());
fs::remove_file(final_path).unwrap();
}
#[test]
fn test_dl_steal_the_stars() {
let url =
"https://web.archive.org/web/20180120104957if_/https://rss.art19.com/steal-the-stars";
// Create and index a source
let source = Source::from_url(url).unwrap();
// Copy it's id
let sid = source.id();
pipeline::run(vec![source], true).unwrap();
// Get the Podcast
let pd = dbqueries::get_podcast_from_source_id(sid).unwrap();
let title = "Introducing Steal the Stars";
// Get an episode
let mut episode = dbqueries::get_episode_from_pk(title, pd.id())
.unwrap()
.into();
let download_fold = get_download_folder(&pd.title()).unwrap();
get_episode(&mut episode, &download_fold, None).unwrap();
let final_path = format!("{}/{}.mp3", &download_fold, episode.rowid());
assert!(Path::new(&final_path).exists());
fs::remove_file(final_path).unwrap();
}
}
+94
View File
@@ -0,0 +1,94 @@
use gtk;
use gtk::prelude::*;
use failure::Error;
use app::Action;
use stacks::EpisodeStack;
use stacks::ShowStack;
use std::sync::Arc;
use std::sync::mpsc::Sender;
#[derive(Debug, Clone)]
pub struct Content {
stack: gtk::Stack,
shows: Arc<ShowStack>,
episodes: Arc<EpisodeStack>,
sender: Sender<Action>,
}
impl Content {
pub fn new(sender: Sender<Action>) -> Result<Content, Error> {
let stack = gtk::Stack::new();
let episodes = Arc::new(EpisodeStack::new(sender.clone())?);
let shows = Arc::new(ShowStack::new(sender.clone())?);
stack.add_titled(&episodes.get_stack(), "episodes", "Episodes");
stack.add_titled(&shows.get_stack(), "shows", "Shows");
Ok(Content {
stack,
shows,
episodes,
sender,
})
}
pub fn update(&self) {
self.update_episode_view();
self.update_shows_view();
self.update_widget()
}
// TODO: Maybe propagate the error?
pub fn update_episode_view(&self) {
if let Err(err) = self.episodes.update() {
error!("Something went wrong while trying to update the episode view.");
error!("Error: {}", err);
}
}
pub fn update_episode_view_if_baground(&self) {
if self.stack.get_visible_child_name() != Some("episodes".into()) {
self.update_episode_view();
}
}
pub fn update_shows_view(&self) {
if let Err(err) = self.shows.update_podcasts() {
error!("Something went wrong while trying to update the ShowsView.");
error!("Error: {}", err);
}
}
pub fn update_widget(&self) {
if let Err(err) = self.shows.update_widget() {
error!("Something went wrong while trying to update the Show Widget.");
error!("Error: {}", err);
}
}
pub fn update_widget_if_same(&self, pid: i32) {
if let Err(err) = self.shows.update_widget_if_same(pid) {
error!("Something went wrong while trying to update the Show Widget.");
error!("Error: {}", err);
}
}
pub fn update_widget_if_visible(&self) {
if self.stack.get_visible_child_name() == Some("shows".to_string())
&& self.shows.get_stack().get_visible_child_name() == Some("widget".to_string())
{
self.update_widget();
}
}
pub fn get_stack(&self) -> gtk::Stack {
self.stack.clone()
}
pub fn get_shows(&self) -> Arc<ShowStack> {
self.shows.clone()
}
}
+77
View File
@@ -0,0 +1,77 @@
use gtk;
use gtk::Cast;
use gtk::prelude::*;
use failure::Error;
use views::{EmptyView, EpisodesView};
use app::Action;
use std::sync::mpsc::Sender;
#[derive(Debug, Clone)]
pub struct EpisodeStack {
stack: gtk::Stack,
sender: Sender<Action>,
}
impl EpisodeStack {
pub fn new(sender: Sender<Action>) -> Result<EpisodeStack, Error> {
let episodes = EpisodesView::new(sender.clone())?;
let empty = EmptyView::new();
let stack = gtk::Stack::new();
stack.add_named(&episodes.container, "episodes");
stack.add_named(&empty.container, "empty");
if episodes.is_empty() {
stack.set_visible_child_name("empty");
} else {
stack.set_visible_child_name("episodes");
}
Ok(EpisodeStack { stack, sender })
}
// Look into refactoring to a state-machine.
pub fn update(&self) -> Result<(), Error> {
let old = self.stack
.get_child_by_name("episodes")
.ok_or_else(|| format_err!("Faild to get \"episodes\" child from the stack."))?
.downcast::<gtk::Box>()
.map_err(|_| format_err!("Failed to downcast stack child to a Box."))?;
debug!("Name: {:?}", WidgetExt::get_name(&old));
let scrolled_window = old.get_children()
.first()
.ok_or_else(|| format_err!("Box container has no childs."))?
.clone()
.downcast::<gtk::ScrolledWindow>()
.map_err(|_| format_err!("Failed to downcast stack child to a ScrolledWindow."))?;
debug!("Name: {:?}", WidgetExt::get_name(&scrolled_window));
let eps = EpisodesView::new(self.sender.clone())?;
// Copy the vertical scrollbar adjustment from the old view into the new one.
scrolled_window
.get_vadjustment()
.map(|x| eps.set_vadjustment(&x));
self.stack.remove(&old);
self.stack.add_named(&eps.container, "episodes");
if eps.is_empty() {
self.stack.set_visible_child_name("empty");
} else {
self.stack.set_visible_child_name("episodes");
}
old.destroy();
Ok(())
}
pub fn get_stack(&self) -> gtk::Stack {
self.stack.clone()
}
}
+7
View File
@@ -0,0 +1,7 @@
mod content;
mod episode;
mod show;
pub use self::content::Content;
pub use self::episode::EpisodeStack;
pub use self::show::ShowStack;
+180
View File
@@ -0,0 +1,180 @@
use gtk;
use gtk::Cast;
use gtk::prelude::*;
use failure::Error;
use hammond_data::Podcast;
use hammond_data::dbqueries;
use views::{EmptyView, ShowsPopulated};
use app::Action;
use widgets::ShowWidget;
use std::sync::Arc;
use std::sync::mpsc::Sender;
#[derive(Debug, Clone)]
pub struct ShowStack {
stack: gtk::Stack,
sender: Sender<Action>,
}
impl ShowStack {
pub fn new(sender: Sender<Action>) -> Result<ShowStack, Error> {
let stack = gtk::Stack::new();
let show = ShowStack {
stack,
sender: sender.clone(),
};
let pop = ShowsPopulated::new(sender.clone())?;
let widget = ShowWidget::default();
let empty = EmptyView::new();
show.stack.add_named(&pop.container, "podcasts");
show.stack.add_named(&widget.container, "widget");
show.stack.add_named(&empty.container, "empty");
if pop.is_empty() {
show.stack.set_visible_child_name("empty")
} else {
show.stack.set_visible_child_name("podcasts")
}
Ok(show)
}
// pub fn update(&self) {
// self.update_widget();
// self.update_podcasts();
// }
pub fn update_podcasts(&self) -> Result<(), Error> {
let vis = self.stack
.get_visible_child_name()
.ok_or_else(|| format_err!("Failed to get visible child name."))?;
let old = self.stack
.get_child_by_name("podcasts")
.ok_or_else(|| format_err!("Faild to get \"podcasts\" child from the stack."))?
.downcast::<gtk::Box>()
.map_err(|_| format_err!("Failed to downcast stack child to a Box."))?;
debug!("Name: {:?}", WidgetExt::get_name(&old));
let scrolled_window = old.get_children()
.first()
.ok_or_else(|| format_err!("Box container has no childs."))?
.clone()
.downcast::<gtk::ScrolledWindow>()
.map_err(|_| format_err!("Failed to downcast stack child to a ScrolledWindow."))?;
debug!("Name: {:?}", WidgetExt::get_name(&scrolled_window));
let pop = ShowsPopulated::new(self.sender.clone())?;
// Copy the vertical scrollbar adjustment from the old view into the new one.
scrolled_window
.get_vadjustment()
.map(|x| pop.set_vadjustment(&x));
self.stack.remove(&old);
self.stack.add_named(&pop.container, "podcasts");
if pop.is_empty() {
self.stack.set_visible_child_name("empty");
} else if vis != "empty" {
self.stack.set_visible_child_name(&vis);
} else {
self.stack.set_visible_child_name("podcasts");
}
old.destroy();
Ok(())
}
pub fn replace_widget(&self, pd: Arc<Podcast>) -> Result<(), Error> {
let old = self.stack
.get_child_by_name("widget")
.ok_or_else(|| format_err!("Faild to get \"widget\" child from the stack."))?
.downcast::<gtk::Box>()
.map_err(|_| format_err!("Failed to downcast stack child to a Box."))?;
debug!("Name: {:?}", WidgetExt::get_name(&old));
let new = ShowWidget::new(pd, self.sender.clone());
// Each composite ShowWidget is a gtkBox with the Podcast.id encoded in the gtk::Widget
// name. It's a hack since we can't yet subclass GObject easily.
let oldid = WidgetExt::get_name(&old);
let newid = WidgetExt::get_name(&new.container);
debug!("Old widget Name: {:?}\nNew widget Name: {:?}", oldid, newid);
// Only copy the old scrollbar if both widget's represent the same podcast.
if newid == oldid {
let scrolled_window = old.get_children()
.first()
.ok_or_else(|| format_err!("Box container has no childs."))?
.clone()
.downcast::<gtk::ScrolledWindow>()
.map_err(|_| format_err!("Failed to downcast stack child to a ScrolledWindow."))?;
debug!("Name: {:?}", WidgetExt::get_name(&scrolled_window));
// Copy the vertical scrollbar adjustment from the old view into the new one.
scrolled_window
.get_vadjustment()
.map(|x| new.set_vadjustment(&x));
}
self.stack.remove(&old);
self.stack.add_named(&new.container, "widget");
Ok(())
}
pub fn update_widget(&self) -> Result<(), Error> {
let vis = self.stack
.get_visible_child_name()
.ok_or_else(|| format_err!("Failed to get visible child name."))?;
let old = self.stack
.get_child_by_name("widget")
.ok_or_else(|| format_err!("Faild to get \"widget\" child from the stack."))?;
let id = WidgetExt::get_name(&old);
if id == Some("GtkBox".to_string()) || id.is_none() {
return Ok(());
}
let id = id.ok_or_else(|| format_err!("Failed to get widget's name."))?;
let pd = dbqueries::get_podcast_from_id(id.parse::<i32>()?)?;
self.replace_widget(Arc::new(pd))?;
self.stack.set_visible_child_name(&vis);
old.destroy();
Ok(())
}
// Only update widget if it's podcast_id is equal to pid.
pub fn update_widget_if_same(&self, pid: i32) -> Result<(), Error> {
let old = self.stack
.get_child_by_name("widget")
.ok_or_else(|| format_err!("Faild to get \"widget\" child from the stack."))?;
let id = WidgetExt::get_name(&old);
if id != Some(pid.to_string()) || id.is_none() {
debug!("Different widget. Early return");
return Ok(());
}
self.update_widget()
}
pub fn switch_podcasts_animated(&self) {
self.stack
.set_visible_child_full("podcasts", gtk::StackTransitionType::SlideRight);
}
pub fn switch_widget_animated(&self) {
self.stack
.set_visible_child_full("widget", gtk::StackTransitionType::SlideLeft)
}
pub fn get_stack(&self) -> gtk::Stack {
self.stack.clone()
}
}
+1 -4
View File
@@ -6,11 +6,8 @@ pub fn init() -> Result<(), Error> {
let res_bytes = include_bytes!("../resources/resources.gresource");
// Create Resource it will live as long the value lives.
// TODO: change it into Bytes::From_static once the fix lands
// https://bugzilla.gnome.org/show_bug.cgi?id=790030
let gbytes = Bytes::from(&res_bytes.as_ref());
let gbytes = Bytes::from_static(res_bytes.as_ref());
let resource = Resource::new_from_data(&gbytes)?;
// let resource = Resource::new_from_data(&res_bytes.as_ref().into())?;
// Register the resource so It wont be dropped and will continue to live in memory.
resources_register(&resource);
+120 -56
View File
@@ -1,70 +1,134 @@
use glib;
use gtk;
#![cfg_attr(feature = "cargo-clippy", allow(type_complexity))]
use hammond_data::index_feed;
use hammond_data::models::Source;
use hammond_data::index_feed::Database;
use failure::Error;
use gdk_pixbuf::Pixbuf;
use send_cell::SendCell;
use std::{thread, time};
use std::cell::RefCell;
use std::sync::mpsc::{channel, Receiver};
// use hammond_data::feed;
use hammond_data::{PodcastCoverQuery, Source};
use hammond_data::dbqueries;
use hammond_data::pipeline;
use hammond_downloader::downloader;
use views::podcasts_view;
use std::collections::HashMap;
use std::sync::{Mutex, RwLock};
use std::sync::mpsc::Sender;
use std::thread;
type Foo = RefCell<Option<(Database, gtk::Stack, Receiver<bool>)>>;
use app::Action;
// Create a thread local storage that will store the arguments to be transfered.
thread_local!(static GLOBAL: Foo = RefCell::new(None));
pub fn refresh_feed_wrapper(source: Option<Vec<Source>>, sender: Sender<Action>) {
if let Err(err) = refresh_feed(source, sender) {
error!("An error occured while trying to update the feeds.");
error!("Error: {}", err);
}
}
/// Update the rss feed(s) originating from `Source`.
/// Update the rss feed(s) originating from `source`.
/// If `source` is None, Fetches all the `Source` entries in the database and updates them.
/// `delay` represents the desired time in seconds for the thread to sleep before executing.
/// When It's done,it queues up a `podcast_view` refresh.
pub fn refresh_feed(
db: &Database,
stack: &gtk::Stack,
source: Option<Vec<Source>>,
delay: Option<u64>,
) {
// Create a async channel.
let (sender, receiver) = channel();
/// When It's done,it queues up a `RefreshViews` action.
fn refresh_feed(source: Option<Vec<Source>>, sender: Sender<Action>) -> Result<(), Error> {
sender.send(Action::HeaderBarShowUpdateIndicator)?;
// Pass the desired arguments into the Local Thread Storage.
GLOBAL.with(clone!(db, stack => move |global| {
*global.borrow_mut() = Some((db, stack, receiver));
}));
thread::spawn(move || {
let mut sources = source.unwrap_or_else(|| {
dbqueries::get_sources().expect("Failed to retrieve Sources from the database.")
});
thread::spawn(clone!(db => move || {
if let Some(s) = delay{
let t = time::Duration::from_secs(s);
thread::sleep(t);
}
let feeds = {
if let Some(mut vec) = source {
Ok(index_feed::fetch_feeds(&db, &mut vec))
} else {
index_feed::fetch_all_feeds(&db)
// Work around to improve the feed addition experience.
// Many times links to rss feeds are just redirects(usually to an https version).
// Sadly I haven't figured yet a nice way to follow up links redirects without getting
// to lifetime hell with futures and hyper.
// So the requested refresh is only of 1 feed, and the feed fails to be indexed,
// (as a 301 redict would update the source entry and exit), another refresh is run.
// For more see hammond_data/src/models/source.rs `fn request_constructor`.
// also ping me on irc if or open an issue if you want to tackle it.
if sources.len() == 1 {
let source = sources.remove(0);
let id = source.id();
if let Err(err) = pipeline::index_single_source(source, false) {
error!("Error While trying to update the database.");
error!("Error msg: {}", err);
if let Ok(source) = dbqueries::get_source_from_id(id) {
if let Err(err) = pipeline::index_single_source(source, false) {
error!("Error While trying to update the database.");
error!("Error msg: {}", err);
}
}
}
};
if let Ok(mut x) = feeds {
index_feed::index_feed(&db, &mut x);
info!("Indexing done.");
sender.send(true).expect("Couldn't send data to channel");;
glib::idle_add(refresh_podcasts_view);
};
}));
}
fn refresh_podcasts_view() -> glib::Continue {
GLOBAL.with(|global| {
if let Some((ref db, ref stack, ref reciever)) = *global.borrow() {
if reciever.try_recv().is_ok() {
podcasts_view::update_podcasts_view(db, stack);
} else {
// This is what would normally run
if let Err(err) = pipeline::run(sources, false) {
error!("Error While trying to update the database.");
error!("Error msg: {}", err);
}
}
sender
.send(Action::HeaderBarHideUpdateIndicator)
.expect("Action channel blew up.");
sender
.send(Action::RefreshAllViews)
.expect("Action channel blew up.");
});
glib::Continue(false)
Ok(())
}
lazy_static! {
static ref CACHED_PIXBUFS: RwLock<HashMap<(i32, u32), Mutex<SendCell<Pixbuf>>>> = {
RwLock::new(HashMap::new())
};
}
// 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) -> Result<Pixbuf, Error> {
{
let hashmap = CACHED_PIXBUFS
.read()
.map_err(|_| format_err!("Failed to get a lock on the pixbuf cache mutex."))?;
if let Some(px) = hashmap.get(&(pd.id(), size)) {
let m = px.lock()
.map_err(|_| format_err!("Failed to lock pixbuf mutex."))?;
return Ok(m.clone().into_inner());
}
}
let img_path = downloader::cache_image(pd)?;
let px = Pixbuf::new_from_file_at_scale(&img_path, size as i32, size as i32, true)?;
let mut hashmap = CACHED_PIXBUFS
.write()
.map_err(|_| format_err!("Failed to lock pixbuf mutex."))?;
hashmap.insert((pd.id(), size), Mutex::new(SendCell::new(px.clone())));
Ok(px)
}
#[cfg(test)]
mod tests {
use super::*;
use hammond_data::Source;
use hammond_data::dbqueries;
#[test]
// This test inserts an rss feed to your `XDG_DATA/hammond/hammond.db` so we make it explicit
// to run it.
#[ignore]
fn test_get_pixbuf_from_path() {
let url = "https://web.archive.org/web/20180120110727if_/https://rss.acast.com/thetipoff";
// Create and index a source
let source = Source::from_url(url).unwrap();
// Copy it's id
let sid = source.id();
pipeline::run(vec![source], true).unwrap();
// Get the Podcast
let pd = dbqueries::get_podcast_from_source_id(sid).unwrap();
let pxbuf = get_pixbuf_from_path(&pd.into(), 256);
assert!(pxbuf.is_ok());
}
}
+21
View File
@@ -0,0 +1,21 @@
use gtk;
#[derive(Debug, Clone)]
pub struct EmptyView {
pub container: gtk::Box,
}
impl Default for EmptyView {
fn default() -> Self {
let builder = gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/empty_view.ui");
let view: gtk::Box = builder.get_object("empty_view").unwrap();
EmptyView { container: view }
}
}
impl EmptyView {
pub fn new() -> EmptyView {
EmptyView::default()
}
}
+234
View File
@@ -0,0 +1,234 @@
use chrono::prelude::*;
use failure::Error;
use gtk;
use gtk::prelude::*;
use hammond_data::EpisodeWidgetQuery;
use hammond_data::dbqueries;
use app::Action;
use utils::get_pixbuf_from_path;
use widgets::EpisodeWidget;
use std::sync::mpsc::Sender;
#[derive(Debug, Clone)]
enum ListSplit {
Today,
Yday,
Week,
Month,
Rest,
}
#[derive(Debug, Clone)]
pub struct EpisodesView {
pub container: gtk::Box,
scrolled_window: gtk::ScrolledWindow,
frame_parent: gtk::Box,
today_box: gtk::Box,
yday_box: gtk::Box,
week_box: gtk::Box,
month_box: gtk::Box,
rest_box: gtk::Box,
today_list: gtk::ListBox,
yday_list: gtk::ListBox,
week_list: gtk::ListBox,
month_list: gtk::ListBox,
rest_list: gtk::ListBox,
}
impl Default for EpisodesView {
fn default() -> Self {
let builder = gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/episodes_view.ui");
let container: gtk::Box = builder.get_object("container").unwrap();
let scrolled_window: gtk::ScrolledWindow = builder.get_object("scrolled_window").unwrap();
let frame_parent: gtk::Box = builder.get_object("frame_parent").unwrap();
let today_box: gtk::Box = builder.get_object("today_box").unwrap();
let yday_box: gtk::Box = builder.get_object("yday_box").unwrap();
let week_box: gtk::Box = builder.get_object("week_box").unwrap();
let month_box: gtk::Box = builder.get_object("month_box").unwrap();
let rest_box: gtk::Box = builder.get_object("rest_box").unwrap();
let today_list: gtk::ListBox = builder.get_object("today_list").unwrap();
let yday_list: gtk::ListBox = builder.get_object("yday_list").unwrap();
let week_list: gtk::ListBox = builder.get_object("week_list").unwrap();
let month_list: gtk::ListBox = builder.get_object("month_list").unwrap();
let rest_list: gtk::ListBox = builder.get_object("rest_list").unwrap();
EpisodesView {
container,
scrolled_window,
frame_parent,
today_box,
yday_box,
week_box,
month_box,
rest_box,
today_list,
yday_list,
week_list,
month_list,
rest_list,
}
}
}
// TODO: REFACTOR ME
impl EpisodesView {
pub fn new(sender: Sender<Action>) -> Result<EpisodesView, Error> {
let view = EpisodesView::default();
let episodes = dbqueries::get_episodes_widgets_with_limit(50)?;
let now_utc = Utc::now();
episodes.into_iter().for_each(|ep| {
let epoch = ep.epoch();
let viewep = EpisodesViewWidget::new(ep, sender.clone());
let t = split(&now_utc, i64::from(epoch));
match t {
ListSplit::Today => {
view.today_list.add(&viewep.container);
}
ListSplit::Yday => {
view.yday_list.add(&viewep.container);
}
ListSplit::Week => {
view.week_list.add(&viewep.container);
}
ListSplit::Month => {
view.month_list.add(&viewep.container);
}
ListSplit::Rest => {
view.rest_list.add(&viewep.container);
}
}
});
if view.today_list.get_children().is_empty() {
view.today_box.hide();
}
if view.yday_list.get_children().is_empty() {
view.yday_box.hide();
}
if view.week_list.get_children().is_empty() {
view.week_box.hide();
}
if view.month_list.get_children().is_empty() {
view.month_box.hide();
}
if view.rest_list.get_children().is_empty() {
view.rest_box.hide();
}
view.container.show_all();
Ok(view)
}
pub fn is_empty(&self) -> bool {
if !self.today_list.get_children().is_empty() {
return false;
}
if !self.yday_list.get_children().is_empty() {
return false;
}
if !self.week_list.get_children().is_empty() {
return false;
}
if !self.month_list.get_children().is_empty() {
return false;
}
if !self.rest_list.get_children().is_empty() {
return false;
}
true
}
/// Set scrolled window vertical adjustment.
pub fn set_vadjustment(&self, vadjustment: &gtk::Adjustment) {
self.scrolled_window.set_vadjustment(vadjustment)
}
}
fn split(now: &DateTime<Utc>, epoch: i64) -> ListSplit {
let ep = Utc.timestamp(epoch, 0);
if now.ordinal() == ep.ordinal() && now.year() == ep.year() {
ListSplit::Today
} else if now.ordinal() == ep.ordinal() + 1 && now.year() == ep.year() {
ListSplit::Yday
} else if now.iso_week().week() == ep.iso_week().week() && now.year() == ep.year() {
ListSplit::Week
} else if now.month() == ep.month() && now.year() == ep.year() {
ListSplit::Month
} else {
ListSplit::Rest
}
}
#[derive(Debug, Clone)]
struct EpisodesViewWidget {
container: gtk::Box,
image: gtk::Image,
episode: gtk::Box,
}
impl Default for EpisodesViewWidget {
fn default() -> Self {
let builder =
gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/episodes_view_widget.ui");
let container: gtk::Box = builder.get_object("container").unwrap();
let image: gtk::Image = builder.get_object("cover").unwrap();
let ep = EpisodeWidget::default();
container.pack_start(&ep.container, true, true, 6);
EpisodesViewWidget {
container,
image,
episode: ep.container,
}
}
}
impl EpisodesViewWidget {
fn new(episode: EpisodeWidgetQuery, sender: Sender<Action>) -> EpisodesViewWidget {
let builder =
gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/episodes_view_widget.ui");
let container: gtk::Box = builder.get_object("container").unwrap();
let image: gtk::Image = builder.get_object("cover").unwrap();
let pid = episode.podcast_id();
let ep = EpisodeWidget::new(episode, sender.clone());
let view = EpisodesViewWidget {
container,
image,
episode: ep.container,
};
view.init(pid);
view
}
fn init(&self, podcast_id: i32) {
if let Err(err) = self.set_cover(podcast_id) {
error!("Failed to set a cover: {}", err)
}
self.container.pack_start(&self.episode, true, true, 6);
}
fn set_cover(&self, podcast_id: i32) -> Result<(), Error> {
let pd = dbqueries::get_podcast_cover_from_id(podcast_id)?;
let img = get_pixbuf_from_path(&pd, 64)?;
self.image.set_from_pixbuf(&img);
Ok(())
}
}
+7 -1
View File
@@ -1 +1,7 @@
pub mod podcasts_view;
mod shows;
mod episodes;
mod empty;
pub use self::empty::EmptyView;
pub use self::episodes::EpisodesView;
pub use self::shows::ShowsPopulated;
-157
View File
@@ -1,157 +0,0 @@
use gtk;
use gtk::prelude::*;
use gdk_pixbuf::Pixbuf;
use hammond_data::dbqueries;
use hammond_data::models::Podcast;
use hammond_data::index_feed::Database;
use widgets::podcast::*;
fn setup_empty_view(stack: &gtk::Stack) {
let builder = gtk::Builder::new_from_resource("/org/gtk/hammond/gtk/empty_view.ui");
let view: gtk::Box = builder.get_object("empty_view").unwrap();
stack.add_named(&view, "empty");
}
fn show_empty_view(stack: &gtk::Stack) {
stack.set_visible_child_name("empty");
info!("Empty view.");
}
fn populate_flowbox(db: &Database, flowbox: &gtk::FlowBox) {
let podcasts = {
let db = db.lock().unwrap();
dbqueries::get_podcasts(&db)
};
if let Ok(pds) = podcasts {
pds.iter().for_each(|parent| {
let f = create_flowbox_child(db, parent);
flowbox.add(&f);
});
flowbox.show_all();
}
}
fn create_flowbox_child(db: &Database, pd: &Podcast) -> gtk::FlowBoxChild {
let builder = gtk::Builder::new_from_resource("/org/gtk/hammond/gtk/podcasts_child.ui");
// Copy of gnome-music AlbumWidget
let box_: gtk::Box = builder.get_object("fb_child").unwrap();
let pd_title: gtk::Label = builder.get_object("pd_title").unwrap();
let pd_cover: gtk::Image = builder.get_object("pd_cover").unwrap();
let banner: gtk::Image = builder.get_object("banner").unwrap();
let banner_title: gtk::Label = builder.get_object("banner_label").unwrap();
pd_title.set_text(pd.title());
let cover = get_pixbuf_from_path(pd);
if let Some(img) = cover {
pd_cover.set_from_pixbuf(&img);
};
configure_banner(db, pd, &banner, &banner_title);
let fbc = gtk::FlowBoxChild::new();
// There's probably a better way to store the id somewhere.
fbc.set_name(&pd.id().to_string());
fbc.add(&box_);
fbc
}
fn configure_banner(db: &Database, pd: &Podcast, banner: &gtk::Image, banner_title: &gtk::Label) {
let bann = Pixbuf::new_from_resource_at_scale("/org/gtk/hammond/banner.png", 256, 256, true);
if let Ok(b) = bann {
banner.set_from_pixbuf(&b);
let new_episodes = {
let tempdb = db.lock().unwrap();
dbqueries::get_pd_unplayed_episodes(&tempdb, pd)
};
if let Ok(n) = new_episodes {
if !n.is_empty() {
banner_title.set_text(&n.len().to_string());
banner.show();
banner_title.show();
}
}
}
}
fn on_flowbox_child_activate(db: &Database, stack: &gtk::Stack, parent: &Podcast) {
let old = stack.get_child_by_name("pdw").unwrap();
let pdw = podcast_widget(db, stack, parent);
stack.remove(&old);
stack.add_named(&pdw, "pdw");
stack.set_visible_child(&pdw);
// aggresive memory cleanup
// probably not needed
old.destroy();
}
fn setup_podcasts_flowbox(db: &Database, stack: &gtk::Stack) -> gtk::FlowBox {
let builder = gtk::Builder::new_from_resource("/org/gtk/hammond/gtk/podcasts_view.ui");
let fb_parent: gtk::Box = builder.get_object("fb_parent").unwrap();
let flowbox: gtk::FlowBox = builder.get_object("flowbox").unwrap();
init_flowbox(db, stack, &flowbox);
stack.add_named(&fb_parent, "fb_parent");
if flowbox.get_children().is_empty() {
show_empty_view(stack);
} else {
stack.set_visible_child(&fb_parent);
};
flowbox
}
pub fn setup_stack(db: &Database) -> gtk::Stack {
let stack = gtk::Stack::new();
stack.set_transition_type(gtk::StackTransitionType::SlideLeftRight);
setup_empty_view(&stack);
setup_podcast_widget(&stack);
setup_podcasts_flowbox(db, &stack);
stack
}
pub fn update_podcasts_view(db: &Database, stack: &gtk::Stack) {
let vis = stack.get_visible_child_name().unwrap();
let old = stack.get_child_by_name("fb_parent").unwrap();
stack.remove(&old);
let flowbox = setup_podcasts_flowbox(db, stack);
if vis == "empty" && !flowbox.get_children().is_empty() {
stack.set_visible_child_name("fb_parent");
} else if vis == "fb_parent" && flowbox.get_children().is_empty() {
stack.set_visible_child_name("empty");
} else {
// preserve the visible widget
stack.set_visible_child_name(&vis);
};
// aggresive memory cleanup
// probably not needed
old.destroy();
}
fn init_flowbox(db: &Database, stack: &gtk::Stack, flowbox: &gtk::FlowBox) {
// TODO: handle unwraps.
flowbox.connect_child_activated(clone!(db, stack => move |_, child| {
// This is such an ugly hack...
let id = child.get_name().unwrap().parse::<i32>().unwrap();
let parent = {
let tempdb = db.lock().unwrap();
dbqueries::get_podcast_from_id(&tempdb, id).unwrap()
};
on_flowbox_child_activate(&db, &stack, &parent);
}));
// Populate the flowbox with the Podcasts.
populate_flowbox(db, flowbox);
}
+142
View File
@@ -0,0 +1,142 @@
use failure::Error;
use gtk;
use gtk::prelude::*;
use hammond_data::Podcast;
use hammond_data::dbqueries;
use app::Action;
use utils::get_pixbuf_from_path;
use std::sync::Arc;
use std::sync::mpsc::Sender;
#[derive(Debug, Clone)]
pub struct ShowsPopulated {
pub container: gtk::Box,
scrolled_window: gtk::ScrolledWindow,
flowbox: gtk::FlowBox,
}
impl Default for ShowsPopulated {
fn default() -> Self {
let builder = gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/shows_view.ui");
let container: gtk::Box = builder.get_object("fb_parent").unwrap();
let scrolled_window: gtk::ScrolledWindow = builder.get_object("scrolled_window").unwrap();
let flowbox: gtk::FlowBox = builder.get_object("flowbox").unwrap();
ShowsPopulated {
container,
scrolled_window,
flowbox,
}
}
}
impl ShowsPopulated {
pub fn new(sender: Sender<Action>) -> Result<ShowsPopulated, Error> {
let pop = ShowsPopulated::default();
pop.init(sender)?;
Ok(pop)
}
pub fn init(&self, sender: Sender<Action>) -> Result<(), Error> {
self.flowbox.connect_child_activated(move |_, child| {
if let Err(err) = on_child_activate(child, sender.clone()) {
error!(
"Something went wrong during flowbox child activation: {}.",
err
)
};
});
// Populate the flowbox with the Podcasts.
self.populate_flowbox()
}
fn populate_flowbox(&self) -> Result<(), Error> {
let podcasts = dbqueries::get_podcasts()?;
podcasts
.into_iter()
.map(|pd| Arc::new(pd))
.for_each(|parent| {
let flowbox_child = ShowsChild::new(parent);
self.flowbox.add(&flowbox_child.child);
});
self.flowbox.show_all();
Ok(())
}
pub fn is_empty(&self) -> bool {
self.flowbox.get_children().is_empty()
}
/// Set scrolled window vertical adjustment.
pub fn set_vadjustment(&self, vadjustment: &gtk::Adjustment) {
self.scrolled_window.set_vadjustment(vadjustment)
}
}
fn on_child_activate(child: &gtk::FlowBoxChild, sender: Sender<Action>) -> Result<(), Error> {
use gtk::WidgetExt;
// This is such an ugly hack...
let id = WidgetExt::get_name(child)
.ok_or_else(|| format_err!("Faild to get \"episodes\" child from the stack."))?
.parse::<i32>()?;
let pd = Arc::new(dbqueries::get_podcast_from_id(id)?);
sender.send(Action::HeaderBarShowTile(pd.title().into()))?;
sender.send(Action::ReplaceWidget(pd))?;
sender.send(Action::ShowWidgetAnimated)?;
Ok(())
}
#[derive(Debug)]
struct ShowsChild {
container: gtk::Box,
cover: gtk::Image,
child: gtk::FlowBoxChild,
}
impl Default for ShowsChild {
fn default() -> Self {
let builder = gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/shows_child.ui");
let container: gtk::Box = builder.get_object("fb_child").unwrap();
let cover: gtk::Image = builder.get_object("pd_cover").unwrap();
let child = gtk::FlowBoxChild::new();
child.add(&container);
ShowsChild {
container,
cover,
child,
}
}
}
impl ShowsChild {
pub fn new(pd: Arc<Podcast>) -> ShowsChild {
let child = ShowsChild::default();
child.init(pd);
child
}
fn init(&self, pd: Arc<Podcast>) {
self.container.set_tooltip_text(pd.title());
if let Err(err) = self.set_cover(pd.clone()) {
error!("Failed to set a cover: {}", err)
}
WidgetExt::set_name(&self.child, &pd.id().to_string());
}
fn set_cover(&self, pd: Arc<Podcast>) -> Result<(), Error> {
let image = get_pixbuf_from_path(&pd.clone().into(), 256)?;
self.cover.set_from_pixbuf(&image);
Ok(())
}
}
+400 -186
View File
@@ -1,214 +1,428 @@
use open;
use hammond_data::dbqueries;
use hammond_data::models::{Episode, Podcast};
use hammond_downloader::downloader;
use hammond_data::index_feed::Database;
use hammond_data::dbcheckup::*;
use hammond_data::errors::*;
use dissolve::strip_html_tags;
use std::thread;
use std::cell::RefCell;
use std::sync::mpsc::{channel, Receiver};
use std::path::Path;
use glib;
use gtk;
use chrono::prelude::*;
use gtk::prelude::*;
use gtk::{ContainerExt, TextBufferExt};
type Foo = RefCell<Option<(gtk::Button, gtk::Button, gtk::Button, Receiver<bool>)>>;
use chrono::Duration;
use failure::Error;
use humansize::{file_size_opts as size_opts, FileSize};
use open;
thread_local!(static GLOBAL: Foo = RefCell::new(None));
use hammond_data::{EpisodeWidgetQuery, Podcast};
use hammond_data::dbqueries;
use hammond_data::utils::get_download_folder;
fn epidose_widget(db: &Database, episode: &mut Episode, pd_title: &str) -> gtk::Box {
// This is just a prototype and will be reworked probably.
let builder = gtk::Builder::new_from_resource("/org/gtk/hammond/gtk/episode_widget.ui");
use app::Action;
use manager;
let ep: gtk::Box = builder.get_object("episode_box").unwrap();
let download_button: gtk::Button = builder.get_object("download_button").unwrap();
let play_button: gtk::Button = builder.get_object("play_button").unwrap();
let delete_button: gtk::Button = builder.get_object("delete_button").unwrap();
let played_button: gtk::Button = builder.get_object("mark_played_button").unwrap();
let unplayed_button: gtk::Button = builder.get_object("mark_unplayed_button").unwrap();
use std::path::Path;
use std::sync::{Arc, Mutex};
use std::sync::mpsc::Sender;
let title_label: gtk::Label = builder.get_object("title_label").unwrap();
// let desc_label: gtk::Label = builder.get_object("desc_label").unwrap();
let expander: gtk::Expander = builder.get_object("expand_desc").unwrap();
let desc_text_view: gtk::TextView = builder.get_object("desc_text_view").unwrap();
lazy_static! {
static ref SIZE_OPTS: Arc<size_opts::FileSizeOpts> = {
// Declare a custom humansize option struct
// See: https://docs.rs/humansize/1.0.2/humansize/file_size_opts/struct.FileSizeOpts.html
Arc::new(size_opts::FileSizeOpts {
divider: size_opts::Kilo::Binary,
units: size_opts::Kilo::Decimal,
decimal_places: 0,
decimal_zeroes: 0,
fixed_at: size_opts::FixedAt::No,
long_units: false,
space: true,
suffix: "",
allow_negative: false,
})
};
title_label.set_xalign(0.0);
if let Some(t) = episode.title() {
title_label.set_text(t);
}
if episode.description().is_some() {
let d = episode.description().unwrap().to_owned();
expander.connect_activate(move |_| {
let plain_text = strip_html_tags(&d).join(" ");
// TODO: handle unwrap
let buff = desc_text_view.get_buffer().unwrap();
buff.set_text(plain_text.trim());
});
}
if episode.played().is_some() {
unplayed_button.show();
played_button.hide();
}
// Show or hide the play/delete/download buttons upon widget initialization.
let local_uri = episode.local_uri();
if local_uri.is_some() && Path::new(local_uri.unwrap()).exists() {
download_button.hide();
play_button.show();
delete_button.show();
}
play_button.connect_clicked(
clone!(db, episode, played_button, unplayed_button => move |_| {
on_play_bttn_clicked(&db, episode.id());
let _ = set_played_now(&db, &mut episode.clone());
played_button.hide();
unplayed_button.show();
}),
);
delete_button.connect_clicked(
clone!(episode, db, play_button, download_button => move |del| {
on_delete_bttn_clicked(&db, episode.id());
del.hide();
play_button.hide();
download_button.show();
}),
);
played_button.connect_clicked(clone!(db, episode, unplayed_button => move |played| {
let _ = set_played_now(&db, &mut episode.clone());
played.hide();
unplayed_button.show();
}));
unplayed_button.connect_clicked(clone!(db, episode, played_button => move |un| {
let mut episode = episode.clone();
episode.set_played(None);
let _ = episode.save(&db);
un.hide();
played_button.show();
}));
let pd_title = pd_title.to_owned();
download_button.connect_clicked(
clone!(db, play_button, delete_button, episode => move |dl| {
on_download_clicked(
&db,
&pd_title,
&mut episode.clone(),
dl,
&play_button,
&delete_button,
);
}),
);
ep
static ref NOW: DateTime<Utc> = Utc::now();
}
// TODO: show notification when dl is finished.
fn on_download_clicked(
db: &Database,
pd_title: &str,
ep: &mut Episode,
download_bttn: &gtk::Button,
play_bttn: &gtk::Button,
del_bttn: &gtk::Button,
) {
// Create a async channel.
let (sender, receiver) = channel();
#[derive(Debug, Clone)]
pub struct EpisodeWidget {
pub container: gtk::Box,
play: gtk::Button,
download: gtk::Button,
cancel: gtk::Button,
title: gtk::Label,
date: gtk::Label,
duration: gtk::Label,
progress: gtk::ProgressBar,
total_size: gtk::Label,
local_size: gtk::Label,
separator1: gtk::Label,
separator2: gtk::Label,
prog_separator: gtk::Label,
}
// Pass the desired arguments into the Local Thread Storage.
GLOBAL.with(clone!(download_bttn, play_bttn, del_bttn => move |global| {
*global.borrow_mut() = Some((download_bttn, play_bttn, del_bttn, receiver));
}));
impl Default for EpisodeWidget {
fn default() -> Self {
let builder = gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/episode_widget.ui");
let pd_title = pd_title.to_owned();
let mut ep = ep.clone();
thread::spawn(clone!(db => move || {
let download_fold = downloader::get_download_folder(&pd_title).unwrap();
let e = downloader::get_episode(&db, &mut ep, download_fold.as_str());
if let Err(err) = e {
error!("Error while trying to download: {}", ep.uri());
let container: gtk::Box = builder.get_object("episode_container").unwrap();
let progress: gtk::ProgressBar = builder.get_object("progress_bar").unwrap();
let download: gtk::Button = builder.get_object("download_button").unwrap();
let play: gtk::Button = builder.get_object("play_button").unwrap();
let cancel: gtk::Button = builder.get_object("cancel_button").unwrap();
let title: gtk::Label = builder.get_object("title_label").unwrap();
let date: gtk::Label = builder.get_object("date_label").unwrap();
let duration: gtk::Label = builder.get_object("duration_label").unwrap();
let local_size: gtk::Label = builder.get_object("local_size").unwrap();
let total_size: gtk::Label = builder.get_object("total_size").unwrap();
let separator1: gtk::Label = builder.get_object("separator1").unwrap();
let separator2: gtk::Label = builder.get_object("separator2").unwrap();
let prog_separator: gtk::Label = builder.get_object("prog_separator").unwrap();
EpisodeWidget {
container,
progress,
download,
play,
cancel,
title,
duration,
date,
total_size,
local_size,
separator1,
separator2,
prog_separator,
}
}
}
impl EpisodeWidget {
pub fn new(episode: EpisodeWidgetQuery, sender: Sender<Action>) -> EpisodeWidget {
let widget = EpisodeWidget::default();
widget.init(episode, sender);
widget
}
fn init(&self, episode: EpisodeWidgetQuery, sender: Sender<Action>) {
WidgetExt::set_name(&self.container, &episode.rowid().to_string());
// Set the title label state.
self.set_title(&episode);
// Set the duaration label.
self.set_duration(episode.duration());
// Set the date label.
self.set_date(episode.epoch());
// Show or hide the play/delete/download buttons upon widget initialization.
if let Err(err) = self.show_buttons(episode.local_uri()) {
debug!("Failed to determine play/download button state.");
debug!("Error: {}", err);
}
// Set the size label.
if let Err(err) = self.set_total_size(episode.length()) {
error!("Failed to set the Size label.");
error!("Error: {}", err);
};
sender.send(true).expect("Couldn't send data to channel");;
glib::idle_add(receive);
}));
}
fn on_play_bttn_clicked(db: &Database, episode_id: i32) {
let local_uri = {
let tempdb = db.lock().unwrap();
dbqueries::get_episode_local_uri_from_id(&tempdb, episode_id).unwrap()
};
if let Some(uri) = local_uri {
if Path::new(&uri).exists() {
info!("Opening {}", uri);
let e = open::that(&uri);
if let Err(err) = e {
error!("Error while trying to open file: {}", uri);
error!("Error: {}", err);
};
}
} else {
error!(
"Something went wrong evaluating the following path: {:?}",
local_uri
);
// Determine what the state of the progress bar should be.
if let Err(err) = self.determine_progess_bar() {
error!("Something went wrong determining the ProgressBar State.");
error!("Error: {}", err);
}
let episode = Arc::new(Mutex::new(episode));
let title = self.title.clone();
self.play
.connect_clicked(clone!(episode, sender => move |_| {
if let Ok(mut ep) = episode.lock() {
if let Err(err) = on_play_bttn_clicked(&mut ep, &title, sender.clone()){
error!("Error: {}", err);
};
}
}));
self.download
.connect_clicked(clone!(episode, sender => move |dl| {
dl.set_sensitive(false);
if let Ok(ep) = episode.lock() {
if let Err(err) = on_download_clicked(&ep, sender.clone()) {
error!("Download failed to start.");
error!("Error: {}", err);
} else {
info!("Donwload started succesfully.");
}
}
}));
}
/// Show or hide the play/delete/download buttons upon widget initialization.
fn show_buttons(&self, local_uri: Option<&str>) -> Result<(), Error> {
let path = local_uri.ok_or_else(|| format_err!("Path is None"))?;
if Path::new(path).exists() {
self.download.hide();
self.play.show();
}
Ok(())
}
/// Determine the title state.
fn set_title(&self, episode: &EpisodeWidgetQuery) {
self.title.set_text(episode.title());
// Grey out the title if the episode is played.
if episode.played().is_some() {
self.title
.get_style_context()
.map(|c| c.add_class("dim-label"));
}
}
/// Set the date label depending on the current time.
fn set_date(&self, epoch: i32) {
let date = Utc.timestamp(i64::from(epoch), 0);
if NOW.year() == date.year() {
self.date.set_text(date.format("%e %b").to_string().trim());
} else {
self.date
.set_text(date.format("%e %b %Y").to_string().trim());
};
}
/// Set the duration label.
fn set_duration(&self, seconds: Option<i32>) -> Option<()> {
let minutes = Duration::seconds(seconds?.into()).num_minutes();
if minutes == 0 {
return None;
}
self.duration.set_text(&format!("{} min", minutes));
self.duration.show();
self.separator1.show();
Some(())
}
/// Set the Episode label dependings on its size
fn set_total_size(&self, bytes: Option<i32>) -> Result<(), Error> {
let size = bytes.ok_or_else(|| format_err!("Size is None."))?;
if size == 0 {
bail!("Size is 0.");
}
let s = size.file_size(SIZE_OPTS.clone())
.map_err(|err| format_err!("{}", err))?;
self.total_size.set_text(&s);
self.total_size.show();
self.separator2.show();
Ok(())
}
// FIXME: REFACTOR ME
// Something Something State-Machine?
fn determine_progess_bar(&self) -> Result<(), Error> {
let id = WidgetExt::get_name(&self.container)
.ok_or_else(|| format_err!("Failed to get widget Name"))?
.parse::<i32>()?;
let active_dl = || -> Result<Option<_>, Error> {
let m = manager::ACTIVE_DOWNLOADS
.read()
.map_err(|_| format_err!("Failed to get a lock on the mutex."))?;
Ok(m.get(&id).cloned())
}()?;
if let Some(prog) = active_dl {
// FIXME: Document me?
self.download.hide();
self.progress.show();
self.local_size.show();
self.total_size.show();
self.separator2.show();
self.prog_separator.show();
self.cancel.show();
let progress_bar = self.progress.clone();
let total_size = self.total_size.clone();
let local_size = self.local_size.clone();
// Setup a callback that will update the progress bar.
update_progressbar_callback(prog.clone(), id, &progress_bar, &local_size);
// Setup a callback that will update the total_size label
// with the http ContentLength header number rather than
// relying to the RSS feed.
update_total_size_callback(prog.clone(), &total_size);
self.cancel.connect_clicked(clone!(prog => move |cancel| {
if let Ok(mut m) = prog.lock() {
m.cancel();
cancel.set_sensitive(false);
}
}));
}
Ok(())
}
}
fn on_delete_bttn_clicked(db: &Database, episode_id: i32) {
let mut ep = {
let tempdb = db.lock().unwrap();
dbqueries::get_episode_from_id(&tempdb, episode_id).unwrap()
};
fn on_download_clicked(ep: &EpisodeWidgetQuery, sender: Sender<Action>) -> Result<(), Error> {
let pd = dbqueries::get_podcast_from_id(ep.podcast_id())?;
let download_fold = get_download_folder(&pd.title().to_owned())?;
let e = delete_local_content(db, &mut ep);
if let Err(err) = e {
error!("Error while trying to delete file: {:?}", ep.local_uri());
error!("Error: {}", err);
};
// Start a new download.
manager::add(ep.rowid(), &download_fold, sender.clone())?;
// Update Views
sender.send(Action::RefreshEpisodesView)?;
sender.send(Action::RefreshWidgetIfVis)?;
Ok(())
}
fn receive() -> glib::Continue {
GLOBAL.with(|global| {
if let Some((ref download_bttn, ref play_bttn, ref del_bttn, ref reciever)) =
*global.borrow()
{
if reciever.try_recv().is_ok() {
download_bttn.hide();
play_bttn.show();
del_bttn.show();
}
}
});
glib::Continue(false)
fn on_play_bttn_clicked(
episode: &mut EpisodeWidgetQuery,
title: &gtk::Label,
sender: Sender<Action>,
) -> Result<(), Error> {
open_uri(episode.rowid())?;
if episode.set_played_now().is_ok() {
title.get_style_context().map(|c| c.add_class("dim-label"));
sender.send(Action::RefreshEpisodesViewBGR)?;
};
Ok(())
}
pub fn episodes_listbox(db: &Database, pd: &Podcast) -> Result<gtk::ListBox> {
let conn = db.lock().unwrap();
let mut episodes = dbqueries::get_pd_episodes(&conn, pd)?;
drop(conn);
fn open_uri(rowid: i32) -> Result<(), Error> {
let uri = dbqueries::get_episode_local_uri_from_id(rowid)?
.ok_or_else(|| format_err!("Expected Some found None."))?;
if Path::new(&uri).exists() {
info!("Opening {}", uri);
open::that(&uri)?;
} else {
bail!("File \"{}\" does not exist.", uri);
}
Ok(())
}
// Setup a callback that will update the progress bar.
#[cfg_attr(feature = "cargo-clippy", allow(if_same_then_else))]
fn update_progressbar_callback(
prog: Arc<Mutex<manager::Progress>>,
episode_rowid: i32,
progress_bar: &gtk::ProgressBar,
local_size: &gtk::Label,
) {
timeout_add(
400,
clone!(prog, progress_bar, progress_bar, local_size=> move || {
progress_bar_helper(prog.clone(), episode_rowid, &progress_bar, &local_size)
.unwrap_or(glib::Continue(false))
}),
);
}
fn progress_bar_helper(
prog: Arc<Mutex<manager::Progress>>,
episode_rowid: i32,
progress_bar: &gtk::ProgressBar,
local_size: &gtk::Label,
) -> Result<glib::Continue, Error> {
let (fraction, downloaded) = {
let m = prog.lock()
.map_err(|_| format_err!("Failed to get a lock on the mutex."))?;
(m.get_fraction(), m.get_downloaded())
};
// Update local_size label
downloaded
.file_size(SIZE_OPTS.clone())
.map_err(|err| format_err!("{}", err))
.map(|x| local_size.set_text(&x))?;
// I hate floating points.
// Update the progress_bar.
if (fraction >= 0.0) && (fraction <= 1.0) && (!fraction.is_nan()) {
progress_bar.set_fraction(fraction);
}
// info!("Fraction: {}", progress_bar.get_fraction());
// info!("Fraction: {}", fraction);
// Check if the download is still active
let active = {
let m = manager::ACTIVE_DOWNLOADS
.read()
.map_err(|_| format_err!("Failed to get a lock on the mutex."))?;
m.contains_key(&episode_rowid)
};
if (fraction >= 1.0) && (!fraction.is_nan()) {
Ok(glib::Continue(false))
} else if !active {
Ok(glib::Continue(false))
} else {
Ok(glib::Continue(true))
}
}
// Setup a callback that will update the total_size label
// with the http ContentLength header number rather than
// relying to the RSS feed.
fn update_total_size_callback(prog: Arc<Mutex<manager::Progress>>, total_size: &gtk::Label) {
timeout_add(
500,
clone!(prog, total_size => move || {
total_size_helper(prog.clone(), &total_size).unwrap_or(glib::Continue(true))
}),
);
}
fn total_size_helper(
prog: Arc<Mutex<manager::Progress>>,
total_size: &gtk::Label,
) -> Result<glib::Continue, Error> {
// Get the total_bytes.
let total_bytes = {
let m = prog.lock()
.map_err(|_| format_err!("Failed to get a lock on the mutex."))?;
m.get_total_size()
};
debug!("Total Size: {}", total_bytes);
if total_bytes != 0 {
// Update the total_size label
total_bytes
.file_size(SIZE_OPTS.clone())
.map_err(|err| format_err!("{}", err))
.map(|x| total_size.set_text(&x))?;
// Do not call again the callback
Ok(glib::Continue(false))
} else {
Ok(glib::Continue(true))
}
}
// fn on_delete_bttn_clicked(episode_id: i32) -> Result<(), Error> {
// let mut ep = dbqueries::get_episode_from_rowid(episode_id)?.into();
// delete_local_content(&mut ep).map_err(From::from).map(|_| ())
// }
pub fn episodes_listbox(pd: &Podcast, sender: Sender<Action>) -> Result<gtk::ListBox, Error> {
let episodes = dbqueries::get_pd_episodeswidgets(pd)?;
let list = gtk::ListBox::new();
episodes.iter_mut().for_each(|ep| {
let w = epidose_widget(db, ep, pd.title());
list.add(&w)
episodes.into_iter().for_each(|ep| {
let widget = EpisodeWidget::new(ep, sender.clone());
list.add(&widget.container);
});
list.set_vexpand(false);
+5 -2
View File
@@ -1,2 +1,5 @@
pub mod podcast;
pub mod episode;
mod show;
mod episode;
pub use self::episode::EpisodeWidget;
pub use self::show::ShowWidget;
-150
View File
@@ -1,150 +0,0 @@
use gtk::prelude::*;
use gtk;
use gdk_pixbuf::Pixbuf;
use std::fs;
use hammond_data::dbqueries;
use hammond_data::models::Podcast;
use hammond_data::index_feed::Database;
use hammond_downloader::downloader;
use widgets::episode::episodes_listbox;
use podcasts_view::update_podcasts_view;
pub fn podcast_widget(db: &Database, stack: &gtk::Stack, pd: &Podcast) -> gtk::Box {
// Adapted from gnome-music AlbumWidget
let builder = gtk::Builder::new_from_resource("/org/gtk/hammond/gtk/podcast_widget.ui");
let pd_widget: gtk::Box = builder.get_object("podcast_widget").unwrap();
let cover: gtk::Image = builder.get_object("cover").unwrap();
let title_label: gtk::Label = builder.get_object("title_label").unwrap();
let desc_text_view: gtk::TextView = builder.get_object("desc_text_view").unwrap();
let view: gtk::Viewport = builder.get_object("view").unwrap();
let unsub_button: gtk::Button = builder.get_object("unsub_button").unwrap();
let played_button: gtk::Button = builder.get_object("mark_all_played_button").unwrap();
// TODO: should spawn a thread to avoid locking the UI probably.
unsub_button.connect_clicked(clone!(db, stack, pd => move |bttn| {
on_unsub_button_clicked(&db, &stack, &pd, bttn);
}));
title_label.set_text(pd.title());
let listbox = episodes_listbox(db, pd);
if let Ok(l) = listbox {
view.add(&l);
}
{
let buff = desc_text_view.get_buffer().unwrap();
buff.set_text(pd.description());
}
let img = get_pixbuf_from_path(pd);
if let Some(i) = img {
cover.set_from_pixbuf(&i);
}
played_button.connect_clicked(clone!(db, stack, pd => move |_| {
on_played_button_clicked(&db, &stack, &pd);
}));
show_played_button(db, pd, &played_button);
pd_widget
}
fn on_unsub_button_clicked(
db: &Database,
stack: &gtk::Stack,
pd: &Podcast,
unsub_button: &gtk::Button,
) {
let res = dbqueries::remove_feed(db, pd);
if res.is_ok() {
info!("{} was removed succesfully.", pd.title());
// hack to get away without properly checking for none.
// if pressed twice would panic.
unsub_button.hide();
let dl_fold = downloader::get_download_folder(pd.title());
if let Ok(fold) = dl_fold {
let res3 = fs::remove_dir_all(&fold);
if res3.is_ok() {
info!("All the content at, {} was removed succesfully", &fold);
}
};
}
stack.set_visible_child_name("fb_parent");
update_podcasts_view(db, stack);
}
fn on_played_button_clicked(db: &Database, stack: &gtk::Stack, pd: &Podcast) {
{
let tempdb = db.lock().unwrap();
let _ = dbqueries::update_none_to_played_now(&tempdb, pd);
}
update_podcast_widget(db, stack, pd);
}
fn show_played_button(db: &Database, pd: &Podcast, played_button: &gtk::Button) {
let new_episodes = {
let tempdb = db.lock().unwrap();
dbqueries::get_pd_unplayed_episodes(&tempdb, pd)
};
if let Ok(n) = new_episodes {
if !n.is_empty() {
played_button.show()
}
}
}
pub fn get_pixbuf_from_path(pd: &Podcast) -> Option<Pixbuf> {
let img_path = downloader::cache_image(pd);
if let Some(i) = img_path {
Pixbuf::new_from_file_at_scale(&i, 256, 256, true).ok()
} else {
None
}
}
pub fn setup_podcast_widget(stack: &gtk::Stack) {
let builder = gtk::Builder::new_from_resource("/org/gtk/hammond/gtk/podcast_widget.ui");
let pd_widget: gtk::Box = builder.get_object("podcast_widget").unwrap();
stack.add_named(&pd_widget, "pdw");
}
pub fn update_podcast_widget(db: &Database, stack: &gtk::Stack, pd: &Podcast) {
let old = stack.get_child_by_name("pdw").unwrap();
let pdw = podcast_widget(db, stack, pd);
let vis = stack.get_visible_child_name().unwrap();
stack.remove(&old);
stack.add_named(&pdw, "pdw");
stack.set_visible_child_name(&vis);
old.destroy();
}
#[cfg(test)]
mod tests {
use hammond_data::models::NewPodcast;
use super::*;
#[test]
fn test_get_pixbuf_from_path() {
let pd = NewPodcast {
title: "New Rustacean".to_string(),
description: "".to_string(),
link: "".to_string(),
image_uri: Some("http://newrustacean.com/podcast.png".to_string()),
source_id: 0,
};
let pd = pd.into_podcast();
let pxbuf = get_pixbuf_from_path(&pd);
assert!(pxbuf.is_some());
}
}
+149
View File
@@ -0,0 +1,149 @@
use dissolve;
use failure::Error;
use gtk;
use gtk::prelude::*;
use open;
use hammond_data::Podcast;
use hammond_data::dbqueries;
use hammond_data::utils::{delete_show, replace_extra_spaces};
use app::Action;
use utils::get_pixbuf_from_path;
use widgets::episode::episodes_listbox;
use std::sync::Arc;
use std::sync::mpsc::Sender;
use std::thread;
#[derive(Debug, Clone)]
pub struct ShowWidget {
pub container: gtk::Box,
scrolled_window: gtk::ScrolledWindow,
cover: gtk::Image,
description: gtk::Label,
link: gtk::Button,
settings: gtk::MenuButton,
unsub: gtk::Button,
episodes: gtk::Frame,
}
impl Default for ShowWidget {
fn default() -> Self {
let builder = gtk::Builder::new_from_resource("/org/gnome/hammond/gtk/show_widget.ui");
let container: gtk::Box = builder.get_object("container").unwrap();
let scrolled_window: gtk::ScrolledWindow = builder.get_object("scrolled_window").unwrap();
let episodes: gtk::Frame = builder.get_object("episodes").unwrap();
let cover: gtk::Image = builder.get_object("cover").unwrap();
let description: gtk::Label = builder.get_object("description").unwrap();
let unsub: gtk::Button = builder.get_object("unsub_button").unwrap();
let link: gtk::Button = builder.get_object("link_button").unwrap();
let settings: gtk::MenuButton = builder.get_object("settings_button").unwrap();
ShowWidget {
container,
scrolled_window,
cover,
description,
unsub,
link,
settings,
episodes,
}
}
}
impl ShowWidget {
pub fn new(pd: Arc<Podcast>, sender: Sender<Action>) -> ShowWidget {
let pdw = ShowWidget::default();
pdw.init(pd, sender);
pdw
}
pub fn init(&self, pd: Arc<Podcast>, sender: Sender<Action>) {
// Hacky workaround so the pd.id() can be retrieved from the `ShowStack`.
WidgetExt::set_name(&self.container, &pd.id().to_string());
self.unsub
.connect_clicked(clone!(pd, sender => move |bttn| {
if let Err(err) = on_unsub_button_clicked(pd.clone(), bttn, sender.clone()) {
error!("Error: {}", err);
}
}));
self.setup_listbox(&pd, sender.clone());
self.set_description(pd.description());
if let Err(err) = self.set_cover(pd.clone()) {
error!("Failed to set a cover: {}", err)
}
let link = pd.link().to_owned();
self.link.set_tooltip_text(Some(link.as_str()));
self.link.connect_clicked(move |_| {
info!("Opening link: {}", &link);
if let Err(err) = open::that(&link) {
error!("Failed to open link: {}", &link);
error!("Error: {}", err);
}
});
}
/// Populate the listbox with the shows episodes.
fn setup_listbox(&self, pd: &Podcast, sender: Sender<Action>) {
let listbox = episodes_listbox(pd, sender.clone());
listbox.ok().map(|l| self.episodes.add(&l));
}
/// Set the show cover.
fn set_cover(&self, pd: Arc<Podcast>) -> Result<(), Error> {
let image = get_pixbuf_from_path(&pd.into(), 128)?;
self.cover.set_from_pixbuf(&image);
Ok(())
}
/// Set the descripton text.
fn set_description(&self, text: &str) {
// TODO: Temporary solution until we render html urls/bold/italic probably with markup.
let desc = dissolve::strip_html_tags(text).join(" ");
self.description.set_text(&replace_extra_spaces(&desc));
}
/// Set scrolled window vertical adjustment.
pub fn set_vadjustment(&self, vadjustment: &gtk::Adjustment) {
self.scrolled_window.set_vadjustment(vadjustment)
}
}
fn on_unsub_button_clicked(
pd: Arc<Podcast>,
unsub_button: &gtk::Button,
sender: Sender<Action>,
) -> Result<(), Error> {
// hack to get away without properly checking for none.
// if pressed twice would panic.
unsub_button.hide();
// Spawn a thread so it won't block the ui.
thread::spawn(move || {
if let Err(err) = delete_show(&pd) {
error!("Something went wrong trying to remove {}", pd.title());
error!("Error: {}", err);
}
});
sender.send(Action::HeaderBarNormal)?;
sender.send(Action::ShowShowsAnimated)?;
// Queue a refresh after the switch to avoid blocking the db.
sender.send(Action::RefreshShowsView)?;
sender.send(Action::RefreshEpisodesView)?;
Ok(())
}
#[allow(dead_code)]
fn on_played_button_clicked(pd: &Podcast, sender: Sender<Action>) -> Result<(), Error> {
dbqueries::update_none_to_played_now(pd)?;
sender.send(Action::RefreshWidget)?;
Ok(())
}
+6 -5
View File
@@ -3,7 +3,7 @@
project(
'hammond', 'rust',
version: '0.1.1',
version: '0.3.0',
license: 'GPLv3',
)
@@ -16,8 +16,9 @@ hammond_version_micro = version_array[2].to_int()
hammond_prefix = get_option('prefix')
hammond_bindir = join_paths(hammond_prefix, get_option('bindir'))
install_data('hammond-gtk/resources/org.gnome.Hammond.desktop', install_dir : get_option('datadir') + '/applications')
install_data('hammond-gtk/resources/org.gnome.Hammond.appdata.xml', install_dir : get_option('datadir') + '/appdata')
datadir = get_option('datadir')
icondir = join_paths(datadir, 'icons')
subdir('hammond-gtk/resources')
cargo = find_program('cargo', required: false)
gresource = find_program('glib-compile-resources', required: false)
@@ -26,6 +27,7 @@ cargo_script = find_program('scripts/cargo.sh')
cargo_release = custom_target('cargo-build',
build_by_default: true,
build_always: true,
output: ['hammond'],
install: true,
install_dir: hammond_bindir,
@@ -33,5 +35,4 @@ cargo_release = custom_target('cargo-build',
run_target('release', command: ['scripts/release.sh',
meson.project_name() + '-' + hammond_version
],
depends: [cargo_release])
])
+32 -26
View File
@@ -1,37 +1,43 @@
{
"app-id": "org.gnome.Hammond",
"runtime": "org.gnome.Platform",
"runtime-version": "3.26",
"sdk": "org.gnome.Sdk",
"sdk-extensions": ["org.freedesktop.Sdk.Extension.rust-stable"],
"command": "hammond",
"finish-args": [
"app-id" : "org.gnome.Hammond",
"runtime" : "org.gnome.Platform",
"runtime-version" : "master",
"sdk" : "org.gnome.Sdk",
"sdk-extensions" : [
"org.freedesktop.Sdk.Extension.rust-stable"
],
"command" : "hammond",
"tags" : [
"nightly"
],
"desktop-file-name-prefix" : "(Nightly) ",
"finish-args" : [
"--share=network",
"--share=ipc",
"--socket=x11",
"--socket=wayland",
"--talk-name=org.freedesktop.Notifications"
"--talk-name=org.freedesktop.Desktop"
],
"build-options" : {
"env": {
"CARGO_HOME": "/run/build/Hammond/cargo"
},
"build-args": [ "--share=network" ]
"append-path" : "/usr/lib/sdk/rust-stable/bin",
"build-args" : [
"--share=network"
],
"env" : {
"CARGO_HOME" : "/run/build/Hammond/cargo"
}
},
"modules": [
"modules" : [
{
"name": "Hammond",
"buildsystem": "simple",
"build-commands": [
"source /usr/lib/sdk/rust-stable/enable.sh && ./configure --prefix=/app && make && make install"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/alatiera/Hammond.git",
"branch": "master"
}
]
"name" : "Hammond",
"buildsystem" : "meson",
"sources" : [
{
"type" : "git",
"url" : "https://gitlab.gnome.org/alatiera/Hammond.git",
"branch" : "master"
}
]
}
]
}
+7 -18
View File
@@ -1,26 +1,15 @@
unstable_features = true
verbose = false
disable_all_formatting = false
skip_children = false
max_width = 100
comment_width = 100
wrap_comments = true
error_on_line_overflow = true
error_on_line_overflow_comments = true
tab_spaces = 4
fn_call_width = 60
newline_style = "Unix"
fn_call_style = "Block"
report_todo = "Never"
report_fixme = "Never"
reorder_extern_crates = true
reorder_extern_crates_in_group = true
reorder_imports = false
hard_tabs = false
spaces_within_parens = false
newline_style = "Unix"
write_mode = "Overwrite"
merge_derives = true
condense_wildcard_suffixes = true
condense_wildcard_suffixes = false
format_strings = true
multiline_closure_forces_block = true
attributes_on_same_line_as_field = true
attributes_on_same_line_as_variant = true
normalize_comments = true
reorder_imports = true
reorder_imported_names = true
reorder_imports_in_group = true
Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 KiB

+3 -1
View File
@@ -1,3 +1,5 @@
#!/bin/sh
cargo build --release && cp $1/target/release/hammond-gtk $2
export CARGO_HOME=$1/target/cargo-home
cargo build --release -p hammond-gtk && cp $1/target/release/hammond-gtk $2
+3 -13
View File
@@ -12,30 +12,20 @@ mkdir -p $DIST
cp -rf hammond-data $DIST
cp -rf hammond-gtk $DIST
cp -rf hammond-downloader $DIST
cp build.rs $DIST
cp Cargo.toml $DIST
cp configure $DIST
cp meson.build $DIST
cp Hammond.doap $DIST
cp LICENSE $DIST
cp README.md $DIST
# cp -rf assets/org.gnome.Hammond.desktop $DIST
cp -rf assets $DIST
cp -rf screenshots $DIST
cp -rf scripts $DIST
# cargo vendor
cargo vendor
mkdir $DIST/.cargo
cat <<EOF > $DIST/.cargo/config
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF
cargo vendor > $DIST/.cargo/config
cp -rf vendor $DIST/
# packaging
cd $DEST/dist
tar -czvf $VERSION.tar.gz $VERSION
tar -cJvf $VERSION.tar.xz $VERSION