diff --git a/src/main.rs b/src/main.rs index 14e8e1b..ddbd907 100644 --- a/src/main.rs +++ b/src/main.rs @@ -126,6 +126,10 @@ async fn sse(_req: tide::Request<()>, sender: tide::sse::Sender) -> tide::Result let mut buffer = String::new(); reader.read_line(&mut buffer).await?; + // Update everything on connect + sender.send("playlist", "", None).await?; + sender.send("player", "", None).await?; + loop { stream.write_all(b"idle playlist player\n").await?; diff --git a/templates/index.html b/templates/index.html index 3875377..14eb60a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,6 +4,7 @@ Empede + @@ -140,7 +141,7 @@ - +
-
-
-
+
+
+