From ad48ad757c95733467eaf7906b63cdb619c87938 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Fri, 20 Jan 2023 19:32:32 -0800 Subject: [PATCH] Fix plugin order --- comicapi/comicarchive.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/comicapi/comicarchive.py b/comicapi/comicarchive.py index b0c2be2..6e88d3f 100644 --- a/comicapi/comicarchive.py +++ b/comicapi/comicarchive.py @@ -54,16 +54,18 @@ archivers: list[type[Archiver]] = [] def load_archive_plugins() -> None: if not archivers: + builtin: list[type[Archiver]] = [] for arch in entry_points(group="comicapi.archiver"): try: archiver: type[Archiver] = arch.load() if archiver.enabled: - if not arch.module.startswith("comicapi"): - archivers.insert(0, archiver) + if arch.module.startswith("comicapi"): + builtin.append(archiver) else: archivers.append(archiver) except Exception: logger.warning("Failed to load talker: %s", arch.name) + archivers.extend(builtin) class MetaDataStyle: