errors['junk_hash'] = junk_sha.hexdigest() if spurious_tag_frames: errors['spurious_tag_frames'] = spurious_tag_frames self.errors = errors self.sound = dict( samples=samples, total_frame_sizes=total_frame_sizes, sample_rate=samplerate, hash=mp3_sha.hexdigest(), declared_bitrates=declared_bitrates, total_frames=total_frames, ) if samplerate is not None and not inconsistent_sample_rate: duration = samples / float(samplerate) self.sound['duration'] = duration self.sound['bitrate'] = int(round(8 * total_frame_sizes / duration)) def _id3v1tagreader(self, block): self.id3v1data = id3v1tagreader(block) def _id3_frame_processor(self, frame): self.id3v2data = process_id3v2_frame(frame) register_provider(Mp3DirmetadataProvider)
from dirmetadata import DirMetaDataProvider, register_provider class DummyDirmetadataProvider(DirMetaDataProvider): category_name = "dummy" def readers(self): return [] def data(self): return {} register_provider(DummyDirmetadataProvider)