Merge remote-tracking branch 'origin/master' into upload_rom_and_custom_artwork

This commit is contained in:
zurdi
2023-09-03 20:43:36 +02:00
2 changed files with 10 additions and 1 deletions

View File

@@ -7,6 +7,8 @@
<a href="https://hub.docker.com/r/zurdi15/romm">
<img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/zurdi15/romm?style=flat-square">
<img alt="Docker Image Size (latest by date)" src="https://img.shields.io/docker/image-size/zurdi15/romm?style=flat-square">
<a href="https://discord.gg/P5HtHnhUDH">
<img alt="Discord" src="https://img.shields.io/discord/1138838206532554853?logo=discord&style=flat-square&label=discord">
</div>
<br>
<div align="center">

View File

@@ -81,7 +81,14 @@ class IGDBHandler:
""",
)
return pydash.get(roms, "[0]", {})
exact_matches = [
rom
for rom in roms
if rom["name"].lower() == search_term.lower()
or rom["slug"].lower() == search_term.lower()
]
return pydash.get(exact_matches or roms, "[0]", {})
@staticmethod
def _normalize_cover_url(url: str) -> str: