diff options
author | metamuffin <metamuffin@disroot.org> | 2025-04-27 15:38:01 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-04-27 15:38:01 +0200 |
commit | 2f64fb74715f42a6efccf22f6573547423fdddbb (patch) | |
tree | 1395c6692579e9f202a71949fcc1ac3f8ac01b82 /import/src/tmdb.rs | |
parent | 0039f102d03cd930a7694bc3a8bd90916e2dacf8 (diff) | |
download | jellything-2f64fb74715f42a6efccf22f6573547423fdddbb.tar jellything-2f64fb74715f42a6efccf22f6573547423fdddbb.tar.bz2 jellything-2f64fb74715f42a6efccf22f6573547423fdddbb.tar.zst |
context on api errors
Diffstat (limited to 'import/src/tmdb.rs')
-rw-r--r-- | import/src/tmdb.rs | 6 |
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") } } |