diff options
author | metamuffin <metamuffin@disroot.org> | 2023-09-29 20:56:36 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-09-29 20:56:36 +0200 |
commit | c62eb3a2fdaa80f472be6ecbfc2cbf2479d8d914 (patch) | |
tree | 7a32678b59c123ea6fbe6c01237aec5e3b143e87 /client/src/lib.rs | |
parent | 29b12a48bcfa3aa0f814f7b39a64868b6313c13d (diff) | |
download | jellything-c62eb3a2fdaa80f472be6ecbfc2cbf2479d8d914.tar jellything-c62eb3a2fdaa80f472be6ecbfc2cbf2479d8d914.tar.bz2 jellything-c62eb3a2fdaa80f472be6ecbfc2cbf2479d8d914.tar.zst |
move stream generation to new crate
Diffstat (limited to 'client/src/lib.rs')
-rw-r--r-- | client/src/lib.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/client/src/lib.rs b/client/src/lib.rs index a3c61aa..bd9882c 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -4,6 +4,7 @@ Copyright (C) 2023 metamuffin <metamuffin.org> */ use anyhow::Result; +use jc::stream::StreamSpec; use jellycommon::NodePublic; use log::debug; use reqwest::{ @@ -102,17 +103,12 @@ impl Session { Ok(()) } - pub fn stream(&self, id: &str, tracks: &[usize], webm: bool) -> String { + pub fn stream(&self, id: &str, stream_spec: &StreamSpec) -> String { format!( - "{}/n/{}/stream?tracks={}&webm={}&{}", + "{}/n/{}/stream?{}&{}", self.instance.base(), id, - tracks - .iter() - .map(|v| format!("{v}")) - .collect::<Vec<_>>() - .join(","), - if webm { "1" } else { "0" }, + todo!(), self.session_param() ) } |