diff --git a/backend/endpoints/rom.py b/backend/endpoints/rom.py
index 7bc1886b6..a8064200f 100644
--- a/backend/endpoints/rom.py
+++ b/backend/endpoints/rom.py
@@ -148,6 +148,7 @@ def get_roms(
favourites_only: bool = False,
duplicates_only: bool = False,
playables_only: bool = False,
+ ra_only: bool = False,
group_by_meta_id: bool = False,
selected_genre: str | None = None,
selected_franchise: str | None = None,
@@ -173,6 +174,7 @@ def get_roms(
favourites_only (bool, optional): Filter only favourite roms. Defaults to False.
duplicates_only (bool, optional): Filter only duplicate roms. Defaults to False.
playables_only (bool, optional): Filter only playable roms by emulatorjs. Defaults to False.
+ ra_only (bool, optional): Filter only roms with Retroachievements compatibility.
group_by_meta_id (bool, optional): Group roms by igdb/moby/ssrf ID. Defaults to False.
selected_genre (str, optional): Filter by genre. Defaults to None.
selected_franchise (str, optional): Filter by franchise. Defaults to None.
@@ -207,6 +209,7 @@ def get_roms(
favourites_only=favourites_only,
duplicates_only=duplicates_only,
playables_only=playables_only,
+ ra_only=ra_only,
selected_genre=selected_genre,
selected_franchise=selected_franchise,
selected_collection=selected_collection,
diff --git a/backend/handler/database/roms_handler.py b/backend/handler/database/roms_handler.py
index 5881d09b5..c353f942c 100644
--- a/backend/handler/database/roms_handler.py
+++ b/backend/handler/database/roms_handler.py
@@ -224,6 +224,9 @@ class DBRomsHandler(DBBaseHandler):
Platform.slug.in_(EJS_SUPPORTED_PLATFORMS)
)
+ def filter_by_ra_only(self, query: Query):
+ return query.filter(Rom.ra_id.isnot(None))
+
def filter_by_genre(self, query: Query, selected_genre: str):
if ROMM_DB_DRIVER == "postgresql":
return query.filter(
@@ -349,6 +352,7 @@ class DBRomsHandler(DBBaseHandler):
favourites_only: bool = False,
duplicates_only: bool = False,
playables_only: bool = False,
+ ra_only: bool = False,
group_by_meta_id: bool = False,
selected_genre: str | None = None,
selected_franchise: str | None = None,
@@ -390,6 +394,9 @@ class DBRomsHandler(DBBaseHandler):
if playables_only:
query = self.filter_by_playables_only(query)
+ if ra_only:
+ query = self.filter_by_ra_only(query)
+
if group_by_meta_id:
def build_func(provider: str, column: InstrumentedAttribute):
diff --git a/frontend/src/components/Details/RetroAchievements.vue b/frontend/src/components/Details/RetroAchievements.vue
index d8bbbb739..d8ce7b0d4 100644
--- a/frontend/src/components/Details/RetroAchievements.vue
+++ b/frontend/src/components/Details/RetroAchievements.vue
@@ -1,11 +1,13 @@
+
+
+
+ mdi-trophy
+ {{ t("platform.show-ra") }}
+
+
+
diff --git a/frontend/src/locales/de_DE/platform.json b/frontend/src/locales/de_DE/platform.json
index 25c730863..ffe4e12fe 100644
--- a/frontend/src/locales/de_DE/platform.json
+++ b/frontend/src/locales/de_DE/platform.json
@@ -29,6 +29,7 @@
"show-matched": "Zeige zugewiesene",
"show-playables": "Zeige spielbare",
"show-unmatched": "Zeige unzugewiesene",
+ "show-ra": "Zeige Retroachievements",
"status": "Status",
"upload-roms": "Roms hochladen"
}
diff --git a/frontend/src/locales/en_GB/platform.json b/frontend/src/locales/en_GB/platform.json
index eeb1d35d4..5fe7fdec3 100644
--- a/frontend/src/locales/en_GB/platform.json
+++ b/frontend/src/locales/en_GB/platform.json
@@ -29,6 +29,7 @@
"show-matched": "Show Matched",
"show-unmatched": "Show unmatched",
"show-playables": "Show playables",
+ "show-ra": "Show Retroachievements",
"status": "Status",
"upload-roms": "Upload Roms"
}
diff --git a/frontend/src/locales/en_US/platform.json b/frontend/src/locales/en_US/platform.json
index eeb1d35d4..5fe7fdec3 100644
--- a/frontend/src/locales/en_US/platform.json
+++ b/frontend/src/locales/en_US/platform.json
@@ -29,6 +29,7 @@
"show-matched": "Show Matched",
"show-unmatched": "Show unmatched",
"show-playables": "Show playables",
+ "show-ra": "Show Retroachievements",
"status": "Status",
"upload-roms": "Upload Roms"
}
diff --git a/frontend/src/locales/es_ES/platform.json b/frontend/src/locales/es_ES/platform.json
index e02e1ff10..94e6038c8 100644
--- a/frontend/src/locales/es_ES/platform.json
+++ b/frontend/src/locales/es_ES/platform.json
@@ -27,8 +27,9 @@
"show-favourites": "Mostrar favoritos",
"show-firmwares": "Mostrar firmwares/BIOS",
"show-matched": "Mostrar identificados",
- "show-playables": "Mostrar jugables",
"show-unmatched": "Mostrar no identificados",
+ "show-playables": "Mostrar jugables",
+ "show-ra": "Mostrar Retroachievements",
"status": "Estado",
"upload-roms": "Subir Roms"
}
diff --git a/frontend/src/locales/fr_FR/platform.json b/frontend/src/locales/fr_FR/platform.json
index d539ac614..88474b087 100644
--- a/frontend/src/locales/fr_FR/platform.json
+++ b/frontend/src/locales/fr_FR/platform.json
@@ -29,6 +29,7 @@
"show-matched": "Jeux identifiés",
"show-unmatched": "Jeux non identifiés",
"show-playables": "Afficher les jouables",
+ "show-ra": "Afficher les Retroachievements",
"status": "Statut",
"upload-roms": "Télécharger des ROMs"
}
diff --git a/frontend/src/locales/it_IT/platform.json b/frontend/src/locales/it_IT/platform.json
index 0ede38d3c..61ee6b2ab 100644
--- a/frontend/src/locales/it_IT/platform.json
+++ b/frontend/src/locales/it_IT/platform.json
@@ -31,6 +31,7 @@
"show-matched": "Mostra con corrispondenza",
"show-unmatched": "Mostra senza corrispondenza",
"show-playables": "Mostra giocabili",
+ "show-ra": "Mostra Retroachievements",
"status": "Stato",
"upload-roms": "Carica Rom"
}
diff --git a/frontend/src/locales/ja_JP/platform.json b/frontend/src/locales/ja_JP/platform.json
index 853a9d384..8276c6feb 100644
--- a/frontend/src/locales/ja_JP/platform.json
+++ b/frontend/src/locales/ja_JP/platform.json
@@ -29,6 +29,7 @@
"show-matched": "該当を表示",
"show-unmatched": "非該当を表示",
"show-playables": "プレイ可能を表示",
+ "show-ra": "Retroachievementsを表示",
"status": "ステータス",
"upload-roms": "Romをアップロード"
}
diff --git a/frontend/src/locales/ko_KR/platform.json b/frontend/src/locales/ko_KR/platform.json
index 10c446ee8..46a59f717 100644
--- a/frontend/src/locales/ko_KR/platform.json
+++ b/frontend/src/locales/ko_KR/platform.json
@@ -29,6 +29,7 @@
"show-matched": "DB 대응 됨",
"show-unmatched": "DB 대응 안됨",
"show-playables": "플레이 가능한 게임 보기",
+ "show-ra": "Retroachievements 보기",
"status": "플레이 상태",
"upload-roms": "롬 업로드"
}
diff --git a/frontend/src/locales/pt_BR/platform.json b/frontend/src/locales/pt_BR/platform.json
index 98641ba0c..5d486c5a1 100644
--- a/frontend/src/locales/pt_BR/platform.json
+++ b/frontend/src/locales/pt_BR/platform.json
@@ -29,6 +29,7 @@
"show-matched": "Mostrar correspondentes",
"show-unmatched": "Mostrar não correspondentes",
"show-playables": "Mostrar jogáveis",
+ "show-ra": "Mostrar Retroachievements",
"status": "Status",
"upload-roms": "Carregar ROMs"
}
diff --git a/frontend/src/locales/ro_RO/platform.json b/frontend/src/locales/ro_RO/platform.json
index d5018d9d8..821868f4f 100644
--- a/frontend/src/locales/ro_RO/platform.json
+++ b/frontend/src/locales/ro_RO/platform.json
@@ -31,6 +31,7 @@
"show-matched": "Jocuri identificate",
"show-unmatched": "Jocuri neidentificate",
"show-playables": "Afișează jocuri jucabile",
+ "show-ra": "Afișează Retroachievements",
"status": "Stare",
"upload-roms": "Încărcare ROM-uri"
}
diff --git a/frontend/src/locales/ru_RU/platform.json b/frontend/src/locales/ru_RU/platform.json
index a9f38f313..11de428f6 100644
--- a/frontend/src/locales/ru_RU/platform.json
+++ b/frontend/src/locales/ru_RU/platform.json
@@ -29,6 +29,7 @@
"show-matched": "Показать соответствующие",
"show-unmatched": "Показать несоответствующие",
"show-playables": "Показать доступные",
+ "show-ra": "Показать Retroachievements",
"status": "Статус",
"upload-roms": "Загрузить ромы"
}
diff --git a/frontend/src/locales/zh_CN/platform.json b/frontend/src/locales/zh_CN/platform.json
index 5b711dc61..e07e38bca 100644
--- a/frontend/src/locales/zh_CN/platform.json
+++ b/frontend/src/locales/zh_CN/platform.json
@@ -29,6 +29,7 @@
"show-matched": "显示匹配项",
"show-unmatched": "显示不匹配项",
"show-playables": "显示可玩",
+ "show-ra": "显示 Retroachievements",
"status": "状态",
"upload-roms": "上传 Roms"
}
diff --git a/frontend/src/services/api/rom.ts b/frontend/src/services/api/rom.ts
index 0c64a2059..e38e0cb49 100644
--- a/frontend/src/services/api/rom.ts
+++ b/frontend/src/services/api/rom.ts
@@ -72,6 +72,7 @@ export interface GetRomsParams {
filterFavourites?: boolean;
filterDuplicates?: boolean;
filterPlayables?: boolean;
+ filterRA?: boolean;
groupByMetaId?: boolean;
selectedGenre?: string | null;
selectedFranchise?: string | null;
@@ -97,6 +98,7 @@ async function getRoms({
filterFavourites = false,
filterDuplicates = false,
filterPlayables = false,
+ filterRA = false,
groupByMetaId = false,
selectedGenre = null,
selectedFranchise = null,
@@ -122,6 +124,7 @@ async function getRoms({
favourites_only: filterFavourites,
duplicates_only: filterDuplicates,
playables_only: filterPlayables,
+ ra_only: filterRA,
group_by_meta_id: groupByMetaId,
selected_genre: selectedGenre,
selected_franchise: selectedFranchise,
diff --git a/frontend/src/stores/galleryFilter.ts b/frontend/src/stores/galleryFilter.ts
index 5742e64dd..0a496b460 100644
--- a/frontend/src/stores/galleryFilter.ts
+++ b/frontend/src/stores/galleryFilter.ts
@@ -31,6 +31,7 @@ const defaultFilterState = {
filterFavourites: false,
filterDuplicates: false,
filterPlayables: false,
+ filterRA: false,
selectedPlatform: null as Platform | null,
selectedGenre: null as string | null,
selectedFranchise: null as string | null,
@@ -134,6 +135,12 @@ export default defineStore("galleryFilter", {
disableFilterPlayables() {
this.filterPlayables = false;
},
+ switchFilterRA() {
+ this.filterRA = !this.filterRA;
+ },
+ disableFilterRA() {
+ this.filterRA = false;
+ },
isFiltered() {
return Boolean(
this.filterUnmatched ||
@@ -141,6 +148,7 @@ export default defineStore("galleryFilter", {
this.filterFavourites ||
this.filterDuplicates ||
this.filterPlayables ||
+ this.filterRA ||
this.selectedPlatform ||
this.selectedGenre ||
this.selectedFranchise ||
@@ -168,6 +176,7 @@ export default defineStore("galleryFilter", {
this.disableFilterFavourites();
this.disableFilterDuplicates();
this.disableFilterPlayables();
+ this.disableFilterRA();
},
},
});
diff --git a/poetry.lock b/poetry.lock
index d56d905af..bbfd0f9b1 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -667,6 +667,7 @@ description = "FastAPI pagination"
optional = false
python-versions = "<4.0,>=3.8"
groups = ["main"]
+markers = "platform_python_implementation == \"PyPy\""
files = [
{file = "fastapi_pagination-0.12.34-py3-none-any.whl", hash = "sha256:089d1078aae1784395b4dbd923d0c8246641ddcc291c5ec6d92a30edb92ecbdd"},
{file = "fastapi_pagination-0.12.34.tar.gz", hash = "sha256:05ee8c0bc572072160f7f30900bfd87869e1880c87bc5797922fec2e49e65f11"},
@@ -3491,24 +3492,25 @@ syntax = ["tree-sitter (>=0.23.0)", "tree-sitter-bash (>=0.23.0)", "tree-sitter-
[[package]]
name = "tornado"
-version = "6.4.2"
+version = "6.5.1"
description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed."
optional = true
-python-versions = ">=3.8"
+python-versions = ">=3.9"
groups = ["main"]
markers = "extra == \"dev\""
files = [
- {file = "tornado-6.4.2-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:e828cce1123e9e44ae2a50a9de3055497ab1d0aeb440c5ac23064d9e44880da1"},
- {file = "tornado-6.4.2-cp38-abi3-macosx_10_9_x86_64.whl", hash = "sha256:072ce12ada169c5b00b7d92a99ba089447ccc993ea2143c9ede887e0937aa803"},
- {file = "tornado-6.4.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a017d239bd1bb0919f72af256a970624241f070496635784d9bf0db640d3fec"},
- {file = "tornado-6.4.2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c36e62ce8f63409301537222faffcef7dfc5284f27eec227389f2ad11b09d946"},
- {file = "tornado-6.4.2-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bca9eb02196e789c9cb5c3c7c0f04fb447dc2adffd95265b2c7223a8a615ccbf"},
- {file = "tornado-6.4.2-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:304463bd0772442ff4d0f5149c6f1c2135a1fae045adf070821c6cdc76980634"},
- {file = "tornado-6.4.2-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:c82c46813ba483a385ab2a99caeaedf92585a1f90defb5693351fa7e4ea0bf73"},
- {file = "tornado-6.4.2-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:932d195ca9015956fa502c6b56af9eb06106140d844a335590c1ec7f5277d10c"},
- {file = "tornado-6.4.2-cp38-abi3-win32.whl", hash = "sha256:2876cef82e6c5978fde1e0d5b1f919d756968d5b4282418f3146b79b58556482"},
- {file = "tornado-6.4.2-cp38-abi3-win_amd64.whl", hash = "sha256:908b71bf3ff37d81073356a5fadcc660eb10c1476ee6e2725588626ce7e5ca38"},
- {file = "tornado-6.4.2.tar.gz", hash = "sha256:92bad5b4746e9879fd7bf1eb21dce4e3fc5128d71601f80005afa39237ad620b"},
+ {file = "tornado-6.5.1-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:d50065ba7fd11d3bd41bcad0825227cc9a95154bad83239357094c36708001f7"},
+ {file = "tornado-6.5.1-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:9e9ca370f717997cb85606d074b0e5b247282cf5e2e1611568b8821afe0342d6"},
+ {file = "tornado-6.5.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b77e9dfa7ed69754a54c89d82ef746398be82f749df69c4d3abe75c4d1ff4888"},
+ {file = "tornado-6.5.1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:253b76040ee3bab8bcf7ba9feb136436a3787208717a1fb9f2c16b744fba7331"},
+ {file = "tornado-6.5.1-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:308473f4cc5a76227157cdf904de33ac268af770b2c5f05ca6c1161d82fdd95e"},
+ {file = "tornado-6.5.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:caec6314ce8a81cf69bd89909f4b633b9f523834dc1a352021775d45e51d9401"},
+ {file = "tornado-6.5.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:13ce6e3396c24e2808774741331638ee6c2f50b114b97a55c5b442df65fd9692"},
+ {file = "tornado-6.5.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:5cae6145f4cdf5ab24744526cc0f55a17d76f02c98f4cff9daa08ae9a217448a"},
+ {file = "tornado-6.5.1-cp39-abi3-win32.whl", hash = "sha256:e0a36e1bc684dca10b1aa75a31df8bdfed656831489bc1e6a6ebed05dc1ec365"},
+ {file = "tornado-6.5.1-cp39-abi3-win_amd64.whl", hash = "sha256:908e7d64567cecd4c2b458075589a775063453aeb1d2a1853eedb806922f568b"},
+ {file = "tornado-6.5.1-cp39-abi3-win_arm64.whl", hash = "sha256:02420a0eb7bf617257b9935e2b754d1b63897525d8a289c9d65690d580b4dcf7"},
+ {file = "tornado-6.5.1.tar.gz", hash = "sha256:84ceece391e8eb9b2b95578db65e920d2a61070260594819589609ba9bc6308c"},
]
[[package]]
@@ -3676,6 +3678,24 @@ files = [
{file = "Unidecode-1.3.8.tar.gz", hash = "sha256:cfdb349d46ed3873ece4586b96aa75258726e2fa8ec21d6f00a591d98806c2f4"},
]
+[[package]]
+name = "urllib3"
+version = "1.26.20"
+description = "HTTP library with thread-safe connection pooling, file post, and more."
+optional = false
+python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7"
+groups = ["main"]
+markers = "platform_python_implementation == \"PyPy\""
+files = [
+ {file = "urllib3-1.26.20-py2.py3-none-any.whl", hash = "sha256:0ed14ccfbf1c30a9072c7ca157e4319b70d65f623e91e7b32fadb2853431016e"},
+ {file = "urllib3-1.26.20.tar.gz", hash = "sha256:40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32"},
+]
+
+[package.extras]
+brotli = ["brotli (==1.0.9) ; os_name != \"nt\" and python_version < \"3\" and platform_python_implementation == \"CPython\"", "brotli (>=1.0.9) ; python_version >= \"3\" and platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; (os_name != \"nt\" or python_version >= \"3\") and platform_python_implementation != \"CPython\"", "brotlipy (>=0.6.0) ; os_name == \"nt\" and python_version < \"3\""]
+secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress ; python_version == \"2.7\"", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"]
+socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
+
[[package]]
name = "urllib3"
version = "2.3.0"
@@ -3683,6 +3703,7 @@ description = "HTTP library with thread-safe connection pooling, file post, and
optional = false
python-versions = ">=3.9"
groups = ["main"]
+markers = "platform_python_implementation != \"PyPy\""
files = [
{file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"},
{file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"},
@@ -3713,24 +3734,6 @@ h11 = ">=0.8"
[package.extras]
standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"]
-[[package]]
-name = "vcrpy"
-version = "5.1.0"
-description = "Automatically mock your HTTP interactions to simplify and speed up testing"
-optional = true
-python-versions = ">=3.8"
-groups = ["main"]
-markers = "platform_python_implementation == \"PyPy\" and extra == \"test\""
-files = [
- {file = "vcrpy-5.1.0-py2.py3-none-any.whl", hash = "sha256:605e7b7a63dcd940db1df3ab2697ca7faf0e835c0852882142bafb19649d599e"},
- {file = "vcrpy-5.1.0.tar.gz", hash = "sha256:bbf1532f2618a04f11bce2a99af3a9647a32c880957293ff91e0a5f187b6b3d2"},
-]
-
-[package.dependencies]
-PyYAML = "*"
-wrapt = "*"
-yarl = "*"
-
[[package]]
name = "vcrpy"
version = "7.0.0"
@@ -3738,7 +3741,7 @@ description = "Automatically mock your HTTP interactions to simplify and speed u
optional = true
python-versions = ">=3.9"
groups = ["main"]
-markers = "platform_python_implementation != \"PyPy\" and extra == \"test\""
+markers = "platform_python_implementation == \"PyPy\" and extra == \"test\""
files = [
{file = "vcrpy-7.0.0-py2.py3-none-any.whl", hash = "sha256:55791e26c18daa363435054d8b35bd41a4ac441b6676167635d1b37a71dbe124"},
{file = "vcrpy-7.0.0.tar.gz", hash = "sha256:176391ad0425edde1680c5b20738ea3dc7fb942520a48d2993448050986b3a50"},
@@ -3746,7 +3749,10 @@ files = [
[package.dependencies]
PyYAML = "*"
-urllib3 = {version = "*", markers = "platform_python_implementation != \"PyPy\" and python_version >= \"3.10\""}
+urllib3 = [
+ {version = "<2", markers = "platform_python_implementation == \"PyPy\""},
+ {version = "*", markers = "platform_python_implementation != \"PyPy\" and python_version >= \"3.10\""},
+]
wrapt = "*"
yarl = "*"