feat!: update channel model, addd handle + video_count, remove tv/mobile banner
This commit is contained in:
parent
5a6b2c3a62
commit
e6715700d9
23 changed files with 114 additions and 619 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Reference in a new issue