Check if any blank blocks are present and warn the user if so

This commit is contained in:
Queen Vinyl Da.i'gyu-Kazotetsu committed 2024-05-28 06:41:05 -07:00
1 parent ca83aec1e9
commit be70dd0f0d
1 file changed
+5
+5
View File
@@ -87,6 +87,11 @@ class Tag():
self.filename = filename
self.blocks = list(data[0+i:BYTES_PER_BLOCK+i] for i in range(0, len(data), BYTES_PER_BLOCK))
# Check for blank blocks
for bi in IMPORTANT_BLOCKS:
if self.blocks[bi] == b'\x00' * BYTES_PER_BLOCK:
print(f"Warning! Block {bi} is blank!")
# Parse the data
self.data = {
"uid": bytes_to_hex(self.blocks[0][0:4]),