diff options
Diffstat (limited to 'import/src/lib.rs')
-rw-r--r-- | import/src/lib.rs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/import/src/lib.rs b/import/src/lib.rs index 3b9a690..293ffb0 100644 --- a/import/src/lib.rs +++ b/import/src/lib.rs @@ -416,16 +416,17 @@ fn import_media_file( NodeKind::Video }; node.title = Some(infojson.title); - node.subtitle = infojson - .alt_title - .or(infojson - .uploader - .as_ref() - .map(|u| clean_uploader_name(u).to_owned())) - .or(node.subtitle.clone()); - if node.title == node.subtitle { - node.subtitle = None + node.subtitle = if infojson.alt_title != node.title { + infojson.alt_title + } else { + None } + .or(infojson + .uploader + .as_ref() + .map(|u| clean_uploader_name(u).to_owned())) + .or(node.subtitle.clone()); + if let Some(desc) = infojson.description { node.description = Some(desc) } |