From cc3e72b92f4aed6789b9191d51ea71817531f0be Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sun, 15 Mar 2026 04:54:55 -0700 Subject: [PATCH] Preserve tags for index-only adds --- archivebox/cli/archivebox_add.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/archivebox/cli/archivebox_add.py b/archivebox/cli/archivebox_add.py index d21c11c6..ed72dace 100644 --- a/archivebox/cli/archivebox_add.py +++ b/archivebox/cli/archivebox_add.py @@ -109,7 +109,7 @@ def add(urls: str | list[str], print('[yellow]\\[*] Index-only mode - crawl created but not started[/yellow]') # Create snapshots for all URLs in the crawl for url in crawl.get_urls_list(): - Snapshot.objects.update_or_create( + snapshot, _ = Snapshot.objects.update_or_create( crawl=crawl, url=url, defaults={ 'status': Snapshot.INITIAL_STATE, @@ -118,6 +118,8 @@ def add(urls: str | list[str], 'depth': 0, }, ) + if tag: + snapshot.save_tags(tag.split(',')) return crawl.snapshot_set.all() # 5. Start the orchestrator to process the queue