mirror of
https://github.com/rommapp/romm.git
synced 2026-02-19 07:50:57 +01:00
When retrieving the related screenshot for a `Save` or `State`, we were retrieving a very heavy representation of the associated `Rom` object, only to iterate through its screenshots to find the one we needed. This change modifies the `Save` and `State` models to directly query the `Screenshot` model, which is much faster and more efficient. The `DBScreenshotsHandler` has been updated to include a new `filter` method that will simplify building queries using SQLAlchemy, something we can extend to other handlers in the future. Fixes #1925.