diff --git a/src/Pipfile.lock b/src/Pipfile.lock index 085556d..0be7c81 100644 --- a/src/Pipfile.lock +++ b/src/Pipfile.lock @@ -180,12 +180,12 @@ }, "auto-archiver": { "hashes": [ - "sha256:489699da5caeac033977b687b20199263b7d8d2cd99facb65f6011858ccfed7a", - "sha256:57e7cbde92d58c01fea06045709482134a09f3c4ce02a0aff8ac3a35fcfa7e33" + "sha256:833747537964656be5496227da1d12f99e04a7579cf3a603539095a27326f0d2", + "sha256:a5c3a328a9ea5c5eae2b1886debdb43521915b2d4165176b7c41927805a0048e" ], "index": "pypi", "markers": "python_version >= '3.8'", - "version": "==0.7.3" + "version": "==0.7.6" }, "beautifulsoup4": { "hashes": [ diff --git a/src/main.py b/src/main.py index 32d7783..f4f7631 100644 --- a/src/main.py +++ b/src/main.py @@ -25,7 +25,7 @@ load_dotenv() # Configuration ALLOWED_ORIGINS = os.environ.get("ALLOWED_ORIGINS", "chrome-extension://ondkcheoicfckabcnkdgbepofpjmjcmb,chrome-extension://ojcimmjndnlmmlgnjaeojoebaceokpdp").split(",") -VERSION = "0.5.7" +VERSION = "0.5.8" # min-version refers to the version of auto-archiver-extension on the webstore BREAKING_CHANGES = {"minVersion": "0.3.1", "message": "The latest update has breaking changes, please update the extension to the most recent version."} diff --git a/src/worker.py b/src/worker.py index 8f010a2..1baaca0 100644 --- a/src/worker.py +++ b/src/worker.py @@ -44,8 +44,7 @@ def create_archive_task(self, archive_json: str): archives = crud.search_tasks_by_url(session, url, archive.author_id, absolute_search=True) if len(archives): logger.info(f"Skipping {url=} as it was already archived") - # TODO: can we achieve something better than the last result? - return archives[0].result + return Metadata.choose_most_complete([a.result for a in archives]) orchestrator = choose_orchestrator(archive.group_id, archive.author_id) result = orchestrator.feed_item(Metadata().set_url(url))