mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2025-12-31 08:50:48 +00:00
Fixed parser logic to handle new-style marker tracks
This commit is contained in:
@@ -81,10 +81,12 @@ protools_text_export_grammar = Grammar(
|
|||||||
"TIME REFERENCE " fs
|
"TIME REFERENCE " fs
|
||||||
"UNITS " fs
|
"UNITS " fs
|
||||||
"NAME " fs
|
"NAME " fs
|
||||||
|
("TRACK NAME " fs
|
||||||
|
"TRACK TYPE " fs)?
|
||||||
"COMMENTS" rs
|
"COMMENTS" rs
|
||||||
|
|
||||||
marker_record = integer_value isp fs string_value fs integer_value isp fs
|
marker_record = integer_value isp fs string_value fs integer_value isp fs
|
||||||
string_value fs string_value fs string_value rs
|
string_value fs string_value fs (string_value fs string_value fs)? string_value rs
|
||||||
|
|
||||||
fs = "\t"
|
fs = "\t"
|
||||||
rs = "\n"
|
rs = "\n"
|
||||||
@@ -241,12 +243,15 @@ class DocParserVisitor(NodeVisitor):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def visit_marker_record(_, visited_children):
|
def visit_marker_record(_, visited_children):
|
||||||
|
if isinstance(visited_children[12], list):
|
||||||
|
pass
|
||||||
|
|
||||||
return MarkerDescriptor(number=visited_children[0],
|
return MarkerDescriptor(number=visited_children[0],
|
||||||
location=visited_children[3],
|
location=visited_children[3],
|
||||||
time_reference=visited_children[5],
|
time_reference=visited_children[5],
|
||||||
units=visited_children[8],
|
units=visited_children[8],
|
||||||
name=visited_children[10],
|
name=visited_children[10],
|
||||||
comments=visited_children[12])
|
comments=visited_children[13])
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def visit_formatted_clip_name(_, visited_children):
|
def visit_formatted_clip_name(_, visited_children):
|
||||||
|
|||||||
Reference in New Issue
Block a user