condition for case where audio is already collected

This commit is contained in:
Jakub Jezek 2022-08-17 11:59:15 +02:00
parent 266975d694
commit 98ac7f538e
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -68,9 +68,10 @@ class CollectAudio(pyblish.api.InstancePlugin):
# Add audio to instance if representation was found
if repre_doc:
instance.data["audio"] = [{
"offset": 0,
"filename": get_representation_path(repre_doc)
}]
if not instance.data.get("audio"):
instance.data["audio"] = [{
"offset": 0,
"filename": get_representation_path(repre_doc)
}]
self.log.debug("instance.data: {}".format(pformat(instance.data)))