diff options
author | metamuffin <metamuffin@disroot.org> | 2023-12-16 01:48:25 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-12-16 01:48:25 +0100 |
commit | 6e5dadf5a42b633c199be54969d229e34c4c3a00 (patch) | |
tree | 2307965269ada347e22bbdd566bc16572c457768 | |
parent | ef4c1cec446a18141c08165380795fdbdb47de0d (diff) | |
download | jellything-6e5dadf5a42b633c199be54969d229e34c4c3a00.tar jellything-6e5dadf5a42b633c199be54969d229e34c4c3a00.tar.bz2 jellything-6e5dadf5a42b633c199be54969d229e34c4c3a00.tar.zst |
no mark watched on colleection and channel
-rw-r--r-- | server/src/routes/ui/node.rs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/server/src/routes/ui/node.rs b/server/src/routes/ui/node.rs index 2932bf3..972299b 100644 --- a/server/src/routes/ui/node.rs +++ b/server/src/routes/ui/node.rs @@ -113,16 +113,18 @@ markup::define! { .title { h1 { @node.title } @if node.media.is_some() { a.play[href=&uri!(r_player(id, PlayerConfig::default()))] { "Watch now" }} - @match udata.watched { - WatchedState::None | - WatchedState::Progress(_) => { - form.mark_watched[method="POST", action=uri!(r_player_watched(id, true))] { - input[type="submit", value="Mark Watched"]; + @if !matches!(node.kind, NodeKind::Collection | NodeKind::Channel) { + @match udata.watched { + WatchedState::None | + WatchedState::Progress(_) => { + form.mark_watched[method="POST", action=uri!(r_player_watched(id, true))] { + input[type="submit", value="Mark Watched"]; + } } - } - WatchedState::Watched => { - form.mark_unwatched[method="POST", action=uri!(r_player_watched(id, false))] { - input[type="submit", value="Mark Unwatched"]; + WatchedState::Watched => { + form.mark_unwatched[method="POST", action=uri!(r_player_watched(id, false))] { + input[type="submit", value="Mark Unwatched"]; + } } } } |