diff options
Diffstat (limited to 'tool')
-rw-r--r-- | tool/src/import/mod.rs | 6 | ||||
-rw-r--r-- | tool/src/main.rs | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tool/src/import/mod.rs b/tool/src/import/mod.rs index 17f3137..ec88fdd 100644 --- a/tool/src/import/mod.rs +++ b/tool/src/import/mod.rs @@ -32,6 +32,7 @@ pub(crate) fn import(action: Action, dry: bool) -> anyhow::Result<()> { input, series, ident_prefix, + ignore_attachments, copy, video, r#move, @@ -92,6 +93,11 @@ pub(crate) fn import(action: Action, dry: bool) -> anyhow::Result<()> { let mut input = EbmlReader::new(input); import_metadata(&mut input)? }); + if ignore_attachments { + let file_meta = file_meta.as_mut().unwrap(); + file_meta.cover = None; + file_meta.infojson = 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 3a670f5..8a67f30 100644 --- a/tool/src/main.rs +++ b/tool/src/main.rs @@ -62,6 +62,9 @@ enum Action { /// Marks node as a series #[arg(short, long)] series: bool, + /// Ignore attachments (dont use them as cover) + #[arg(long)] + ignore_attachments: bool, }, Migrate { database: PathBuf, |