feat: Update to latest iced

This commit is contained in:
uttarayan21
2025-11-18 23:54:27 +05:30
parent a6ef6ba9c0
commit 3222c26bb6
15 changed files with 1231 additions and 4918 deletions

View File

@@ -2,15 +2,23 @@ use api::*;
#[tokio::main]
pub async fn main() {
let config = std::fs::read_to_string("config.toml").expect("Config.toml");
let config: JellyfinConfig =
toml::from_str(&config).expect("Failed to parse config.toml");
let config: JellyfinConfig = toml::from_str(&config).expect("Failed to parse config.toml");
let mut jellyfin = JellyfinClient::new(config);
jellyfin.authenticate_with_cached_token(".session").await.expect("Auth");
let items = jellyfin.raw_items().await.expect("Items");
jellyfin
.authenticate_with_cached_token(".session")
.await
.expect("Auth");
let items = jellyfin.items(None).await.expect("Items");
std::fs::write(
"items.json",
serde_json::to_string_pretty(&items).expect("Serialize items"),
);
for item in items {
println!("{}: {:?}", item.id, item.name);
let items = jellyfin.items(item.id).await.expect("Items");
for item in items {
println!(" {}: {:?}", item.id, item.name);
}
}
}