diff --git a/src/main.rs b/src/main.rs index ddbd907..60395db 100644 --- a/src/main.rs +++ b/src/main.rs @@ -50,13 +50,13 @@ async fn get_queue(_req: tide::Request<()>) -> tide::Result { } #[derive(Template)] -#[template(path = "current.html")] +#[template(path = "player.html")] struct CurrentTemplate { song: Option, name: Option, } -async fn get_current(_req: tide::Request<()>) -> tide::Result { +async fn get_player(_req: tide::Request<()>) -> tide::Result { let mut mpd = mpd::connect()?; let song = mpd.currentsong()?; @@ -160,7 +160,7 @@ async fn main() -> tide::Result<()> { app.at("/").get(index); app.at("/queue").get(get_queue); - app.at("/current").get(get_current); + app.at("/player").get(get_player); app.at("/art").get(get_art); app.at("/sse").get(tide::sse::endpoint(sse)); diff --git a/templates/index.html b/templates/index.html index 14eb60a..6b168df 100644 --- a/templates/index.html +++ b/templates/index.html @@ -188,7 +188,7 @@
-
+
diff --git a/templates/current.html b/templates/player.html similarity index 91% rename from templates/current.html rename to templates/player.html index 7851ea9..5a31ca4 100644 --- a/templates/current.html +++ b/templates/player.html @@ -13,6 +13,10 @@
{{ artist }}
{% endif %} + {% else %} + {% endif %}