diff options
Diffstat (limited to 'server/src/routes/stream.rs')
-rw-r--r-- | server/src/routes/stream.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/src/routes/stream.rs b/server/src/routes/stream.rs index 1b2c741..4fbc990 100644 --- a/server/src/routes/stream.rs +++ b/server/src/routes/stream.rs @@ -15,15 +15,16 @@ use std::path::PathBuf; use tokio::io::{duplex, DuplexStream}; use tokio_util::io::SyncIoBridge; -pub fn stream_uri(path: &PathBuf, tracks: &Vec<u64>) -> String { +pub fn stream_uri(path: &PathBuf, tracks: &Vec<u64>, webm: bool) -> String { format!( - "/stream/{}?tracks={}", + "/stream/{}?tracks={}&webm={}", path.to_str().unwrap().to_string(), tracks .iter() .map(|v| format!("{v}")) .collect::<Vec<_>>() - .join(",") + .join(","), + if webm { "1" } else { "0" } ) } |