push
ensure_task_status(project, task_status_name) async
TODO: kitsu listener for new task statuses would be preferable
Source code in server/kitsu/push.py
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 | |
ensure_task_type(project, task_type_name) async
TODO: kitsu listener for new task types would be preferable
Source code in server/kitsu/push.py
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | |
get_root_folder_id(user, project_name, kitsu_type, kitsu_type_id, subfolder_id=None, subfolder_name=None) async
Get the root folder ID for a given Kitsu type and ID. If a folder/subfolder does not exist, it will be created.
Source code in server/kitsu/push.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
sync_casting(addon, user, project, entity_dict, settings) async
Sync casting links for a target (shot or asset) by reconciling existing links with desired state from Kitsu.
Perform full reconciliation of casting links: 1. Fetch existing AYON links for the target folder 2. Map existing links by asset Kitsu ID (from link data or folder lookup) 3. For each asset in Kitsu's desired state: - Delete excess links if more exist in AYON than in Kitsu - Create missing links if fewer exist in AYON than in Kitsu - Each link includes occurence number in its data 4. Delete links for assets removed from Kitsu casting
Handle multi-occurence casting by creating multiple links with the same input/output/type but different occurence numbers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
addon | KitsuAddon | KitsuAddon instance (unused but required by push_entities). | required |
user | UserEntity | User entity for authentication when creating/deleting links. | required |
project | ProjectEntity | AYON project entity. | required |
entity_dict | EntityDict | SyncCasting entity dictionary containing: - target_id: Kitsu ID of the shot or asset - target_type: "Shot" or "Asset" - asset_ids: Dictionary mapping asset Kitsu IDs to occurence counts - ayon_server_url: Base URL for AYON API calls | required |
settings | Any | Addon settings containing sync_casting configuration. | required |
Returns:
| Type | Description |
|---|---|
None | None. Warnings for missing targets/assets and API failures. |
Source code in server/kitsu/push.py
593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 | |