feat!: update channel model, addd handle + video_count, remove tv/mobile banner

This commit is contained in:
ThetaDev 2024-08-17 02:44:47 +02:00
parent 5a6b2c3a62
commit e6715700d9
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6
23 changed files with 114 additions and 619 deletions

View file

@ -911,9 +911,10 @@ async fn run() -> anyhow::Result<()> {
Some(format) => print_data(&channel, format, pretty),
None => {
anstream::print!(
"{}\n{} [{}]",
"{}\n{} {} [{}]",
format!("[Channel {tab:?}]").on_green().black(),
channel.name.green().bold(),
channel.handle.unwrap_or_default(),
channel.id
);
print_verification(channel.verification);
@ -925,6 +926,9 @@ async fn run() -> anyhow::Result<()> {
subs
);
}
if let Some(vids) = channel.video_count {
anstream::println!("{} {}", "Videos:".blue(), vids);
}
print_description(Some(channel.description));
println!();
print_entities(&channel.content.items);
@ -938,9 +942,10 @@ async fn run() -> anyhow::Result<()> {
Some(format) => print_data(&channel, format, pretty),
None => {
anstream::println!(
"{}\n{} [{}]",
"{}\n{} {} [{}]",
format!("[Channel {tab:?}]").on_green().black(),
channel.name.green().bold(),
channel.handle.unwrap_or_default(),
channel.id
);
print_description(Some(channel.description));
@ -951,6 +956,9 @@ async fn run() -> anyhow::Result<()> {
subs
);
}
if let Some(vids) = channel.video_count {
anstream::println!("{} {}", "Videos:".blue(), vids);
}
println!();
print_entities(&channel.content.items);
}
@ -988,6 +996,9 @@ async fn run() -> anyhow::Result<()> {
created
);
}
if let Some(country) = info.country {
anstream::println!("{} {}", "Country:".blue(), country);
}
if !info.links.is_empty() {
print_h2("Links");
for (name, url) in &info.links {