Jump to content

Replace Components in AssetVersion


cschnell

Recommended Posts

Hi,

I've got a technical question. I want to replace the AssetVersion's upload components via the API.

So, when I have a AssetVersion object and call the encode_media(..) function, the components gets replaced by the new media. But my question is: what happens with the components which where associated to the AssetVersion before?  Are they deleted automatically or are they still in the system without any reference? Do I need to delete them manually?

Thanks

Christian

Link to comment
Share on other sites

Hi,

Thanks for reaching out.

If you call "AssetVersion.encode_media(component, keep_original=False)" the original component will automatically be removed from the cloud storage (ftrack server location) and deleted when the encoding process completes. There is no need to remove it manually.

Regards,
Lucas

Link to comment
Share on other sites

  • 1 year later...

Let's say i wanted to just use components (i'm ensuring all media is a properly formatted .mp4 files with an accompanything thumbnail that i control) and didn't want to use the encode() function.  Is there a way to find/remove old components?  This is something that'd be super useful for me. 

Link to comment
Share on other sites

Hi Tom,

 

What do you mean by "old components"? Are you replacing files on an AssetVersion (and want to make sure you don't have orphaned files on the ftrack.server Location)? Do you want to find Components for which a more-recent AssetVersion has a Component with the same name?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...