fix: correct command part counts in read_commands

This commit is contained in:
Emmanuel BENOîT 2025-04-06 16:59:27 +02:00
parent 9a57fc40b7
commit 5b2c6c8259
Signed by: Emmanuel BENOîT
SSH key fingerprint: SHA256:l7PFUUF5TCDsvYeQC9OnTNz08dFY7Fvf4Hv3neIqYpg

View file

@ -40,7 +40,7 @@ class SRTMerger:
continue
command = parts[0].upper()
if command == 'COPY':
if len(parts) != 4:
if len(parts) != 3:
continue
try:
source = int(parts[1])
@ -53,7 +53,7 @@ class SRTMerger:
continue
commands.append(('COPY', source, start, end))
elif command == 'MAP':
if len(parts) != 6:
if len(parts) != 5:
continue
try:
text_source = int(parts[1])
@ -68,7 +68,7 @@ class SRTMerger:
continue
commands.append(('MAP', text_source, text_start, time_start, count))
elif command == 'SYNC':
if len(parts) != 5:
if len(parts) != 4:
continue
try:
text_source = int(parts[1])