aboutsummaryrefslogtreecommitdiff
path: root/import/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-01-23 04:01:14 +0100
committermetamuffin <metamuffin@disroot.org>2024-01-23 04:01:14 +0100
commit0318a9f925f2507200a5b9b714f20560b770d7b0 (patch)
treec05c066b4e8c09409ebc5bbd87556e2767922f06 /import/src/lib.rs
parentdf7b37c2f5a7d7ace4e831595ae691aae816d83a (diff)
downloadjellything-0318a9f925f2507200a5b9b714f20560b770d7b0.tar
jellything-0318a9f925f2507200a5b9b714f20560b770d7b0.tar.bz2
jellything-0318a9f925f2507200a5b9b714f20560b770d7b0.tar.zst
bug in tmdb date parser and some more error handling
Diffstat (limited to 'import/src/lib.rs')
-rw-r--r--import/src/lib.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/import/src/lib.rs b/import/src/lib.rs
index 473ed53..bf3c48d 100644
--- a/import/src/lib.rs
+++ b/import/src/lib.rs
@@ -141,7 +141,11 @@ pub fn generate_node_paths(db: &DataAcid) -> anyhow::Result<()> {
let txn = db.inner.begin_write()?;
let table = txn.open_table(T_NODE)?;
- let mut node = table.get(&*c)?.ok_or(anyhow!("your mum"))?.value().0;
+ let mut node = table
+ .get(&*c)?
+ .ok_or(anyhow!("missing child when generating paths: {c:?} at {path:?}"))?
+ .value()
+ .0;
if node.public.path.is_empty() {
node.public.path = path.clone();
@@ -372,7 +376,7 @@ async fn process_source(
.insert(Rating::Tmdb, details.vote_average);
if let Some(date) = details.release_date.clone() {
node.public.release_date =
- Some(parse_release_date(&date).context("parsing release date")?);
+ parse_release_date(&date).context("parsing release date")?;
}
insert_node(&id, node)?;