fix: detect ip-ban error message
This commit is contained in:
parent
41febfd05c
commit
0b8cc6ac86
2 changed files with 2 additions and 2 deletions
|
|
@ -519,8 +519,7 @@ impl std::io::Write for ProgWriter {
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
if let Err(e) = run().await {
|
if let Err(e) = run().await {
|
||||||
println!("{}", "Error:".red().bold());
|
println!("{} {}", "Error:".red().bold(), e);
|
||||||
println!("{}", e);
|
|
||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -221,6 +221,7 @@ impl MapResponse<VideoPlayer> for response::Player {
|
||||||
.find_map(|word| match word {
|
.find_map(|word| match word {
|
||||||
"age" | "inappropriate" => Some(UnavailabilityReason::AgeRestricted),
|
"age" | "inappropriate" => Some(UnavailabilityReason::AgeRestricted),
|
||||||
"private" => Some(UnavailabilityReason::Private),
|
"private" => Some(UnavailabilityReason::Private),
|
||||||
|
"bot" => Some(UnavailabilityReason::IpBan),
|
||||||
_ => None,
|
_ => None,
|
||||||
})
|
})
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
|
||||||
Reference in a new issue