Update dependencies and version

This commit is contained in:
bytedream 2024-01-02 23:59:44 +01:00
parent 172e3612d0
commit 283a3802b2
11 changed files with 273 additions and 203 deletions

View file

@ -1,7 +1,7 @@
[package]
name = "crunchy-cli-core"
authors = ["Crunchy Labs Maintainers"]
version = "3.1.1"
version = "3.2.0"
edition = "2021"
license = "MIT"
@ -14,10 +14,9 @@ openssl-tls-static = ["reqwest/native-tls", "reqwest/native-tls-alpn", "reqwest/
[dependencies]
anyhow = "1.0"
async-speed-limit = "0.4"
async-trait = "0.1"
clap = { version = "4.4", features = ["derive", "string"] }
chrono = "0.4"
crunchyroll-rs = { version = "0.8.0", features = ["dash-stream", "experimental-stabilizations", "tower"] }
crunchyroll-rs = { version = "0.8.1", features = ["dash-stream", "experimental-stabilizations", "tower"] }
ctrlc = "3.4"
dialoguer = { version = "0.11", default-features = false }
dirs = "5.0"
@ -36,8 +35,8 @@ serde_json = "1.0"
serde_plain = "1.0"
shlex = "1.2"
sys-locale = "0.3"
tempfile = "3.8"
tokio = { version = "1.34", features = ["io-util", "macros", "net", "rt-multi-thread", "time"] }
tempfile = "3.9"
tokio = { version = "1.35", features = ["io-util", "macros", "net", "rt-multi-thread", "time"] }
tokio-util = "0.7"
tower-service = "0.3"
rustls-native-certs = { version = "0.6", optional = true }

View file

@ -134,7 +134,6 @@ pub struct Archive {
pub(crate) urls: Vec<String>,
}
#[async_trait::async_trait(?Send)]
impl Execute for Archive {
fn pre_check(&mut self) -> Result<()> {
if !has_ffmpeg() {

View file

@ -45,7 +45,6 @@ impl ArchiveFilter {
}
}
#[async_trait::async_trait]
impl Filter for ArchiveFilter {
type T = Vec<SingleFormat>;
type Output = SingleFormatCollection;

View file

@ -113,7 +113,6 @@ pub struct Download {
pub(crate) urls: Vec<String>,
}
#[async_trait::async_trait(?Send)]
impl Execute for Download {
fn pre_check(&mut self) -> Result<()> {
if !has_ffmpeg() {

View file

@ -37,7 +37,6 @@ impl DownloadFilter {
}
}
#[async_trait::async_trait]
impl Filter for DownloadFilter {
type T = SingleFormat;
type Output = SingleFormatCollection;

View file

@ -24,12 +24,11 @@ pub use download::Download;
pub use login::Login;
pub use search::Search;
#[async_trait::async_trait(?Send)]
trait Execute {
fn pre_check(&mut self) -> Result<()> {
Ok(())
}
async fn execute(mut self, ctx: Context) -> Result<()>;
async fn execute(self, ctx: Context) -> Result<()>;
}
#[derive(Debug, Parser)]

View file

@ -18,7 +18,6 @@ pub struct Login {
pub remove: bool,
}
#[async_trait::async_trait(?Send)]
impl Execute for Login {
async fn execute(self, ctx: Context) -> Result<()> {
if let Some(login_file_path) = session_file_path() {

View file

@ -100,7 +100,6 @@ pub struct Search {
input: String,
}
#[async_trait::async_trait(?Send)]
impl Execute for Search {
async fn execute(self, ctx: Context) -> Result<()> {
let input = if crunchyroll_rs::parse::parse_url(&self.input).is_some() {

View file

@ -3,9 +3,6 @@ use crunchyroll_rs::{
Concert, Episode, MediaCollection, Movie, MovieListing, MusicVideo, Season, Series,
};
// Check when https://github.com/dtolnay/async-trait/issues/224 is resolved and update async-trait
// to the new fixed version (as this causes some issues)
#[async_trait::async_trait]
pub trait Filter {
type T: Send + Sized;
type Output: Send + Sized;