Commit Graph

3 Commits

Author SHA1 Message Date
Michael Manganiello
d62a8b4f8b misc: Add more IGDB typehints
Add more typehints for IGDB entities, including `GameTimeToBeat`.
2024-11-18 17:51:40 -03:00
Michael Manganiello
4bb5cb5149 misc: Initial addition of IGDB typehints
The short-term goal is to completely typehint the IGDB API responses. This
first change adds the base structures and enums RomM currently uses.

The `ExpandableField` type will allow us to model the expansion
mechanism the IGDB API provides, where a field can include either an ID,
or the full nested structure.
2024-10-27 00:02:01 -03:00
Michael Manganiello
a82489a9c4 feat: Add RAHasher and util to calculate RetroAchievements hashes
Build and include the `RAHasher` binary in the Docker image, to
calculate hashes for RetroAchievements. Also, add a service to
run `RAHasher` from Python.

Example usage:

```python
from adapters.services.rahasher import RAHasherError, RAHasherService

rahasher = RAHasherService()
try:
    hash = await rahasher.calculate_hash("nes", Path("path/to/rom.nes"))
except RAHasherError:
    # Handle error
    hash = None
```
2024-09-22 23:40:25 -03:00