Skip to content

Commit 80403d3

Browse files
authored
Merge pull request #86 from johhnry/fix-end-frame-calculation
Fix: subtract 1 in end frame calculation
2 parents fc0e76a + 60ccd87 commit 80403d3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

server/kitsu/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def calculate_end_frame(
3333
if frame_start is None and hasattr(folder.attrib, "frameStart"):
3434
frame_start = folder.attrib.frameStart
3535
if frame_start is not None:
36-
return int(frame_start) + int(entity_dict["nb_frames"])
36+
return int(frame_start) + int(entity_dict["nb_frames"]) - 1
3737

3838

3939
def create_name_and_label(kitsu_name: str) -> dict[str, str]:

services/processor/processor/processor.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,14 @@ def start_processing(self):
315315
if startup:
316316
logging.info("Running sync for all paired projects")
317317
for pair in self.pairing_list:
318-
if pair.get("kitsuProjectId") and pair.get("ayonProjectName"):
319-
project_full_sync(self, pair["kitsuProjectId"], pair["ayonProjectName"])
318+
project_id = pair.get("kitsuProjectId")
319+
project_name = pair.get("ayonProjectName")
320+
if project_id and project_name:
321+
project_full_sync(
322+
self,
323+
project_id,
324+
project_name,
325+
)
320326
startup = False
321327

322328
# Check for a new sync job

0 commit comments

Comments
 (0)