Skip to content

Commit

Permalink
Merge pull request #86 from johhnry/fix-end-frame-calculation
Browse files Browse the repository at this point in the history
Fix: subtract 1 in end frame calculation
  • Loading branch information
martastain authored Dec 20, 2024
2 parents fc0e76a + 60ccd87 commit 80403d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/kitsu/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
10 changes: 8 additions & 2 deletions services/processor/processor/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 80403d3

Please sign in to comment.