aboutsummaryrefslogtreecommitdiff
path: root/client/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-09-24 19:19:21 +0200
committermetamuffin <metamuffin@disroot.org>2023-09-24 19:19:21 +0200
commit11a7ad0a6f66d692f1e9e002bb73ea6f737c84bb (patch)
treefe5256af49d84d9fef636d1862aab8956445b087 /client/src/lib.rs
parent6b3ebbc1dd73382d81252778eac04cba6955584a (diff)
downloadjellything-11a7ad0a6f66d692f1e9e002bb73ea6f737c84bb.tar
jellything-11a7ad0a6f66d692f1e9e002bb73ea6f737c84bb.tar.bz2
jellything-11a7ad0a6f66d692f1e9e002bb73ea6f737c84bb.tar.zst
flat import (untested) + parallel fed download
Diffstat (limited to 'client/src/lib.rs')
-rw-r--r--client/src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/src/lib.rs b/client/src/lib.rs
index eb978ee..a3c61aa 100644
--- a/client/src/lib.rs
+++ b/client/src/lib.rs
@@ -5,6 +5,7 @@
*/
use anyhow::Result;
use jellycommon::NodePublic;
+use log::debug;
use reqwest::{
header::{HeaderMap, HeaderValue},
Client,
@@ -77,6 +78,7 @@ impl Session {
}
pub async fn node(&self, id: &str) -> Result<NodePublic> {
+ debug!("downloading node {id:?}");
Ok(self
.client
.get(format!("{}/n/{id}", self.instance.base()))
@@ -88,6 +90,7 @@ impl Session {
// TODO use AssetRole instead of str
pub async fn node_asset(&self, id: &str, role: &str, mut writer: impl Write) -> Result<()> {
+ debug!("downloading asset {role:?} for {id:?}");
let mut r = self
.client
.get(format!("{}/n/{id}/asset?role={role}", self.instance.base()))