diff options
-rw-r--r-- | tool/src/import/mod.rs | 7 | ||||
-rw-r--r-- | tool/src/main.rs | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tool/src/import/mod.rs b/tool/src/import/mod.rs index ec88fdd..250643e 100644 --- a/tool/src/import/mod.rs +++ b/tool/src/import/mod.rs @@ -35,6 +35,7 @@ pub(crate) fn import(action: Action, dry: bool) -> anyhow::Result<()> { ignore_attachments, copy, video, + ignore_metadata, r#move, } => { if std::env::current_dir().unwrap().file_name().unwrap() != "library" { @@ -98,6 +99,12 @@ pub(crate) fn import(action: Action, dry: bool) -> anyhow::Result<()> { file_meta.cover = None; file_meta.infojson = None; } + if ignore_metadata { + let file_meta = file_meta.as_mut().unwrap(); + file_meta.description = None; + file_meta.tagline = None; + file_meta.title = None; + } if let Some(ij) = &file_meta.as_ref().unwrap().infojson { infojson = diff --git a/tool/src/main.rs b/tool/src/main.rs index 8135d20..26865c6 100644 --- a/tool/src/main.rs +++ b/tool/src/main.rs @@ -67,6 +67,9 @@ enum Action { /// Ignore attachments (dont use them as cover) #[arg(long)] ignore_attachments: bool, + /// Ignore metadate (no title, description and tagline from input) + #[arg(long)] + ignore_metadata: bool, }, Migrate { database: PathBuf, |