mirror of
https://github.com/rommapp/romm.git
synced 2026-12-05 05:07:31 +01:00
Merge pull request #26 from zurdi15/feature/fetching_order
Feature/fetching order
This commit is contained in:
@@ -3,6 +3,7 @@ RomM v1.2
|
||||
- SQLite support added
|
||||
- SQLite is now the database by default if ROMM_DB_DRIVER is not set
|
||||
- Dreamcast support added (https://github.com/zurdi15/romm#platforms-support)
|
||||
- Platforms and games are now shown by alphabetical order
|
||||
|
||||
RomM v1.1
|
||||
-----------------------
|
||||
|
||||
@@ -36,7 +36,7 @@ class DBHandler:
|
||||
def get_platforms(self) -> list[Platform]:
|
||||
try:
|
||||
with Session.begin() as session:
|
||||
return session.scalars(select(Platform)).all()
|
||||
return session.scalars(select(Platform).order_by(Platform.slug.asc())).all()
|
||||
except ProgrammingError as e:
|
||||
raise HTTPException(status_code=404, detail=f"Platforms table not found: {e}")
|
||||
|
||||
@@ -51,7 +51,7 @@ class DBHandler:
|
||||
|
||||
def get_roms(self, p_slug: str) -> list[Rom]:
|
||||
with Session.begin() as session:
|
||||
return session.scalars(select(Rom).filter_by(p_slug=p_slug)).all()
|
||||
return session.scalars(select(Rom).filter_by(p_slug=p_slug).order_by(Rom.filename.asc())).all()
|
||||
|
||||
|
||||
def get_rom(self, p_slug: str, filename: str) -> Rom:
|
||||
|
||||
Reference in New Issue
Block a user