i think most of this works lole

This commit is contained in:
2025-04-24 23:34:13 -04:00
parent 210a033695
commit 56ba750aad
50 changed files with 154001 additions and 2606 deletions

View File

@ -93,8 +93,10 @@ class MTGJSONService(BaseExternalService):
subdir="identifiers"
)
with open(file_record.path, 'r') as f:
logger.debug(f"Loaded identifiers from MTGJSON: {file_record.path}")
json_file = await self._unzip_file(file_record, "identifiers", db)
with open(json_file.path, 'r') as f:
logger.debug(f"Loaded identifiers from MTGJSON: {json_file.path}")
return json.load(f)
async def get_skus(self, db: Session, use_cache: bool = True) -> Dict[str, Any]:
@ -115,8 +117,10 @@ class MTGJSONService(BaseExternalService):
subdir="skus"
)
with open(file_record.path, 'r') as f:
logger.debug(f"Loaded SKUs from MTGJSON: {file_record.path}")
json_file = await self._unzip_file(file_record, "skus", db)
with open(json_file.path, 'r') as f:
logger.debug(f"Loaded SKUs from MTGJSON: {json_file.path}")
return json.load(f)
async def clear_cache(self, db: Session) -> None: