aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes/stream.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-01-25 07:42:27 +0100
committermetamuffin <metamuffin@disroot.org>2023-01-25 07:42:27 +0100
commit814896238c9b3928709f27606816ab6de60abdf3 (patch)
tree8134ed5213cf41f907f2af68ad9c8df245a937bd /server/src/routes/stream.rs
parent4529d07cc3f2f86a9dbb0d4802875a81d5c4c495 (diff)
downloadjellything-814896238c9b3928709f27606816ab6de60abdf3.tar
jellything-814896238c9b3928709f27606816ab6de60abdf3.tar.bz2
jellything-814896238c9b3928709f27606816ab6de60abdf3.tar.zst
generate seek index
Diffstat (limited to 'server/src/routes/stream.rs')
-rw-r--r--server/src/routes/stream.rs7
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" }
)
}