diff options
Diffstat (limited to 'server/src/routes')
-rw-r--r-- | server/src/routes/ui/player.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/server/src/routes/ui/player.rs b/server/src/routes/ui/player.rs index ba380d0..d5cb685 100644 --- a/server/src/routes/ui/player.rs +++ b/server/src/routes/ui/player.rs @@ -8,8 +8,13 @@ use crate::{ library::{Item, Library}, routes::{ stream::stream_uri, - ui::{error::MyResult, layout::DynLayoutPage}, + ui::{ + error::MyResult, + layout::DynLayoutPage, + node::{rocket_uri_macro_r_item_assets, AssetRole}, + }, }, + uri, }; use jellycommon::SourceTrackKind; use markup::DynRender; @@ -50,7 +55,9 @@ pub fn r_player( title: item.info.title.to_owned(), class: Some("player"), content: markup::new! { - @if !tracks.is_empty() { + @if tracks.is_empty() { + img.backdrop[src=uri!(r_item_assets(&item.lib_path, AssetRole::Backdrop)).to_string()]; + } else { video[src=stream_uri(&item.lib_path, &tracks, true), controls]{} } @player_conf(item.clone(), !tracks.is_empty()) @@ -73,7 +80,6 @@ pub fn player_conf<'a>(item: Arc<Item>, playing: bool) -> DynRender<'a> { } markup::new! { - // img.backdrop[src=uri!(r_item_assets(&item.lib_path)).to_string()]; form.playerconf[method = "GET", action = ""] { h2 { "Select tracks for " @item.info.title } |