From 0952337a474073113a7ceb44b3e458bd395f8d7c Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Tue, 7 Nov 2023 15:47:27 -0800 Subject: [PATCH] Removed UMID parsing for now --- wavinfo/umid_parser.py | 26 +++++++++++++------------- wavinfo/wave_bext_reader.py | 13 +++++++------ 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/wavinfo/umid_parser.py b/wavinfo/umid_parser.py index fcbddda..b6e67ab 100644 --- a/wavinfo/umid_parser.py +++ b/wavinfo/umid_parser.py @@ -1,18 +1,18 @@ -from functools import reduce +# from functools import reduce -def binary_to_string(binary_value): - return reduce(lambda val, el: val + "{:02x}".format(el), binary_value, '') +# def binary_to_string(binary_value): +# return reduce(lambda val, el: val + "{:02x}".format(el), binary_value, '') -class UMIDParser: - """ - Parse a raw binary SMPTE 330M Universal Materials Identifier - - This implementation is based on SMPTE ST 330:2011 - """ - def __init__(self, raw_umid: bytes): - self.raw_umid = raw_umid +# class UMIDParser: +# """ +# Parse a raw binary SMPTE 330M Universal Materials Identifier +# +# This implementation is based on SMPTE ST 330:2011 +# """ +# def __init__(self, raw_umid: bytes): +# self.raw_umid = raw_umid # # @property # def universal_label(self) -> bytearray: @@ -22,8 +22,8 @@ class UMIDParser: # def basic_umid(self): # return self.raw_umid[0:32] - def basic_umid_to_str(self): - return binary_to_string(self.raw_umid[0:32]) + # def basic_umid_to_str(self): + # return binary_to_string(self.raw_umid[0:32]) # # @property # def universal_label_is_valid(self) -> bool: diff --git a/wavinfo/wave_bext_reader.py b/wavinfo/wave_bext_reader.py index 0f89a83..d0a1f3c 100644 --- a/wavinfo/wave_bext_reader.py +++ b/wavinfo/wave_bext_reader.py @@ -1,5 +1,5 @@ import struct -from .umid_parser import UMIDParser +# from .umid_parser import UMIDParser from typing import Optional @@ -80,11 +80,12 @@ class WavBextReader: self.max_shortterm_loudness = unpacked[12] / 100.0 def to_dict(self): - if self.umid is not None: - umid_parsed = UMIDParser(self.umid) - umid_str = umid_parsed.basic_umid_to_str() - else: - umid_str = None + # if self.umid is not None: + # umid_parsed = UMIDParser(self.umid) + # umid_str = umid_parsed.basic_umid_to_str() + # else: + + umid_str = None return {'description': self.description, 'originator': self.originator,