This commit is contained in:
2025-07-08 10:58:19 +02:00
parent ce619f6925
commit 781bbe9fda
2 changed files with 26 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo. # This file is automatically @generated by Cargo.
# It is not intended for manual editing. # It is not intended for manual editing.
version = 3 version = 4
[[package]] [[package]]
name = "addr2line" name = "addr2line"
@@ -144,6 +144,8 @@ version = "0.1.0"
dependencies = [ dependencies = [
"lettre", "lettre",
"reqwest", "reqwest",
"serde",
"serde_yaml_ng",
"tokio", "tokio",
] ]
@@ -1111,6 +1113,19 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "serde_yaml_ng"
version = "0.9.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd24347956e682cf958c95e82deb9914cad4010d3efc035d579f81f4c426038c"
dependencies = [
"indexmap",
"itoa",
"ryu",
"serde",
"unsafe-libyaml",
]
[[package]] [[package]]
name = "shlex" name = "shlex"
version = "1.3.0" version = "1.3.0"
@@ -1388,6 +1403,12 @@ version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "unsafe-libyaml"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
[[package]] [[package]]
name = "untrusted" name = "untrusted"
version = "0.9.0" version = "0.9.0"

View File

@@ -1,5 +1,3 @@
use std::collections::HashMap;
struct Channel { struct Channel {
id: String, id: String,
@@ -8,15 +6,15 @@ struct Channel {
} }
#[tokio::main] #[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> { async fn main() {
let channellist = "https://raw.githubusercontent.com/bvanroll/home/refs/heads/master/static/yters.yaml"; let channellist = "https://raw.githubusercontent.com/bvanroll/home/refs/heads/master/static/yters.yaml";
//getting the list of channels with id's first //getting the list of channels with id's first
// //
//https://raw.githubusercontent.com/bvanroll/home/refs/heads/master/static/yters.json //https://raw.githubusercontent.com/bvanroll/home/refs/heads/master/static/yters.json
let resp = reqwest::get(channellist) let resp = reqwest::get(channellist)
.await? .await.
.text() .text()
.await?; .await;
let channels: Vec<Channel> =serde_yaml_ng::from_str(&resp)?; let channels: Vec<Channel> =serde_yaml_ng::from_str(&resp);
} }