From b7f48c7521e4b486416dde35976b9487b8338c28 Mon Sep 17 00:00:00 2001 From: Gael Le Mignot Date: Tue, 20 Oct 2026 11:18:08 +0200 Subject: [PATCH] Handling now v7.30 file format --- teleforma/utils/kdenlive.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/teleforma/utils/kdenlive.py b/teleforma/utils/kdenlive.py index d20ae640..46ac8f2b 100644 --- a/teleforma/utils/kdenlive.py +++ b/teleforma/utils/kdenlive.py @@ -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, []) -- 2.47.3