diff --git a/README.md b/README.md index 2491939..77877b6 100644 --- a/README.md +++ b/README.md @@ -110,12 +110,12 @@ $ cargo install --force --path . crunchy-cli requires you to log in. Though you can use a non-premium account, you will not have access to premium content without a subscription. -You can authenticate with your credentials (user:password) or by using a refresh token. +You can authenticate with your credentials (email:password) or by using a refresh token. - Credentials ```shell - $ crunchy-cli --credentials "user:password" + $ crunchy-cli --credentials "email:password" ``` - Refresh Token @@ -208,8 +208,8 @@ The `login` command can store your session, so you don't have to authenticate ev ```shell # save the refresh token which gets generated when login with credentials. -# your username/email and password won't be stored at any time on disk -$ crunchy-cli login --credentials "user:password" +# your email and password won't be stored at any time on disk +$ crunchy-cli login --credentials "email:password" # save etp-rt cookie $ crunchy-cli login --etp-rt "4ebf1690-53a4-491a-a2ac-488309120f5d" ``` diff --git a/crunchy-cli-core/src/lib.rs b/crunchy-cli-core/src/lib.rs index 779e31d..8150b50 100644 --- a/crunchy-cli-core/src/lib.rs +++ b/crunchy-cli-core/src/lib.rs @@ -342,10 +342,10 @@ async fn crunchyroll_session(cli: &mut Cli) -> Result { }; let crunchy = if let Some(credentials) = &login_method.credentials { - if let Some((user, password)) = credentials.split_once(':') { - builder.login_with_credentials(user, password).await? + if let Some((email, password)) = credentials.split_once(':') { + builder.login_with_credentials(email, password).await? } else { - bail!("Invalid credentials format. Please provide your credentials as user:password") + bail!("Invalid credentials format. Please provide your credentials as email:password") } } else if let Some(etp_rt) = &login_method.etp_rt { builder.login_with_etp_rt(etp_rt).await? diff --git a/crunchy-cli-core/src/login/command.rs b/crunchy-cli-core/src/login/command.rs index f5099d7..3722438 100644 --- a/crunchy-cli-core/src/login/command.rs +++ b/crunchy-cli-core/src/login/command.rs @@ -46,7 +46,7 @@ impl Execute for Login { #[derive(Clone, Debug, Parser)] pub struct LoginMethod { #[arg( - help = "Login with credentials (username or email and password). Must be provided as user:password" + help = "Login with credentials (email and password). Must be provided as email:password" )] #[arg(long)] pub credentials: Option,