aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-12-09 11:20:41 +0100
committermetamuffin <metamuffin@disroot.org>2023-12-09 11:20:41 +0100
commit2b5cbd8eba60785be55a8ed2b7558feef683e503 (patch)
treedde73bd33ec3caf3f6ea09d81c130b5ad76f0150 /server
parented6270c806289615830ef8d55347ce32bb4a457c (diff)
downloadjellything-2b5cbd8eba60785be55a8ed2b7558feef683e503.tar
jellything-2b5cbd8eba60785be55a8ed2b7558feef683e503.tar.bz2
jellything-2b5cbd8eba60785be55a8ed2b7558feef683e503.tar.zst
list tracks in node page
Diffstat (limited to 'server')
-rw-r--r--server/src/routes/ui/node.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/server/src/routes/ui/node.rs b/server/src/routes/ui/node.rs
index ed7b7e2..4dfaef1 100644
--- a/server/src/routes/ui/node.rs
+++ b/server/src/routes/ui/node.rs
@@ -70,6 +70,8 @@ pub async fn r_library_node_filter<'a>(
filter_and_sort_nodes(&filter, &mut children);
+ // node.media.unwrap().tracks[0].
+
Ok(Either::Left(LayoutPage {
title: node.title.to_string(),
content: markup::new! {
@@ -99,7 +101,7 @@ markup::define! {
// }
// div.details {
// h3 { @node.title }
- // p.descriptioüwn { @node.description }
+ // p.description { @node.description }
// @if matches!(node.kind, NodeKind::Collection | NodeKind::Channel) {
// a[href=&uri!(r_library_node(id))] { "Open" }
// } else {
@@ -133,6 +135,14 @@ markup::define! {
@if let Some(description) = &node.description {
p { @for line in description.lines() { @line br; } }
}
+ @if let Some(media) = &node.media {
+ details {
+ summary { "Tracks" }
+ ol { @for track in &media.tracks {
+ li { @format!("{track}") }
+ }}
+ }
+ }
}
@if matches!(node.kind, NodeKind::Collection | NodeKind::Channel) {
@if matches!(node.kind, NodeKind::Collection) {