]> git.parisson.com Git - teleforma.git/commitdiff
Handling now v7.30 file format pb-docker-dev
authorGael Le Mignot <gael@pilotsystems.net>
Tue, 20 Oct 2026 09:18:08 +0000 (11:18 +0200)
committerGael Le Mignot <gael@pilotsystems.net>
Tue, 20 Oct 2026 09:18:08 +0000 (11:18 +0200)
teleforma/utils/kdenlive.py

index d20ae640b542091a6f9f83b41219a5f51d6ef01c..46ac8f2bf9069bdfb98ef17c49aa3636a6808798 100644 (file)
@@ -147,17 +147,18 @@ class KDEnLiveSession(object):
 
     def get_producer_altids(self):
         """
-        Get the alternate ids of producers if any
+        Get the alternate ids of producers / chains if any
         """
         by_names = defaultdict(list)
         for attr in self.session['children']:
-            if 'producer' in self.get_name(attr) and 'children' in attr:
+            name = self.get_name(attr)
+            if ('producer' in name or 'chain' in name) and 'children' in attr:
                 if "id" in attr['attributes']:
                     entry_id = attr['attributes']['id']
                     for att in attr['children']:
                         name = self.get_name(att['attributes'])
                         if 'resource' in name and 'cdata' in att:
-                            by_names[att['cdata']].append(entry_id)
+                            by_names[att['cdata']].append(entry_id)                
 
         alt_ids = {}
         for vals in by_names.values():
@@ -213,7 +214,8 @@ class KDEnLiveSession(object):
                     return rel_time            
 
         for attr in self.session['children']:
-            if 'playlist' in self.get_name(attr) and 'children' in attr:
+            name = self.get_name(attr)
+            if 'playlist' in name and 'children' in attr:
                 # Old v 6.4 file format, markers in playlist
                 for att in attr['children']:
                     if 'name' in att['attributes']:
@@ -228,8 +230,9 @@ class KDEnLiveSession(object):
                             if rel_time is not None:
                                 #print(comment, entry_id, marker_time, rel_time)
                                 add_marker(rel_time, comment)
-            elif 'producer' in self.get_name(attr) and 'children' in attr:
+            elif ('producer' in name or 'chain' in name) and 'children' in attr:
                 # New v 6.24 file format, markers in producers
+                # Also new v 7.30 file format, markers in chains
                 if "id" in attr['attributes']:
                     entry_id = attr['attributes']['id']
                     alt_ids = alternate_ids.get(entry_id, [])