chore: initial Gitea migration with .gitignore

This commit is contained in:
nymiro
2026-06-03 18:36:28 +12:00
parent 837cd88ec9
commit 82c567f777
3 changed files with 24 additions and 16 deletions
+9
View File
@@ -0,0 +1,9 @@
__pycache__/
*.pyc
*.pyo
temp_libs/
test_output/
*.jpg
*.txt
dist/
*.egg-info/
+14 -15
View File
@@ -607,24 +607,23 @@ class HEICFile:
print("Info: No 'thmb' references found in 'iref' box.") print("Info: No 'thmb' references found in 'iref' box.")
return None return None
target_id = primary_id # Search all 'thmb' references to find which item points TO our primary_id.
if primary_id not in self._iref_box.references['thmb']: thumbnail_id = None
shifted_primary_id = primary_id << 16 for from_id, to_ids in self._iref_box.references['thmb'].items():
if shifted_primary_id not in self._iref_box.references['thmb']: if primary_id in to_ids:
print(f"Info: Primary item ID {primary_id} (or shifted) has no 'thmb' reference.") thumbnail_id = from_id
return None break
print("Info: Using shifted primary ID to find thumbnail.") # Also check shifted variant of primary_id
target_id = shifted_primary_id if (primary_id << 16) in to_ids:
thumbnail_id = from_id
break
thumbnail_ids = self._iref_box.references['thmb'][target_id]
if not thumbnail_ids: if thumbnail_id is None:
print(f"Info: Primary item ID {target_id} has 'thmb' reference, but no target IDs.") print(f"Info: No 'thmb' reference points to primary item ID {primary_id}.")
return None return None
thumbnail_id = thumbnail_ids[0] print(f"Found thumbnail reference: Thumbnail ID {thumbnail_id} -> Primary ID {primary_id}")
print(f"Found thumbnail reference: Primary ID {target_id} -> Thumbnail ID {thumbnail_id}")
thumbnail_data = self.get_item_data(thumbnail_id) thumbnail_data = self.get_item_data(thumbnail_id)
+1 -1
View File
@@ -619,7 +619,7 @@ class ItemReferenceBox(FullBox):
ref_box_type = ref_box.type ref_box_type = ref_box.type
self.references[ref_box_type] = {} self.references[ref_box_type] = {}
stream = ref_box.raw_data[4:] stream = ref_box.raw_data
pos = 0 pos = 0
if pos + item_id_size > len(stream): if pos + item_id_size > len(stream):