Count let of streams

This commit is contained in:
Ivan Bushchik 2023-06-18 12:02:40 +03:00
parent 0862467e91
commit 14e1dfed76
No known key found for this signature in database
GPG key ID: 9F6DDABE11A2674D

View file

@ -88,6 +88,9 @@ fn index() -> RawHtml<String> {
} }
} }
m3u8.sort_by_key(|x| x.alias.clone()); m3u8.sort_by_key(|x| x.alias.clone());
if m3u8.len() == 0 {
res += "No streams available";
}
for i in m3u8 { for i in m3u8 {
res += &*format!( res += &*format!(
"<a href=\"{}\">{}</a> <a href=\"/play/{}\">Play</a> (copy link into your player)<br>", "<a href=\"{}\">{}</a> <a href=\"/play/{}\">Play</a> (copy link into your player)<br>",