From a32d3aef87e62c98935b07abc36effc3413ae645 Mon Sep 17 00:00:00 2001 From: ByteDream Date: Thu, 8 Dec 2022 00:12:25 +0100 Subject: [PATCH] Update dependencies --- Cargo.lock | 67 ++++++++++++++++++++++++---- crunchy-cli-core/Cargo.lock | 67 ++++++++++++++++++++++++---- crunchy-cli-core/Cargo.toml | 3 ++ crunchy-cli-core/src/cli/archive.rs | 2 +- crunchy-cli-core/src/cli/download.rs | 8 ++-- 5 files changed, 124 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f3a24bb..fc5d0d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,6 +86,18 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bstr" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +dependencies = [ + "lazy_static", + "memchr", + "regex-automata", + "serde", +] + [[package]] name = "bumpalo" version = "3.11.1" @@ -285,6 +297,7 @@ dependencies = [ "chrono", "clap", "crunchyroll-rs", + "csv", "ctrlc", "dirs", "isahc", @@ -293,6 +306,8 @@ dependencies = [ "regex", "rustls-native-certs", "sanitize-filename", + "serde", + "serde_json", "signal-hook", "sys-locale", "tempfile", @@ -303,7 +318,7 @@ dependencies = [ [[package]] name = "crunchyroll-rs" version = "0.1.0" -source = "git+https://github.com/crunchy-labs/crunchyroll-rs#50f9ad65f65affcc5839af565d425b9cd678b73a" +source = "git+https://github.com/crunchy-labs/crunchyroll-rs#86fb8307a531aedec708dd1c8c88b76bcf2a8c38" dependencies = [ "aes", "cbc", @@ -326,7 +341,7 @@ dependencies = [ [[package]] name = "crunchyroll-rs-internal" version = "0.1.0" -source = "git+https://github.com/crunchy-labs/crunchyroll-rs#50f9ad65f65affcc5839af565d425b9cd678b73a" +source = "git+https://github.com/crunchy-labs/crunchyroll-rs#86fb8307a531aedec708dd1c8c88b76bcf2a8c38" dependencies = [ "darling", "quote", @@ -343,6 +358,28 @@ dependencies = [ "typenum", ] +[[package]] +name = "csv" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" +dependencies = [ + "bstr", + "csv-core", + "itoa 0.4.8", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +dependencies = [ + "memchr", +] + [[package]] name = "ctrlc" version = "3.2.3" @@ -722,7 +759,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa", + "itoa 1.0.4", ] [[package]] @@ -763,7 +800,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", + "itoa 1.0.4", "pin-project-lite", "socket2", "tokio", @@ -867,9 +904,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745" +checksum = "ec947b7a4ce12e3b87e353abae7ce124d025b6c7d6c5aea5cc0bcf92e9510ded" [[package]] name = "is-terminal" @@ -911,6 +948,12 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + [[package]] name = "itoa" version = "1.0.4" @@ -1301,6 +1344,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" + [[package]] name = "regex-syntax" version = "0.6.28" @@ -1481,7 +1530,7 @@ version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ - "itoa", + "itoa 1.0.4", "ryu", "serde", ] @@ -1493,7 +1542,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.4", "ryu", "serde", ] @@ -1692,7 +1741,7 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" dependencies = [ - "itoa", + "itoa 1.0.4", "serde", "time-core", "time-macros", diff --git a/crunchy-cli-core/Cargo.lock b/crunchy-cli-core/Cargo.lock index 1e9c6d4..93c7522 100644 --- a/crunchy-cli-core/Cargo.lock +++ b/crunchy-cli-core/Cargo.lock @@ -86,6 +86,18 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bstr" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +dependencies = [ + "lazy_static", + "memchr", + "regex-automata", + "serde", +] + [[package]] name = "bumpalo" version = "3.11.1" @@ -253,6 +265,7 @@ dependencies = [ "chrono", "clap", "crunchyroll-rs", + "csv", "ctrlc", "dirs", "isahc", @@ -261,6 +274,8 @@ dependencies = [ "regex", "rustls-native-certs", "sanitize-filename", + "serde", + "serde_json", "signal-hook", "sys-locale", "tempfile", @@ -271,7 +286,7 @@ dependencies = [ [[package]] name = "crunchyroll-rs" version = "0.1.0" -source = "git+https://github.com/crunchy-labs/crunchyroll-rs#50f9ad65f65affcc5839af565d425b9cd678b73a" +source = "git+https://github.com/crunchy-labs/crunchyroll-rs#86fb8307a531aedec708dd1c8c88b76bcf2a8c38" dependencies = [ "aes", "cbc", @@ -294,7 +309,7 @@ dependencies = [ [[package]] name = "crunchyroll-rs-internal" version = "0.1.0" -source = "git+https://github.com/crunchy-labs/crunchyroll-rs#50f9ad65f65affcc5839af565d425b9cd678b73a" +source = "git+https://github.com/crunchy-labs/crunchyroll-rs#86fb8307a531aedec708dd1c8c88b76bcf2a8c38" dependencies = [ "darling", "quote", @@ -311,6 +326,28 @@ dependencies = [ "typenum", ] +[[package]] +name = "csv" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" +dependencies = [ + "bstr", + "csv-core", + "itoa 0.4.8", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +dependencies = [ + "memchr", +] + [[package]] name = "ctrlc" version = "3.2.3" @@ -690,7 +727,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa", + "itoa 1.0.4", ] [[package]] @@ -731,7 +768,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", + "itoa 1.0.4", "pin-project-lite", "socket2", "tokio", @@ -835,9 +872,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745" +checksum = "ec947b7a4ce12e3b87e353abae7ce124d025b6c7d6c5aea5cc0bcf92e9510ded" [[package]] name = "is-terminal" @@ -879,6 +916,12 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + [[package]] name = "itoa" version = "1.0.4" @@ -1269,6 +1312,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" + [[package]] name = "regex-syntax" version = "0.6.28" @@ -1443,7 +1492,7 @@ version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ - "itoa", + "itoa 1.0.4", "ryu", "serde", ] @@ -1455,7 +1504,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.4", "ryu", "serde", ] @@ -1648,7 +1697,7 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" dependencies = [ - "itoa", + "itoa 1.0.4", "serde", "time-core", "time-macros", diff --git a/crunchy-cli-core/Cargo.toml b/crunchy-cli-core/Cargo.toml index da794d3..84fdcf2 100644 --- a/crunchy-cli-core/Cargo.toml +++ b/crunchy-cli-core/Cargo.toml @@ -14,6 +14,7 @@ async-trait = "0.1" clap = { version = "4.0", features = ["derive", "string"] } chrono = "0.4" crunchyroll-rs = { git = "https://github.com/crunchy-labs/crunchyroll-rs", default-features = false, features = ["parse", "hls-stream", "dash-stream"] } +csv = "1.1" ctrlc = "3.2" dirs = "4.0" isahc = { git = "https://github.com/sagebind/isahc", rev = "c39f6f8" } @@ -21,6 +22,8 @@ log = { version = "0.4", features = ["std"] } num_cpus = "1.13" regex = "1.6" sanitize-filename = "0.4" +serde = "1.0" +serde_json = "1.0" signal-hook = "0.3" tempfile = "3.3" terminal_size = "0.2" diff --git a/crunchy-cli-core/src/cli/archive.rs b/crunchy-cli-core/src/cli/archive.rs index d4b0a5d..626a4f0 100644 --- a/crunchy-cli-core/src/cli/archive.rs +++ b/crunchy-cli-core/src/cli/archive.rs @@ -341,7 +341,7 @@ async fn formats_from_series( } let streams = episode.streams().await?; - let streaming_data = streams.streaming_data(None).await?; + let streaming_data = streams.hls_streaming_data(None).await?; let Some(stream) = find_resolution(streaming_data, &archive.resolution) else { bail!( "Resolution ({}x{}) is not available for episode {} ({}) of season {} ({}) of {}", diff --git a/crunchy-cli-core/src/cli/download.rs b/crunchy-cli-core/src/cli/download.rs index b0d0ffa..393e45a 100644 --- a/crunchy-cli-core/src/cli/download.rs +++ b/crunchy-cli-core/src/cli/download.rs @@ -352,9 +352,9 @@ async fn format_from_episode( ); return Ok(None); } - streams.streaming_data(Some(subtitle.clone())).await? + streams.hls_streaming_data(Some(subtitle.clone())).await? } else { - streams.streaming_data(None).await? + streams.hls_streaming_data(None).await? }; let Some(stream) = find_resolution(streaming_data, &download.resolution) else { @@ -400,9 +400,9 @@ async fn format_from_movie( error!("Movie {} has no {} subtitles", movie.title, subtitle); return Ok(None); } - streams.streaming_data(Some(subtitle.clone())).await? + streams.hls_streaming_data(Some(subtitle.clone())).await? } else { - streams.streaming_data(None).await? + streams.hls_streaming_data(None).await? }; streaming_data.sort_by(|a, b| a.resolution.width.cmp(&b.resolution.width).reverse());