From e283ccede59c7800169f6d384afcadf2d8291572 Mon Sep 17 00:00:00 2001 From: bytedream Date: Sat, 9 Mar 2024 18:47:10 +0100 Subject: [PATCH] Update dependencies and version --- Cargo.toml | 14 +++++++------- internal/Cargo.toml | 2 +- src/internal/serde.rs | 2 +- src/media/anime/episode.rs | 2 +- src/media/anime/movie.rs | 2 +- src/media/music/artist.rs | 4 ++-- src/media/music/concert.rs | 2 +- src/media/music/music_video.rs | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 68b1c8d..c45281f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crunchyroll-rs" -version = "0.8.3" +version = "0.8.4" authors = ["Crunchy Labs Maintainers"] edition = "2021" description = "Pure Rust implementation of the crunchyroll api." @@ -29,26 +29,26 @@ __test_strict = [] [dependencies] async-trait = "0.1" -chrono = { version = "0.4", features = ["serde"] } +chrono = { version = ">=0.4.35", features = ["serde"] } futures-util = { version = "0.3", features = ["std"], default-features = false } jsonwebtoken = { version = "9.2", default-features = false } # the patch version number is necessary for the 'reqwest' and 'rustls' dependencies to prevent incompatability errors # (https://github.com/seanmonstar/reqwest/issues/1837) -reqwest = { version = "0.11.23", features = ["cookies", "json", "rustls-tls"], default-features = false } +reqwest = { version = "0.11.25", features = ["cookies", "json", "rustls-tls"], default-features = false } rustls = { version = "0.21.6", features = ["dangerous_configuration"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" serde_urlencoded = "0.7" smart-default = "0.7" -tokio = { version = "1.35", features = ["sync"] } +tokio = { version = "1.36", features = ["sync"] } webpki-roots = "0.26" -crunchyroll-rs-internal = { version = "0.8.3", path = "internal" } +crunchyroll-rs-internal = { version = "0.8.4", path = "internal" } # Optional / required from features aes = { version = "0.8", optional = true } cbc = { version = "0.1", optional = true } -dash-mpd = { version = "0.14", default-features = false, optional = true } +dash-mpd = { version = "0.15", default-features = false, optional = true } lazy_static = { version = "1.4", optional = true } m3u8-rs = { version = "6.0", optional = true } regex = { version = "1.10", default-features = false, features = ["std"], optional = true } @@ -58,7 +58,7 @@ tower-service = { version = "0.3", optional = true } anyhow = "1.0" once_cell = "1.19" rand = "0.8" -tokio = { version = "1.35", features = ["macros", "rt", "rt-multi-thread"] } +tokio = { version = "1.36", features = ["macros", "rt", "rt-multi-thread"] } [workspace] members = ["internal"] diff --git a/internal/Cargo.toml b/internal/Cargo.toml index 9e4eb06..0ad8c28 100644 --- a/internal/Cargo.toml +++ b/internal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crunchyroll-rs-internal" -version = "0.8.3" +version = "0.8.4" authors = ["Crunchy Labs Maintainers"] edition = "2021" description = "Internal crate for crunchyroll-rs. Do not use." diff --git a/src/internal/serde.rs b/src/internal/serde.rs index cc49086..7540a6e 100644 --- a/src/internal/serde.rs +++ b/src/internal/serde.rs @@ -82,7 +82,7 @@ pub(crate) fn deserialize_millis_to_duration<'de, D>(deserializer: D) -> Result< where D: Deserializer<'de>, { - Ok(Duration::milliseconds(i64::deserialize(deserializer)?)) + Ok(Duration::try_milliseconds(i64::deserialize(deserializer)?).unwrap()) } pub(crate) fn serialize_duration_to_millis( diff --git a/src/media/anime/episode.rs b/src/media/anime/episode.rs index 9a79e54..db3c558 100644 --- a/src/media/anime/episode.rs +++ b/src/media/anime/episode.rs @@ -90,7 +90,7 @@ pub struct Episode { #[serde(alias = "duration_ms")] #[serde(deserialize_with = "crate::internal::serde::deserialize_millis_to_duration")] #[serde(serialize_with = "crate::internal::serde::serialize_duration_to_millis")] - #[default(Duration::milliseconds(0))] + #[default(Duration::try_milliseconds(0).unwrap())] pub duration: Duration, #[default(DateTime::::from(std::time::SystemTime::UNIX_EPOCH))] diff --git a/src/media/anime/movie.rs b/src/media/anime/movie.rs index 9ef3341..f342af3 100644 --- a/src/media/anime/movie.rs +++ b/src/media/anime/movie.rs @@ -36,7 +36,7 @@ pub struct Movie { #[serde(alias = "duration_ms")] #[serde(deserialize_with = "crate::internal::serde::deserialize_millis_to_duration")] #[serde(serialize_with = "crate::internal::serde::serialize_duration_to_millis")] - #[default(Duration::milliseconds(0))] + #[default(Duration::try_milliseconds(0).unwrap())] pub duration: Duration, pub images: ThumbnailImages, diff --git a/src/media/music/artist.rs b/src/media/music/artist.rs index 31635ba..594176e 100644 --- a/src/media/music/artist.rs +++ b/src/media/music/artist.rs @@ -81,12 +81,12 @@ pub struct Artist { #[serde(alias = "totalConcertDurationMs")] #[serde(deserialize_with = "crate::internal::serde::deserialize_millis_to_duration")] #[serde(serialize_with = "crate::internal::serde::serialize_duration_to_millis")] - #[default(Duration::milliseconds(0))] + #[default(Duration::try_milliseconds(0).unwrap())] pub total_concert_duration: Duration, #[serde(alias = "totalVideoDurationMs")] #[serde(deserialize_with = "crate::internal::serde::deserialize_millis_to_duration")] #[serde(serialize_with = "crate::internal::serde::serialize_duration_to_millis")] - #[default(Duration::milliseconds(0))] + #[default(Duration::try_milliseconds(0).unwrap())] pub total_video_duration: Duration, pub images: PosterImages, diff --git a/src/media/music/concert.rs b/src/media/music/concert.rs index 76a6e76..6ec95e2 100644 --- a/src/media/music/concert.rs +++ b/src/media/music/concert.rs @@ -51,7 +51,7 @@ pub struct Concert { #[serde(alias = "durationMs")] #[serde(deserialize_with = "crate::internal::serde::deserialize_millis_to_duration")] #[serde(serialize_with = "crate::internal::serde::serialize_duration_to_millis")] - #[default(Duration::milliseconds(0))] + #[default(Duration::try_milliseconds(0).unwrap())] pub duration: Duration, #[default(DateTime::::from(std::time::SystemTime::UNIX_EPOCH))] pub original_release: DateTime, diff --git a/src/media/music/music_video.rs b/src/media/music/music_video.rs index 07fcd56..c19f8a4 100644 --- a/src/media/music/music_video.rs +++ b/src/media/music/music_video.rs @@ -55,7 +55,7 @@ pub struct MusicVideo { #[serde(alias = "durationMs")] #[serde(deserialize_with = "crate::internal::serde::deserialize_millis_to_duration")] #[serde(serialize_with = "crate::internal::serde::serialize_duration_to_millis")] - #[default(Duration::milliseconds(0))] + #[default(Duration::try_milliseconds(0).unwrap())] pub duration: Duration, #[default(DateTime::::from(std::time::SystemTime::UNIX_EPOCH))]