mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
upload file to kitsu
This commit is contained in:
parent
ff6c8a6a54
commit
ed8c01c263
3 changed files with 27 additions and 10 deletions
|
|
@ -9,7 +9,7 @@ class IntegrateKitsuNote(pyblish.api.ContextPlugin):
|
|||
order = pyblish.api.IntegratorOrder
|
||||
label = "Kitsu Note and Status"
|
||||
# families = ["kitsu"]
|
||||
optional = True
|
||||
# optional = True
|
||||
|
||||
def process(self, context):
|
||||
|
||||
|
|
@ -30,8 +30,10 @@ class IntegrateKitsuNote(pyblish.api.ContextPlugin):
|
|||
kitsu_status = context.data["kitsu_task"].get("task_status")
|
||||
self.log.debug("Kitsu status: {}".format(kitsu_status))
|
||||
|
||||
gazu.task.add_comment(
|
||||
kitsu_comment = gazu.task.add_comment(
|
||||
context.data["kitsu_task"],
|
||||
kitsu_status,
|
||||
comment = publish_comment
|
||||
)
|
||||
)
|
||||
|
||||
context.data["kitsu_comment"] = kitsu_comment
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import gazu
|
||||
import pyblish.api
|
||||
|
||||
|
|
@ -6,12 +7,27 @@ import pyblish.api
|
|||
class IntegrateKitsuVersion(pyblish.api.InstancePlugin):
|
||||
"""Integrate Kitsu Review"""
|
||||
|
||||
order = pyblish.api.IntegratorOrder
|
||||
order = pyblish.api.IntegratorOrder + 0.01
|
||||
label = "Kitsu Review"
|
||||
# families = ["kitsu"]
|
||||
|
||||
def process(self, instance):
|
||||
pass
|
||||
|
||||
# gazu.task.upload_preview_file(preview, file_path, normalize_movie=True, client=<gazu.client.KitsuClient object>)
|
||||
# gazu.task.add_preview(task, comment, preview_file_path, normalize_movie=True, client=<gazu.client.KitsuClient object>)
|
||||
context = instance.context
|
||||
task = context.data["kitsu_task"]
|
||||
comment = context.data["kitsu_comment"]
|
||||
|
||||
for representation in instance.data.get("representations", []):
|
||||
|
||||
local_path = representation.get("published_path")
|
||||
self.log.info("*"*40)
|
||||
self.log.info(local_path)
|
||||
self.log.info(representation.get("tags", []))
|
||||
|
||||
# code = os.path.basename(local_path)
|
||||
|
||||
if representation.get("tags", []):
|
||||
continue
|
||||
|
||||
# gazu.task.upload_preview_file(preview, file_path, normalize_movie=True)
|
||||
gazu.task.add_preview(task, comment, local_path, normalize_movie=True)
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
from typing import Optional
|
||||
import pyblish.api
|
||||
import gazu
|
||||
|
||||
|
||||
class IntegrateKitsuNote(pyblish.api.ContextPlugin):
|
||||
"""Integrate Kitsu Note"""
|
||||
class ValidateKitsuIntent(pyblish.api.ContextPlugin):
|
||||
"""Validate Kitsu Status"""
|
||||
|
||||
order = pyblish.api.ValidatorOrder
|
||||
label = "Kitsu Intent/Status"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue