diff options
-rw-r--r-- | import/src/main.rs | 9 |
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!( |