Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions backend/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ def _get_env(var: str, fallback: str | None = None) -> str | None:

# PLAYMATCH
PLAYMATCH_API_ENABLED: Final[bool] = safe_str_to_bool(_get_env("PLAYMATCH_API_ENABLED"))
# Base URL of the Playmatch API, overridable to point at a self-hosted instance.
PLAYMATCH_API_URL: Final[str] = _get_env(
"PLAYMATCH_API_URL", "https://playmatch.retrorealm.dev/api/v2"
).rstrip("/")
Comment thread
gantoine marked this conversation as resolved.

# HASHEOUS
HASHEOUS_API_ENABLED: Final[bool] = safe_str_to_bool(_get_env("HASHEOUS_API_ENABLED"))
Expand Down
4 changes: 2 additions & 2 deletions backend/handler/metadata/playmatch_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import yarl
from fastapi import HTTPException, status

from config import PLAYMATCH_API_ENABLED
from config import PLAYMATCH_API_ENABLED, PLAYMATCH_API_URL
from handler.metadata.base_handler import MetadataHandler
from logger.logger import log
from models.rom import Rom, RomFile
Expand Down Expand Up @@ -104,7 +104,7 @@ class PlaymatchHandler(MetadataHandler):
"""

def __init__(self):
self.base_url = "https://playmatch.retrorealm.dev/api/v2"
self.base_url = PLAYMATCH_API_URL
self.identify_url = f"{self.base_url}/identify/ids"
self.healthcheck_url = f"{self.base_url}/health"
self.suggestion_url = f"{self.base_url}/suggestion/external/game"
Expand Down
1 change: 1 addition & 0 deletions env.template
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ STEAMGRIDDB_API_KEY= # SteamGridDB secret API key
RETROACHIEVEMENTS_API_KEY= # RetroAchievements secret API key
REFRESH_RETROACHIEVEMENTS_CACHE_DAYS=30 # RetroAchievements metadata cache refresh interval in days
PLAYMATCH_API_ENABLED=false # Enable PlayMatch API integration
# PLAYMATCH_API_URL=https://playmatch.retrorealm.dev/api/v2 # Point at a self-hosted PlayMatch instance
LAUNCHBOX_API_ENABLED=false # Enable LaunchBox API integration
HASHEOUS_API_ENABLED=false # Enable Hasheous API integration
FLASHPOINT_API_ENABLED=false # Enable Flashpoint API integration
Expand Down
Loading