From b06e256ad9c11238db589c2bf2bbebe8d9cecdbd Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 15 Feb 2021 20:49:23 -0500 Subject: [PATCH] fix add command not updating snapshot detail index pages when passed index-only and overwrite flags together --- archivebox/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/archivebox/main.py b/archivebox/main.py index afcaaeff..a10ad212 100644 --- a/archivebox/main.py +++ b/archivebox/main.py @@ -585,6 +585,10 @@ def add(urls: Union[str, List[str]], all_links = load_main_index(out_dir=out_dir) if index_only: + if overwrite: + archive_links(imported_links, overwrite=overwrite, methods=['index_only'], out_dir=out_dir) + else: + archive_links(new_links, overwrite=False, methods=['index_only'], out_dir=out_dir) return all_links # Run the archive methods for each link @@ -593,6 +597,7 @@ def add(urls: Union[str, List[str]], } if extractors: archive_kwargs["methods"] = extractors + if update_all: archive_links(all_links, overwrite=overwrite, **archive_kwargs) elif overwrite: