Commit graph

13 commits

Author SHA1 Message Date
Paul van Tilburg 27a40b1a91
Increase TTL for redirect URI to 24 hours 2022-05-27 22:59:28 +02:00
Paul van Tilburg c13ce71c69
Add feed item limit support
* 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
2022-05-27 22:47:52 +02:00
Paul van Tilburg 78fc93fedf
Retrieve all pages by following the next URL
* 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
2022-05-27 22:47:52 +02:00
Paul van Tilburg 09ee0b9ba9
Make default_file_type functions const 2022-05-27 22:39:53 +02:00
Paul van Tilburg cde2a34e91
Fix documentation 2022-05-26 22:12:01 +02:00
Paul van Tilburg 11c78a6cc8
Drop the get_ prefix for functions 2022-05-26 21:25:37 +02:00
Paul van Tilburg 11b32acfb4
Use an URL parser for the URL passed to youtube-dl 2022-05-26 21:23:38 +02:00
Paul van Tilburg 451c07a09e
Implement caching (closes: #3)
* 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
2022-05-26 21:20:10 +02:00
Paul van Tilburg 3ec1879932
Replace own youtube-dl impl by youtube_dl crate (refs: #8)
* Drop the depend on the `tokio` crate, because we don't need to
  run our own processes anymore.
* Remove unnecessary error variant for command failure
2022-05-26 20:38:51 +02:00
Paul van Tilburg a67df934bf
Enable some more lints; fix clippy issues 2022-05-26 20:03:44 +02:00
Paul van Tilburg b53365a293
Implement proper error logging and handling (closes: #6)
* 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
2022-05-26 19:57:24 +02:00
Paul van Tilburg a4546c1641
Use redirection instead of streaming
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.)
2022-05-23 22:21:38 +02:00
Paul van Tilburg aac6248878
Initial import into Git 2022-05-20 16:14:55 +02:00