From 17ddf0209075c39784ae15bbd103340655f020d0 Mon Sep 17 00:00:00 2001 From: Joseph HENRY Date: Thu, 24 Oct 2024 16:33:19 +0200 Subject: [PATCH 1/2] fix: subtract 1 in end frame calculation --- server/kitsu/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/kitsu/utils.py b/server/kitsu/utils.py index 83fcfa0..62c285b 100644 --- a/server/kitsu/utils.py +++ b/server/kitsu/utils.py @@ -33,7 +33,7 @@ def calculate_end_frame( if frame_start is None and hasattr(folder.attrib, "frameStart"): frame_start = folder.attrib.frameStart if frame_start is not None: - return int(frame_start) + int(entity_dict["nb_frames"]) + return int(frame_start) + int(entity_dict["nb_frames"]) - 1 def create_name_and_label(kitsu_name: str) -> dict[str, str]: From 60ccd8774f72630f72f6638f5a93267b4dd4ccfb Mon Sep 17 00:00:00 2001 From: Martastain Date: Fri, 20 Dec 2024 10:20:57 +0100 Subject: [PATCH 2/2] chore: lint --- services/processor/processor/processor.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/processor/processor/processor.py b/services/processor/processor/processor.py index 13067cf..ccbd887 100644 --- a/services/processor/processor/processor.py +++ b/services/processor/processor/processor.py @@ -315,8 +315,14 @@ def start_processing(self): if startup: logging.info("Running sync for all paired projects") for pair in self.pairing_list: - if pair.get("kitsuProjectId") and pair.get("ayonProjectName"): - project_full_sync(self, pair["kitsuProjectId"], pair["ayonProjectName"]) + project_id = pair.get("kitsuProjectId") + project_name = pair.get("ayonProjectName") + if project_id and project_name: + project_full_sync( + self, + project_id, + project_name, + ) startup = False # Check for a new sync job