From 6515d3025f39eed68979ca1695f532b6a2a5e63b Mon Sep 17 00:00:00 2001 From: bytedream Date: Sun, 14 Apr 2024 21:43:24 +0200 Subject: [PATCH] Add warn message when using a non-premium account with download or archive --- crunchy-cli-core/src/archive/command.rs | 4 ++++ crunchy-cli-core/src/download/command.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/crunchy-cli-core/src/archive/command.rs b/crunchy-cli-core/src/archive/command.rs index 7fe3796..e2fff5c 100644 --- a/crunchy-cli-core/src/archive/command.rs +++ b/crunchy-cli-core/src/archive/command.rs @@ -271,6 +271,10 @@ impl Execute for Archive { } async fn execute(self, ctx: Context) -> Result<()> { + if !ctx.crunchy.premium().await { + warn!("You may not be able to download all requested videos when logging in anonymously or using a non-premium account") + } + let mut parsed_urls = vec![]; for (i, url) in self.urls.clone().into_iter().enumerate() { diff --git a/crunchy-cli-core/src/download/command.rs b/crunchy-cli-core/src/download/command.rs index 87c0e07..44c3d65 100644 --- a/crunchy-cli-core/src/download/command.rs +++ b/crunchy-cli-core/src/download/command.rs @@ -212,6 +212,10 @@ impl Execute for Download { } async fn execute(self, ctx: Context) -> Result<()> { + if !ctx.crunchy.premium().await { + warn!("You may not be able to download all requested videos when logging in anonymously or using a non-premium account") + } + let mut parsed_urls = vec![]; let output_supports_softsubs = SOFTSUB_CONTAINERS.contains(