diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/lib.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/client/src/lib.rs b/client/src/lib.rs index bd9882c..200c869 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -4,17 +4,16 @@ Copyright (C) 2023 metamuffin <metamuffin.org> */ use anyhow::Result; -use jc::stream::StreamSpec; -use jellycommon::NodePublic; use log::debug; use reqwest::{ header::{HeaderMap, HeaderValue}, Client, }; use serde_json::json; -use std::{io::Write, time::Duration}; +use std::time::Duration; +use stream::StreamSpec; -pub use jellycommon as jc; +pub use jellycommon::*; #[derive(Debug, Clone)] pub struct Instance { @@ -90,7 +89,12 @@ impl Session { } // TODO use AssetRole instead of str - pub async fn node_asset(&self, id: &str, role: &str, mut writer: impl Write) -> Result<()> { + pub async fn node_asset( + &self, + id: &str, + role: &str, + mut writer: impl std::io::Write, + ) -> Result<()> { debug!("downloading asset {role:?} for {id:?}"); let mut r = self .client @@ -108,7 +112,7 @@ impl Session { "{}/n/{}/stream?{}&{}", self.instance.base(), id, - todo!(), + stream_spec.to_query(), self.session_param() ) } |