From 3071bad007802be1e6e1020dc4300983f736feb0 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Wed, 8 Nov 2023 21:34:55 -0800 Subject: [PATCH] de-reddening --- wavinfo/wave_reader.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wavinfo/wave_reader.py b/wavinfo/wave_reader.py index e2682a4..6760e50 100644 --- a/wavinfo/wave_reader.py +++ b/wavinfo/wave_reader.py @@ -193,9 +193,12 @@ class WavInfoReader: ltxts = [] notes = [] if adtl is not None: - labls = [c for c in adtl.children if c.ident == b'labl'] - ltxts = [c for c in adtl.children if c.ident == b'ltxt'] - notes = [c for c in adtl.children if c.ident == b'note'] + labls = [c for c in adtl.children + if type(c) is ChunkDescriptor and c.ident == b'labl'] + ltxts = [c for c in adtl.children + if type(c) is ChunkDescriptor and c.ident == b'ltxt'] + notes = [c for c in adtl.children + if type(c) is ChunkDescriptor and c.ident == b'note'] return WavCuesReader.read_all(f, cue, labls, ltxts, notes, fallback_encoding=self.info_encoding)