The `pubDate` field of an item in the feed is meant to be time the item
was published. It should not be bumped if the item is updated in the
backend.
* Introduce a new `published_at` field on `Item`
* Update the Mixcloud and YouTube backends to fill this field
* Use the `published_at` field on `Item` for the `<pubData>` item
subelement
Select the well-supported, almost always available MP4 container format
that is directly available (so no HLS or DASH). This unfortunately
does reduce the bitrate to 64 kbps.
The filter used to select the stream with the highest bitrate, but this
may result in a stream with a codec/container that is not supported by
all podcast clients, such as WEBM. Select the (almost always available)
highest stream using the MP4 container instead.
Since the metadata only provides a date, set the time part to 12:00:00
(UTC).
Also fix up the deprecation warning for the creation of the initial zero
last build timestamp.
This newer version is able to correctly parse the date of streamed
videos.
Also use the full `ytextract::Video` structs which should have have all
the metadata.
This way handlers don't need to do case matching on backend ID strings
anymore.
* Rename `backend` to `backend_id` where we have a backend ID
* Add `get` function and `Backends` enum to the `backend` module
* Add a depend on the `enum_dispatch` crate
* Add a `backend` module `Backend` trait and necessary abstract types
* Refactor handlers to use the back-end abstraction
* Directly serialize to URLs where necessary in Mixcloud back-end
* Require `serde` feature for the url crate
* The feed item limit defaults to the default page size (50) if not
provided
* Move caching from response to URL fetch results; add helper functions
* Add a helper function to set the paging query of an URL
* Modify paging so we don't retrieve more than the feed item limit
* Derserialize the paging information
* Parse each next URL; handle URL parse errors
* Use a default page size of 50; pass offset 0 to count by item index
* Enable the `async` feature for the `cached` crate
* Make the types that we cache implement `Clone`
* Rename the argument of mixcloud::redirect_url` because of this issue:
https://github.com/jaemk/cached/issues/114
* Use the `thiserror` crate to make our own error type
* Implement Rocket's `Responder` type for the error type
* Adjust all methods to use the error type
* Small documentation tweaks
* Prefix the feed handler path with '/feed'
* Mount both handlers under `/` now that they have a prefix in the path
* Provide the backend to the feed and download handler in their paths
* Use the ID as filename download handler, also add an extension
This might solve some issues with clients that don't get the file type
and size and don't know what to do?
Also, we're not longer involved in the download, yay! (For now.)