Delivery: compute publishedBasename before destination path validation#1935
Conversation
| template_data, | ||
| datetime_data, | ||
| template_name | ||
| ) |
There was a problem hiding this comment.
I actually my doubts about still manipulating the publishedBasename like stripping of the frame numer.
First replace(first_frame, "") is a wrong assumption.
If my shot is 1100 and the first frame happens to be 1100 then suddenly I'm also removing the shot name from the shot.
What's the reason we can't just have publishedFilename be the full source filename?
So essentially:
published_filename = os.path.basename(source)And that's it. It doesn't make much sense to use {publishedFilename} with any other tokens (unless you want to prefix it perhaps) but at least it's very clear what it does, it's the full filename of the file we're copying over?
There was a problem hiding this comment.
but how do you deal with frames and what if you want to renumber frames?
There was a problem hiding this comment.
In that scenario you wouldn't renumber frames - you'd get the exact filename that lives in the publish directory essentially.
@iLLiCiTiT thoughts? am I oversimplifying?
Changelog Description
Delivery now computes the
publishedBasenametemplate key (viapathlib.Path) before validating the destination path, instead of after. Previously, destination validation ran beforepublishedBasenamewas set, so templates relying on that key always failed the check.Additional info
Testing notes:
{publishedBasename}and confirm the destination path resolves and validates correctly.{publishedBasename}and confirm the same.Dependency
Close #1934
YN-0905