aboutsummaryrefslogtreecommitdiff
path: root/import/src/tmdb.rs
diff options
context:
space:
mode:
Diffstat (limited to 'import/src/tmdb.rs')
-rw-r--r--import/src/tmdb.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/import/src/tmdb.rs b/import/src/tmdb.rs
index 51748f8..45d7650 100644
--- a/import/src/tmdb.rs
+++ b/import/src/tmdb.rs
@@ -67,6 +67,7 @@ impl Tmdb {
.await?)
})
.await
+ .context("tmdb search")
}
pub async fn details(&self, kind: TmdbKind, id: u64) -> anyhow::Result<Arc<TmdbDetails>> {
async_cache_memory("api-tmdb-details", (kind, id), || async move {
@@ -84,6 +85,7 @@ impl Tmdb {
.await?)
})
.await
+ .context("tmdb details")
}
pub async fn person_image(&self, id: u64) -> anyhow::Result<Arc<TmdbPersonImage>> {
async_cache_memory("api-tmdb-search", id, || async move {
@@ -100,6 +102,7 @@ impl Tmdb {
.await?)
})
.await
+ .context("tmdb person images")
}
pub async fn image(&self, path: &str) -> anyhow::Result<CachePath> {
async_cache_file("api-tmdb-image", path, |mut file| async move {
@@ -116,6 +119,7 @@ impl Tmdb {
Ok(())
})
.await
+ .context("tmdb image download")
}
pub async fn episode_details(
@@ -135,7 +139,7 @@ impl Tmdb {
.json()
.await?)
})
- .await
+ .await.context("tmdb episode details")
}
}