fix: detect ip-ban error message

This commit is contained in:
ThetaDev 2024-08-10 16:26:43 +02:00
parent f37432a48c
commit da39c64f30
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6
2 changed files with 2 additions and 2 deletions

View file

@ -519,8 +519,7 @@ impl std::io::Write for ProgWriter {
#[tokio::main]
async fn main() {
if let Err(e) = run().await {
println!("{}", "Error:".red().bold());
println!("{}", e);
println!("{} {}", "Error:".red().bold(), e);
std::process::exit(1);
}
}

View file

@ -221,6 +221,7 @@ impl MapResponse<VideoPlayer> for response::Player {
.find_map(|word| match word {
"age" | "inappropriate" => Some(UnavailabilityReason::AgeRestricted),
"private" => Some(UnavailabilityReason::Private),
"bot" => Some(UnavailabilityReason::IpBan),
_ => None,
})
.unwrap_or_default();