Compare commits

...

18 Commits
v0.5.0 ... main

Author SHA1 Message Date
Paul van Tilburg 49728ea6dd
Bump the version to 0.5.3
Check and lint using Cargo / Check and lint (push) Successful in 2m39s Details
Release / Release (push) Successful in 1m24s Details
Release / Release crate (push) Successful in 4m13s Details
Release / Release Debian package (push) Successful in 6m34s Details
2024-02-27 13:54:20 +01:00
Paul van Tilburg 97b8a0b8bd
Update the changelog 2024-02-27 13:53:20 +01:00
Paul van Tilburg 36cfa2d0ff Bump the dependency on cached to 0.49.2
Check and lint using Cargo / Check and lint (push) Successful in 2m58s Details
2024-02-26 21:19:56 +01:00
Paul van Tilburg a9e0e2417d Cargo update; fixes several security advisories
Fixes RUSTSEC-2024-0003, RUSTSEC-2023-0072 and RUSTSEC-2023-0074.
2024-02-26 21:18:19 +01:00
Paul van Tilburg 263d8272da
Handle paging information begin absent (closes: #17)
Check and lint using Cargo / Check and lint (push) Successful in 3m11s Details
2024-02-16 20:50:23 +01:00
Paul van Tilburg db2d7f3f6c
Add missing date
Check and lint using Cargo / Check and lint (push) Successful in 3m50s Details
2023-11-03 11:52:46 +01:00
Paul van Tilburg 1a8f8d67fa
Bump the version to 0.5.2
Check and lint using Cargo / Check and lint (push) Successful in 2m56s Details
Release / Release (push) Successful in 1m7s Details
Release / Release crate (push) Successful in 4m35s Details
Release / Release Debian package (push) Successful in 7m10s Details
2023-11-03 11:24:44 +01:00
Paul van Tilburg f4f9578c0e
Update the changelog 2023-11-03 11:23:38 +01:00
Paul van Tilburg 6d6895066f
Bump the dependency on cached to 0.46.0 2023-11-03 11:21:49 +01:00
Paul van Tilburg f3c4c5071f
Cargo update; fixes RUSTSEC-2020-0071
This switches to Rocket 0.5-rc.4
Also fix the usage of a deprecated method.
2023-11-03 11:20:18 +01:00
Paul van Tilburg b0cb9d984a
Bump the version to 0.5.1
Check and lint using Cargo / Check and lint (push) Successful in 3m0s Details
Release / Release (push) Successful in 1m29s Details
Release / Release crate (push) Successful in 5m14s Details
Release / Release Debian package (push) Successful in 7m16s Details
2023-08-25 22:09:32 +02:00
Paul van Tilburg 0c49df352d
Update the changelog 2023-08-25 22:08:43 +02:00
Paul van Tilburg 64ee93c553
Build and release a Debian package in a separate job
Release it to the package repository instead of attaching to the
release. Also add the relevant part of the changelog as release notes to
the release and fix some schema-related issues.
2023-08-25 22:08:00 +02:00
Paul van Tilburg 613d50bf30
Bump the dependency on youtube_dl to 0.9.0 2023-08-25 22:03:47 +02:00
Paul van Tilburg fd4a26715e
Cargo update 2023-08-25 22:02:42 +02:00
Paul van Tilburg 8850e16c4a
Cargo update
Check and lint using Cargo / Check and lint (push) Successful in 4m33s Details
2023-06-08 11:11:14 +02:00
Paul van Tilburg 06e0a5ecd5
Bump the dependency on cached to 0.44.0 2023-06-08 11:10:57 +02:00
Paul van Tilburg 29f3975d62
Use the personal Cargo token
Check and lint using Cargo / Check and lint (push) Successful in 3m23s Details
2023-06-08 10:58:50 +02:00
7 changed files with 934 additions and 739 deletions

View File

@ -2,7 +2,8 @@ name: "Release"
on:
push:
tags: "v*"
tags:
- "v*"
jobs:
release:
@ -20,22 +21,16 @@ jobs:
echo "Releasing version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Install Rust stable toolchain
uses: https://github.com/actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install cargo-deb
uses: https://github.com/brndnmtthws/rust-action-cargo-binstall@v1
with:
packages: cargo-deb
- name: Run cargo-deb
uses: https://github.com/actions-rs/cargo@v1
with:
command: deb
- name: Get the release notes from the changelog
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
RELEASE_NOTES=$(sed -n -e "/^## \[$VERSION\]/,/^## \[/{//"'!'"p;}" CHANGELOG.md | sed -e '1d;$d')
echo "Release notes:"
echo
echo "$RELEASE_NOTES"
echo "RELEASE_NOTES<<$EOF" >> "$GITHUB_ENV"
echo "$RELEASE_NOTES" >> "$GITHUB_ENV"
echo "$EOF" >> "$GITHUB_ENV"
- name: Install Go
uses: actions/setup-go@v4
@ -47,8 +42,9 @@ jobs:
with:
# This is available by default.
api_key: '${{ secrets.RELEASE_TOKEN }}'
files: target/debian/podbringer*.deb
files: FIXME
title: 'Release ${{ env.VERSION }}'
body: '${{ env.RELEASE_NOTES }}'
release-crate:
name: "Release crate"
@ -76,7 +72,41 @@ jobs:
uses: https://github.com/actions-rs/cargo@v1
env:
# This needs to be provided for the repository; no login necessary as a result.
CARGO_REGISTRIES_LUON_TOKEN: '${{ secrets.CARGO_REGISTRIES_LUON_TOKEN }}'
CARGO_REGISTRIES_LUON_TOKEN: '${{ secrets.CARGO_TOKEN }}'
with:
command: publish
args: --registry luon
release-deb:
name: "Release Debian package"
runs-on: debian-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Rust stable toolchain
uses: https://github.com/actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install cargo-deb
uses: https://github.com/brndnmtthws/rust-action-cargo-binstall@v1
with:
packages: cargo-deb
- name: Run cargo-deb
uses: https://github.com/actions-rs/cargo@v1
with:
command: deb
- name: Publish Debian package
env:
DEB_REPO_TOKEN: '${{ secrets.DEB_REPO_TOKEN }}'
run: |
curl --config <(printf "user=%s:%s" paul "${DEB_REPO_TOKEN}") \
--upload-file target/debian/podbringer*.deb \
https://git.luon.net/api/packages/paul/debian/pool/bookworm/main/upload

View File

@ -7,6 +7,50 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.5.3] - 2024-02-27
### Changed
* Update dependency on `cached`
### Security
* Update dependencies, fixes security advisories:
* [RUSTSEC-2024-0003](https://rustsec.org/advisories/RUSTSEC-2024-0003)
* [RUSTSEC-2023-0072](https://rustsec.org/advisories/RUSTSEC-2024-0072)
* [RUSTSEC-2023-0074](https://rustsec.org/advisories/RUSTSEC-2024-0072)
### Fixed
* Handle paging information begin absent; fixes short feeds for Mixcloud (#17)
## [0.5.2] - 2023-11-03
### Security
* Update dependencies
([RUSTSEC-2020-0071](https://rustsec.org/advisories/RUSTSEC-2020-0071.html))
### Changed
* Switch to Rocket 0.5 RC4
* Update dependency on `cached`
## [0.5.1] - 2023-08-25
### Changed
* Bump the dependency on `youtube_dl`
* Update release Gitea Actions workflow; add seperate job to release Debian
package to the new repository
### Security
* Update dependencies
([RUSTSEC-2023-0034](https://rustsec.org/advisories/RUSTSEC-2023-0034),
[RUSTSEC-2023-0044](https://rustsec.org/advisories/RUSTSEC-2023-0044),
[RUSTSEC-2023-0052](https://rustsec.org/advisories/RUSTSEC-2023-0052))
## [0.5.0] - 2023-06-08
### Added
@ -106,7 +150,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Initial release.
[Unreleased]: https://git.luon.net/paul/podbringer/compare/v0.4.1...HEAD
[Unreleased]: https://git.luon.net/paul/podbringer/compare/v0.5.3...HEAD
[0.5.3]: https://git.luon.net/paul/podbringer/compare/v0.5.1..v0.5.2
[0.5.2]: https://git.luon.net/paul/podbringer/compare/v0.5.1..v0.5.2
[0.5.1]: https://git.luon.net/paul/podbringer/compare/v0.5.0..v0.5.1
[0.5.0]: https://git.luon.net/paul/podbringer/compare/v0.4.1..v0.5.0
[0.4.1]: https://git.luon.net/paul/podbringer/compare/v0.4.0..v0.4.1
[0.4.0]: https://git.luon.net/paul/podbringer/compare/v0.3.0..v0.4.0

1531
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
[package]
name = "podbringer"
version = "0.5.0"
version = "0.5.3"
authors = ["Paul van Tilburg <paul@luon.net>"]
edition = "2021"
description = "Web service that provides podcasts for services that don't offer them (anymore)"
@ -10,7 +10,7 @@ license = "MIT"
[dependencies]
async-trait = "0.1.57"
cached = { version = "0.42.0", features = ["async"] }
cached = { version = "0.49.2", features = ["async"] }
chrono = { version = "0.4.19", features = ["serde"] }
enum_dispatch = "0.3.8"
mime-db = "1.6.0"
@ -20,7 +20,7 @@ rocket_dyn_templates = { version = "0.1.0-rc.2", features = ["tera"] }
rss = "2.0.1"
thiserror = "1.0.31"
url = { version = "2.2.2", features = ["serde"] }
youtube_dl = { version = "0.8.0", features = ["tokio"] }
youtube_dl = { version = "0.9.0", features = ["tokio"] }
ytextract = "0.11.2"
[package.metadata.deb]

View File

@ -66,11 +66,16 @@ impl super::Backend for Backend {
let count = cloudcasts_res.items.len();
cloudcasts.extend(cloudcasts_res.items);
// Check if any paging information is present.
let Some(paging) = cloudcasts_res.paging else {
break;
};
// Continue onto the next URL in the paging, if there is one and the limit was not
// reached.
limit = limit.saturating_sub(count);
offset += count;
match (limit, cloudcasts_res.paging.next) {
match (limit, paging.next) {
(0, Some(_)) => break,
(_, Some(next_url)) => {
cloudcasts_url = Url::parse(&next_url)?;
@ -126,8 +131,8 @@ pub(crate) struct CloudcastsResponse {
#[serde(rename = "data")]
items: Vec<Cloudcast>,
/// The paging information.
paging: CloudcastsPaging,
/// The paging information (if any).
paging: Option<CloudcastsPaging>,
}
/// The Mixcloud paging info.

View File

@ -6,7 +6,7 @@ use std::path::{Path, PathBuf};
use async_trait::async_trait;
use cached::proc_macro::cached;
use chrono::{DateTime, Utc};
use chrono::{TimeZone, Utc};
use reqwest::Url;
use rocket::futures::StreamExt;
use ytextract::playlist::video::{Error as YouTubeVideoError, Video as YouTubePlaylistVideo};
@ -224,7 +224,7 @@ impl From<YouTubeVideoWithStream> for Item {
.date()
.and_hms_opt(12, 0, 0)
.expect("Invalid hour, minute and/or second");
let published_at = DateTime::from_utc(timestamp, Utc);
let published_at = Utc.from_utc_datetime(&timestamp);
// There is no updated at timestamp available, really.
let updated_at = published_at;

View File

@ -2,7 +2,7 @@
use std::path::PathBuf;
use chrono::{DateTime, NaiveDateTime, Utc};
use chrono::{DateTime, NaiveDateTime, TimeZone, Utc};
use rocket::http::uri::Absolute;
use rocket::uri;
use rss::extension::itunes::{
@ -30,7 +30,7 @@ pub(crate) fn construct(backend_id: &str, config: &Config, channel: Channel) ->
.build();
let unix_timestamp = NaiveDateTime::from_timestamp_opt(0, 0)
.expect("Out-of-range seconds or invalid nanoseconds");
let mut last_build = DateTime::from_utc(unix_timestamp, Utc);
let mut last_build = Utc.from_utc_datetime(&unix_timestamp);
let generator = String::from(concat!(
env!("CARGO_PKG_NAME"),
" ",