aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-09-06 19:46:17 +0200
committermetamuffin <metamuffin@disroot.org>2023-09-06 19:46:17 +0200
commit2b3271ead145fa7a6ed880caf93f52af822ede8c (patch)
tree3cc6b8cb196839ccaff07181840a59ad9770b0fb
parentcf5c9266ed512df9304e0e76d248eeab972e6665 (diff)
downloadjellything-2b3271ead145fa7a6ed880caf93f52af822ede8c.tar
jellything-2b3271ead145fa7a6ed880caf93f52af822ede8c.tar.bz2
jellything-2b3271ead145fa7a6ed880caf93f52af822ede8c.tar.zst
import: change tittle precendence from meta to tmdb
-rw-r--r--import/src/main.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/import/src/main.rs b/import/src/main.rs
index febdbe9..e998165 100644
--- a/import/src/main.rs
+++ b/import/src/main.rs
@@ -221,14 +221,11 @@ fn main() -> anyhow::Result<()> {
};
}
- let title = file_meta
+ let title = tmdb_details
.as_ref()
- .map(|m| m.title.clone())
+ .map(|d| d.title.clone().or(d.name.clone()))
.flatten()
- .or(tmdb_details
- .as_ref()
- .map(|d| d.title.clone().or(d.name.clone()))
- .flatten())
+ .or(file_meta.as_ref().map(|m| m.title.clone()).flatten())
.expect("no title detected");
let ident = format!(