NickVerri commited on
Commit
02e595a
·
verified ·
1 Parent(s): 452e729

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -127,9 +127,9 @@ def generate_cmx_edl(edl_title, segments, source_name, fps=25):
127
  return "\n".join(edl_lines)
128
 
129
  def generate_xml(sequence_name, segments, source_name, fps=25):
130
- """Constructs a Clean XML with SINGLE Source for clean Bin import."""
131
 
132
- # 1. SHARED SOURCE ID (Crucial for Single Bin Item)
133
  unified_file_id = "unified-source-1"
134
 
135
  # FPS Logic
@@ -184,10 +184,10 @@ def generate_xml(sequence_name, segments, source_name, fps=25):
184
  lines.append(f'\t\t\t\t\t<in>{src_in_frames}</in>')
185
  lines.append(f'\t\t\t\t\t<out>{src_out_frames}</out>')
186
 
187
- # NOTE: NO <masterclipid> here. This prevents the "Reset to Start" bug.
188
-
189
  # --- UNIFIED FILE DEFINITION ---
190
- # We reuse the exact same file ID. This forces one bin item.
 
 
191
  lines.append(f'\t\t\t\t\t<file id="{unified_file_id}">')
192
  lines.append(f'\t\t\t\t\t\t<name>{source_name}</name>')
193
  lines.append(f'\t\t\t\t\t\t<rate><timebase>{timebase}</timebase></rate>')
@@ -198,7 +198,6 @@ def generate_xml(sequence_name, segments, source_name, fps=25):
198
  lines.append(f'\t\t\t\t\t\t\t<frame>0</frame>')
199
  lines.append(f'\t\t\t\t\t\t\t<displayformat>NDF</displayformat>')
200
  lines.append(f'\t\t\t\t\t\t</timecode>')
201
- lines.append(f'\t\t\t\t\t\t<reel><name>{source_name}</name></reel>')
202
  lines.append(f'\t\t\t\t\t\t<media>')
203
  lines.append(f'\t\t\t\t\t\t\t<video>')
204
  lines.append(f'\t\t\t\t\t\t\t\t<samplecharacteristics><width>1920</width><height>1080</height></samplecharacteristics>')
 
127
  return "\n".join(edl_lines)
128
 
129
  def generate_xml(sequence_name, segments, source_name, fps=25):
130
+ """Constructs a Robust XML with Unified Source and Clean Metadata."""
131
 
132
+ # SINGLE UNIFIED ID forces Premiere to make ONE offline clip in the bin.
133
  unified_file_id = "unified-source-1"
134
 
135
  # FPS Logic
 
184
  lines.append(f'\t\t\t\t\t<in>{src_in_frames}</in>')
185
  lines.append(f'\t\t\t\t\t<out>{src_out_frames}</out>')
186
 
 
 
187
  # --- UNIFIED FILE DEFINITION ---
188
+ # NO <masterclipid> (prevents reset bug)
189
+ # NO <reel> (prevents metadata conflict)
190
+ # CONSTANT ID (keeps bin clean)
191
  lines.append(f'\t\t\t\t\t<file id="{unified_file_id}">')
192
  lines.append(f'\t\t\t\t\t\t<name>{source_name}</name>')
193
  lines.append(f'\t\t\t\t\t\t<rate><timebase>{timebase}</timebase></rate>')
 
198
  lines.append(f'\t\t\t\t\t\t\t<frame>0</frame>')
199
  lines.append(f'\t\t\t\t\t\t\t<displayformat>NDF</displayformat>')
200
  lines.append(f'\t\t\t\t\t\t</timecode>')
 
201
  lines.append(f'\t\t\t\t\t\t<media>')
202
  lines.append(f'\t\t\t\t\t\t\t<video>')
203
  lines.append(f'\t\t\t\t\t\t\t\t<samplecharacteristics><width>1920</width><height>1080</height></samplecharacteristics>')