File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -336,15 +336,13 @@ def _save_xml_fcpx(
336336 # TODO: We should calculate duration from the scene list.
337337 duration = context .video_stream .duration
338338 duration = str (duration .get_seconds ()) + "s" # TODO: Is float okay here?
339- # TODO: This should be an absolute path, but the path types between VideoStream impls aren't
340- # consistent. Need to make a breaking change to the API so that they return pathlib.Path types.
341- path = context .video_stream .path
339+ path = Path (context .video_stream .path ).absolute ()
342340 ElementTree .SubElement (
343341 resources ,
344342 "asset" ,
345343 id = ASSET_ID ,
346344 name = video_name ,
347- src = path ,
345+ src = str ( path ) ,
348346 duration = duration ,
349347 hasVideo = "1" ,
350348 hasAudio = "1" , # TODO: Handle case of no audio.
@@ -444,8 +442,8 @@ def _save_xml_fcp(
444442
445443 file_ref = ElementTree .SubElement (clip , "file" , id = f"file{ i + 1 } " )
446444 ElementTree .SubElement (file_ref , "name" ).text = context .video_stream .name
447- # TODO: Turn this into absolute path, see TODO in the FCPX function for details.
448- path = context . video_stream . path
445+ path = Path ( context . video_stream . path ). absolute ()
446+ # TODO: Can we just use path.as_uri() here?
449447 ElementTree .SubElement (file_ref , "pathurl" ).text = f"file://{ path } "
450448
451449 media_ref = ElementTree .SubElement (file_ref , "media" )
You can’t perform that action at this time.
0 commit comments