mirror of
https://github.com/rommapp/romm.git
synced 2026-12-05 05:07:31 +01:00
Merge pull request #318 from GAntoine/improved-scanning
Improved scanning and logs
This commit is contained in:
69
.github/workflows/pytest.yml
vendored
Normal file
69
.github/workflows/pytest.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
name: run pytest
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- "opened"
|
||||
- "synchronize"
|
||||
paths-ignore:
|
||||
- "docker/**"
|
||||
- "examples/*"
|
||||
- "frontend/**"
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
paths-ignore:
|
||||
- "docker/**"
|
||||
- "examples/*"
|
||||
- "frontend/**"
|
||||
|
||||
jobs:
|
||||
pytest:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
checks: write
|
||||
pull-requests: write
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:10.11
|
||||
ports:
|
||||
- 3306
|
||||
env:
|
||||
MYSQL_USER: romm_test
|
||||
MYSQL_PASSWORD: passwd
|
||||
MYSQL_DATABASE: romm_test
|
||||
MYSQL_ROOT_PASSWORD: passwd
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install mariadb connectors
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libmariadb3 libmariadb-dev
|
||||
- name: Install poetry
|
||||
run: pipx install poetry
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
cache: 'poetry'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry install --sync
|
||||
- name: Initiate database
|
||||
run: |
|
||||
mysql --host 127.0.0.1 --port ${{ job.services.mariadb.ports['3306'] }} -uroot -ppasswd -e "GRANT ALL PRIVILEGES ON romm_test.* TO 'romm_test'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;"
|
||||
- name: Run python tests
|
||||
env:
|
||||
DB_HOST: 127.0.0.1
|
||||
DB_PORT: ${{ job.services.mariadb.ports['3306'] }}
|
||||
run: |
|
||||
cd backend
|
||||
poetry run pytest -vv --maxfail=10 --junitxml=pytest-report.xml .
|
||||
- name: Publish test results
|
||||
uses: EnricoMi/publish-unit-test-result-action/composite@v2
|
||||
if: always()
|
||||
with:
|
||||
files: |
|
||||
backend/pytest-report.xml
|
||||
@@ -27,9 +27,9 @@ class ConfigLoader:
|
||||
@staticmethod
|
||||
def get_db_engine() -> str:
|
||||
if ROMM_DB_DRIVER == "mariadb":
|
||||
DB_HOST: str = os.environ.get("DB_HOST")
|
||||
DB_HOST: str = os.environ.get("DB_HOST", "127.0.0.1")
|
||||
try:
|
||||
DB_PORT: int = int(os.environ.get("DB_PORT"))
|
||||
DB_PORT: int = int(os.environ.get("DB_PORT", 3306))
|
||||
except TypeError:
|
||||
log.critical("DB_PORT variable not set properly")
|
||||
sys.exit(3)
|
||||
|
||||
@@ -7,9 +7,12 @@ from utils.exceptions import PlatformsNotFoundException, RomsNotFoundException
|
||||
from handler import dbh
|
||||
from models.platform import Platform
|
||||
from models.rom import Rom
|
||||
from handler.socket_manager import SocketManager
|
||||
|
||||
|
||||
async def scan(_sid: str, platforms: str, complete_rescan: bool = True, sm = None):
|
||||
async def scan(
|
||||
sm: SocketManager, _sid: str, platforms: str, complete_rescan: bool = True
|
||||
):
|
||||
"""Scan platforms and roms and write them in database."""
|
||||
|
||||
log.info(emoji.emojize(":magnifying_glass_tilted_right: Scanning "))
|
||||
@@ -27,20 +30,18 @@ async def scan(_sid: str, platforms: str, complete_rescan: bool = True, sm = Non
|
||||
)
|
||||
log.info(f"Platforms to be scanned: {', '.join(platforms)}")
|
||||
for platform in platforms:
|
||||
log.info(emoji.emojize(f":video_game: {platform}"))
|
||||
try:
|
||||
scanned_platform: Platform = fastapi.scan_platform(platform)
|
||||
except RomsNotFoundException as e:
|
||||
log.error(e)
|
||||
continue
|
||||
|
||||
await sm.emit(
|
||||
"scan:scanning_platform", [scanned_platform.name, scanned_platform.slug]
|
||||
"scan:scanning_platform",
|
||||
{"p_name": scanned_platform.name, "p_slug": scanned_platform.slug},
|
||||
ignore_queue=True,
|
||||
)
|
||||
await sm.emit("") # Workaround to emit in real-time
|
||||
if platform != str(scanned_platform):
|
||||
log.info(
|
||||
f"Identified as {scanned_platform}"
|
||||
)
|
||||
|
||||
dbh.add_platform(scanned_platform)
|
||||
|
||||
# Scanning roms
|
||||
@@ -49,17 +50,21 @@ async def scan(_sid: str, platforms: str, complete_rescan: bool = True, sm = Non
|
||||
rom_id: int = dbh.rom_exists(scanned_platform.slug, rom["file_name"])
|
||||
if rom_id and not complete_rescan:
|
||||
continue
|
||||
await sm.emit("scan:scanning_rom", rom["file_name"])
|
||||
await sm.emit("") # Workaround to emit in real-time
|
||||
log.info(f"\t - {rom['file_name']}")
|
||||
if rom["multi"]:
|
||||
[
|
||||
log.info(f"\t\t · {file}")
|
||||
for file in rom["files"]
|
||||
]
|
||||
|
||||
scanned_rom: Rom = fastapi.scan_rom(scanned_platform, rom)
|
||||
await sm.emit(
|
||||
"scan:scanning_rom",
|
||||
{
|
||||
"p_slug": scanned_platform.slug,
|
||||
"file_name": scanned_rom.file_name,
|
||||
"r_name": scanned_rom.r_name,
|
||||
},
|
||||
ignore_queue=True,
|
||||
)
|
||||
|
||||
if rom_id:
|
||||
scanned_rom.id = rom_id
|
||||
|
||||
dbh.add_rom(scanned_rom)
|
||||
dbh.purge_roms(scanned_platform.slug, [rom["file_name"] for rom in fs_roms])
|
||||
dbh.purge_platforms(fs_platforms)
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import sys
|
||||
import functools
|
||||
import pydash
|
||||
import requests
|
||||
|
||||
from time import time
|
||||
from unidecode import unidecode as uc
|
||||
from requests.exceptions import HTTPError, Timeout
|
||||
|
||||
import requests
|
||||
from config import CLIENT_ID, CLIENT_SECRET
|
||||
from utils import get_file_name_with_no_tags as get_search_term
|
||||
from logger.logger import log
|
||||
@@ -32,75 +35,79 @@ class IGDBHandler:
|
||||
|
||||
return wrapper
|
||||
|
||||
def _request(self, url: str, data: str, timeout: int = 120) -> list:
|
||||
try:
|
||||
res = requests.post(url, data, headers=self.headers, timeout=timeout)
|
||||
res.raise_for_status()
|
||||
except (HTTPError, Timeout) as err:
|
||||
log.error(err)
|
||||
# All requests to the IGDB API return a list
|
||||
return []
|
||||
|
||||
return res.json()
|
||||
|
||||
def _search_rom(
|
||||
self, search_term: str, p_igdb_id: int, category: int = None
|
||||
) -> dict:
|
||||
category_filter: str = f"& category={category}" if category else ""
|
||||
try:
|
||||
return requests.post(
|
||||
self.games_url,
|
||||
headers=self.headers,
|
||||
data=f"""
|
||||
search "{search_term}";
|
||||
fields id, slug, name, summary, screenshots;
|
||||
where platforms=[{p_igdb_id}] {category_filter};
|
||||
""",
|
||||
).json()[0]
|
||||
except IndexError:
|
||||
return {}
|
||||
roms = self._request(
|
||||
self.games_url,
|
||||
data=f"""
|
||||
search "{search_term}";
|
||||
fields id, slug, name, summary, screenshots;
|
||||
where platforms=[{p_igdb_id}] {category_filter};
|
||||
""",
|
||||
)
|
||||
|
||||
return pydash.get(roms, "[0]", {})
|
||||
|
||||
@staticmethod
|
||||
def _normalize_cover_url(url: str) -> str:
|
||||
return f"https:{url.replace('https:', '')}"
|
||||
|
||||
def _search_cover(self, rom_id: str) -> str:
|
||||
try:
|
||||
res = requests.post(
|
||||
self.covers_url,
|
||||
headers=self.headers,
|
||||
data=f"fields url; where game={rom_id};",
|
||||
timeout=120,
|
||||
).json()[0]
|
||||
except IndexError:
|
||||
covers = self._request(
|
||||
self.covers_url,
|
||||
data=f"fields url; where game={rom_id};",
|
||||
)
|
||||
|
||||
cover = pydash.get(covers, "[0]", None)
|
||||
if not cover:
|
||||
return ""
|
||||
|
||||
return self._normalize_cover_url(res["url"]) if "url" in res.keys() else ""
|
||||
return self._normalize_cover_url(cover["url"])
|
||||
|
||||
def _search_screenshots(self, rom_id: str) -> list:
|
||||
res = requests.post(
|
||||
screenshots = self._request(
|
||||
self.screenshots_url,
|
||||
headers=self.headers,
|
||||
data=f"fields url; where game={rom_id}; limit 5;",
|
||||
timeout=120,
|
||||
).json()
|
||||
)
|
||||
|
||||
return [
|
||||
self._normalize_cover_url(r["url"]).replace("t_thumb", "t_original")
|
||||
for r in res
|
||||
for r in screenshots
|
||||
if "url" in r.keys()
|
||||
]
|
||||
|
||||
@check_twitch_token
|
||||
def get_platform(self, slug: str):
|
||||
try:
|
||||
res = requests.post(
|
||||
self.platform_url,
|
||||
headers=self.headers,
|
||||
data=f'fields id, name; where slug="{slug.lower()}";',
|
||||
timeout=120,
|
||||
).json()[0]
|
||||
def get_platform(self, p_slug: str):
|
||||
paltforms = self._request(
|
||||
self.platform_url,
|
||||
data=f'fields id, name; where slug="{p_slug.lower()}";',
|
||||
)
|
||||
|
||||
platform = pydash.get(paltforms, "[0]", None)
|
||||
if not platform:
|
||||
return {
|
||||
"igdb_id": res["id"],
|
||||
"name": res["name"],
|
||||
"slug": slug,
|
||||
"igdb_id": "",
|
||||
"name": p_slug,
|
||||
"slug": p_slug,
|
||||
}
|
||||
except IndexError:
|
||||
log.warning(f"{slug} not found in IGDB")
|
||||
|
||||
return {
|
||||
"igdb_id": "",
|
||||
"name": slug,
|
||||
"slug": slug,
|
||||
"igdb_id": platform["id"],
|
||||
"name": platform["name"],
|
||||
"slug": p_slug,
|
||||
}
|
||||
|
||||
@check_twitch_token
|
||||
@@ -117,9 +124,6 @@ class IGDBHandler:
|
||||
r_name = res.get("name", search_term)
|
||||
summary = res.get("summary", "")
|
||||
|
||||
if not r_igdb_id:
|
||||
log.warning(f"{r_name} not found in IGDB")
|
||||
|
||||
return {
|
||||
"r_igdb_id": r_igdb_id,
|
||||
"r_slug": r_slug,
|
||||
@@ -131,25 +135,20 @@ class IGDBHandler:
|
||||
|
||||
@check_twitch_token
|
||||
def get_rom_by_id(self, r_igdb_id: str):
|
||||
res = requests.post(
|
||||
roms = self._request(
|
||||
self.games_url,
|
||||
headers=self.headers,
|
||||
data=f"fields slug, name, summary; where id={r_igdb_id};",
|
||||
timeout=120,
|
||||
f"fields slug, name, summary; where id={r_igdb_id};",
|
||||
)
|
||||
rom = pydash.get(roms, "[0]", {})
|
||||
|
||||
try:
|
||||
rom = res.json()[0]
|
||||
return {
|
||||
"r_igdb_id": r_igdb_id,
|
||||
"r_slug": rom.get("slug", ""),
|
||||
"r_name": rom.get("name", ""),
|
||||
"summary": rom.get("summary", ""),
|
||||
"url_cover": self._search_cover(r_igdb_id),
|
||||
"url_screenshots": self._search_screenshots(r_igdb_id),
|
||||
}
|
||||
except IndexError:
|
||||
return {}
|
||||
return {
|
||||
"r_igdb_id": r_igdb_id,
|
||||
"r_slug": rom.get("slug", ""),
|
||||
"r_name": rom.get("name", ""),
|
||||
"summary": rom.get("summary", ""),
|
||||
"url_cover": self._search_cover(r_igdb_id),
|
||||
"url_screenshots": self._search_screenshots(r_igdb_id),
|
||||
}
|
||||
|
||||
@check_twitch_token
|
||||
def get_matched_roms_by_id(self, r_igdb_id: str):
|
||||
@@ -161,16 +160,14 @@ class IGDBHandler:
|
||||
|
||||
@check_twitch_token
|
||||
def get_matched_roms_by_name(self, search_term: str, p_igdb_id: int):
|
||||
matched_roms = requests.post(
|
||||
matched_roms = self._request(
|
||||
self.games_url,
|
||||
headers=self.headers,
|
||||
data=f"""
|
||||
search "{uc(search_term)}";
|
||||
fields id, slug, name, summary;
|
||||
where platforms=[{p_igdb_id}];
|
||||
""",
|
||||
timeout=120,
|
||||
).json()
|
||||
)
|
||||
|
||||
return [
|
||||
dict(
|
||||
@@ -191,16 +188,14 @@ class IGDBHandler:
|
||||
if not p_igdb_id:
|
||||
return []
|
||||
|
||||
matched_roms = requests.post(
|
||||
matched_roms = self._request(
|
||||
self.games_url,
|
||||
headers=self.headers,
|
||||
data=f"""
|
||||
search "{uc(get_search_term(file_name))}";
|
||||
fields id, slug, name, summary;
|
||||
where platforms=[{p_igdb_id}];
|
||||
""",
|
||||
timeout=120,
|
||||
).json()
|
||||
)
|
||||
|
||||
return [
|
||||
dict(
|
||||
@@ -257,6 +252,9 @@ class TwitchAuth:
|
||||
log.info("Twitch token fetched!")
|
||||
|
||||
def get_oauth_token(self) -> str:
|
||||
if "pytest" in sys.modules:
|
||||
return "test_token"
|
||||
|
||||
if not self._is_token_valid():
|
||||
log.warning("Twitch token invalid: fetching a new one...")
|
||||
self._update_twitch_token()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,9 +7,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -31,7 +31,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb2f8e8bc453f5-YYZ
|
||||
- 7f126a05af63a217-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -39,23 +39,23 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 04:02:28 GMT
|
||||
- Thu, 03 Aug 2023 23:41:55 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=xtfZeK7uBDr86XujM6iIOQYiv3cNr.yyHfzPq6q.gQA-1690862548-0-Adn2oVSNHyz3zkUKoiYctDk401IEBYM1lCBJhYQLyvuwrkv8m0924r88Ey3L9jLjQN+9upnHofwB2UHJSUQ3S/c=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:32:28 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=wDiKbcKQ3m_tAXcetju4HJcp6OPAiMOfUGDv.Qxc9_4-1691106115-0-AR8tebmXr3vUeWSXKfHtRC7jKovYN4NoETfB3B/4U3W30Wy0fVrf8F1zztBw78LNQkPf5x0J9qS+mgWJZ7t3bws=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:11:55 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Via:
|
||||
- 1.1 ea419f8269940bd7231c70acd36c430c.cloudfront.net (CloudFront)
|
||||
- 1.1 4eb35caa679bb95c591a03f41b151b8c.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- oSeRLJDNh64iq4Oa7phTz1fEzWBmFr3j1sAcqWEL8ctCLWCnp1iMEA==
|
||||
- Q_1fypvitK-OJqC_QYY4ErPjAkJL_3gYmO81HOazZ60lVg_1ANrX3Q==
|
||||
X-Amz-Cf-Pop:
|
||||
- YUL62-C2
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -65,13 +65,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9mJNHhpvHcFxCA=
|
||||
- JG4ymEiEPHcF9MQ=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '500'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 04:02:28 GMT
|
||||
- Thu, 03 Aug 2023 23:41:55 GMT
|
||||
x-amzn-RequestId:
|
||||
- 9b7ad635-7643-44af-9987-c9fb2a458d90
|
||||
- c32482b9-7f14-4042-85df-19320fb5c3a4
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
@@ -83,9 +83,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -102,7 +102,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb2f8fb8fd36b5-YYZ
|
||||
- 7f126a06de1336b2-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -110,23 +110,23 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 04:02:28 GMT
|
||||
- Thu, 03 Aug 2023 23:41:55 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=yNJu1ibhp40_6PgfMgGYBiqNxKPrfsQFShgYpY4WxQM-1690862548-0-Af673p44x+pWQi71RPf/Zhg4rjs+sXc1QNcgrKNzIBarYDMUuZZERK32ZWOmLbsfhtCWvb8Nt8zRTTYz4oUbgDc=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:32:28 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=cQ_y_kOrw7pQVRj28XC3lPa2OCXVG0rSpcShckzp7p4-1691106115-0-AUjpVxmkEx0lJb7fc+CujKHS29w61WEhRm76yLebdCdDDHwCcp7cZI/jF3OIMs76nYBjR/sZ5zSrISlBVYBR6jU=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:11:55 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Via:
|
||||
- 1.1 5fa5e473f638d77357bb0fccef4ca526.cloudfront.net (CloudFront)
|
||||
- 1.1 412b0215b557780a6efcc1651037dc90.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- 8ITHHHNUbl01MAfMxeGtvTkhNVmfQdtfC3n-qu5uDaErnfSEEKCRyw==
|
||||
- YkMddi8ILsXiEJiU7JrHfsCznI7b2570ZCX1NhS7hrWTn0EGPVVlvg==
|
||||
X-Amz-Cf-Pop:
|
||||
- YUL62-C2
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -136,13 +136,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9mJPHKmPHcFUQQ=
|
||||
- JG4yoHFLPHcFxww=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '96'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 04:02:28 GMT
|
||||
- Thu, 03 Aug 2023 23:41:55 GMT
|
||||
x-amzn-RequestId:
|
||||
- ff503170-c13e-4a2a-a198-9ca8efba711c
|
||||
- 7eb9b5fb-ff48-4250-b7b7-647549a4a5ca
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
@@ -154,9 +154,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -169,15 +169,15 @@ interactions:
|
||||
body:
|
||||
string: "[\n {\n \"id\": 24169,\n \"url\": \"//images.igdb.com/igdb/image/upload/t_thumb/ig9ainu9fershqdinox1.jpg\"\n
|
||||
\ },\n {\n \"id\": 24168,\n \"url\": \"//images.igdb.com/igdb/image/upload/t_thumb/hdxgs9nruycvrzcgvseu.jpg\"\n
|
||||
\ },\n {\n \"id\": 24167,\n \"url\": \"//images.igdb.com/igdb/image/upload/t_thumb/a5r3k2lf3lgvifrycqeg.jpg\"\n
|
||||
\ },\n {\n \"id\": 24171,\n \"url\": \"//images.igdb.com/igdb/image/upload/t_thumb/kjnf90jnud6njmwto3th.jpg\"\n
|
||||
\ },\n {\n \"id\": 24170,\n \"url\": \"//images.igdb.com/igdb/image/upload/t_thumb/jz66se3deczeta6hd4ys.jpg\"\n
|
||||
\ },\n {\n \"id\": 24167,\n \"url\": \"//images.igdb.com/igdb/image/upload/t_thumb/a5r3k2lf3lgvifrycqeg.jpg\"\n
|
||||
\ }\n]"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb2f911f7da1ea-YYZ
|
||||
- 7f126a092e9339fd-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -185,23 +185,23 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 04:02:28 GMT
|
||||
- Thu, 03 Aug 2023 23:41:56 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=ELyvBYDrdPts7Yqom8z4cavFvX7vyy0VSh5m0XAHo3E-1690862548-0-AcSP+8MNTVBljob9DL6joLYyAmTvEqVm5O4CtgteK+7ffW0tQZp6urfN2FIcwgdsUK6a2isuKDoFjP5N84D90Jo=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:32:28 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=sJV2ROMH3Fq5hOrD12tZoGjjnHrqFJHYmSdMGiNu8EM-1691106116-0-AYpioWmuBfiwlRSk6VVzhKBjMxbqv1bTNaPKkKO/Knr/XHRCvwFfSWmFpycuk/foP08saw07yKTZBpuSBgTtpsY=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:11:56 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Via:
|
||||
- 1.1 ae7bbb23871eba9dda7f1abdc6bacfa0.cloudfront.net (CloudFront)
|
||||
- 1.1 1093497011694314ff008667ee2636c0.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- cElB3EVKq35RBD8P-iH1fs5r1TQFoEGXTShvRl-DqQufBz38-AmbDA==
|
||||
- r5B_vbMuEjRhNugI0GFE7TnuFSipGSMcwX3VtaltcUfEzdx2XUOeHA==
|
||||
X-Amz-Cf-Pop:
|
||||
- YUL62-C2
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -211,13 +211,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9mJSGLdPHcFylA=
|
||||
- JG4yrHhCPHcF4Pg=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '542'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 04:02:28 GMT
|
||||
- Thu, 03 Aug 2023 23:41:56 GMT
|
||||
x-amzn-RequestId:
|
||||
- 88315c38-509b-4718-a1f3-0b4c60adc236
|
||||
- 54fc6e46-b065-4460-958d-c02ee77c002c
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,9 +7,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -25,7 +25,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efafe519dff36fa-YYZ
|
||||
- 7f126a00ff5536ff-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -33,23 +33,23 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 03:28:51 GMT
|
||||
- Thu, 03 Aug 2023 23:41:55 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=ogRLRqNLcmzY9DuPASpJJgZP7GOQO7CzhkyaysJcWjE-1690860531-0-ARduDIuE+vLnjg/+BxKioPkiVn8IvsCy40FTHe5aWssHrRxze80F9ZmLKVBae2p+ziG0x8c81rNPOjNnQeqInio=;
|
||||
path=/; expires=Tue, 01-Aug-23 03:58:51 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=YSU1kOOYgk2sBN2rEWxDlKrslGRW1UpK8RnA6l.zKh4-1691106115-0-AaN052HbCUAYRaiWZZWlUTi/7cT0S9NbwQ7OwjzwmE/heOVqTfhFSJlTsFv6KbnQWd7RDcWEQI1EyCpeYesnUG4=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:11:55 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Via:
|
||||
- 1.1 684b7c29b4b69bec2dc5afe5ef9c1c50.cloudfront.net (CloudFront)
|
||||
- 1.1 9b4f2014232c90b3056e1fb1e00215fc.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- MCUfdjr5_Oa3JFybL0W1L3S4Lk0uOgLa3AgCYidvHZuywEONlKzuEw==
|
||||
- xhnv8ARLgZZoWZOYNyOKw2R9eORp9S7ZCmmvwShks2vAttJzZ_5eLA==
|
||||
X-Amz-Cf-Pop:
|
||||
- ORD51-C2
|
||||
- YUL62-C2
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -59,13 +59,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9hOGFFFvHcFa7Q=
|
||||
- JG4yfEnzPHcF9xQ=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '50'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 03:28:51 GMT
|
||||
- Thu, 03 Aug 2023 23:41:54 GMT
|
||||
x-amzn-RequestId:
|
||||
- 057e4982-ea50-4eba-8e2b-33d3b62e5500
|
||||
- 86e7521f-07de-4725-93ae-5945991b2f80
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
@@ -77,9 +77,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -95,7 +95,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efafe52ec035485-YYZ
|
||||
- 7f126a033dfe36d6-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -103,19 +103,19 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 03:28:51 GMT
|
||||
- Thu, 03 Aug 2023 23:41:55 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=8buhT4UoR0ySLoSLRnJgCt4tQOqiMrYn34dxSyZN4o4-1690860531-0-AX2HFUVAJ3Flj8uJauUGylBmi/nAxFqNougeTZdXaJViv3wumKplwUN6baGBeuDkm+4va5qx07vvCnKeC+ko8NM=;
|
||||
path=/; expires=Tue, 01-Aug-23 03:58:51 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=C15lGKF9M7qAs3MgWG1Rdg1BBgoNTkXUtiHaTYm2.No-1691106115-0-AcXlYwi9KvmsVhZSGfPc+8QFPyJ8l75AmoGU1uIc08UsxgCqA0ebf/joGzEFDgKANOycFOVnm4SD0FBPe79QJIA=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:11:55 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Via:
|
||||
- 1.1 6477e7b623b71ec66bc28ed8e271db7e.cloudfront.net (CloudFront)
|
||||
- 1.1 b17b94cbc6db5cb82e8f8d6e55e1e85a.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- jkLi93MCTST-3fs8nFUpKm-yPrWLxo9rtwYefCMiYMIObbST8bLE1w==
|
||||
- lssR6fbnPthIZ3KymDK4XGpoy79m63sp3YG3feOCNlerg3MlqgSjMw==
|
||||
X-Amz-Cf-Pop:
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
@@ -127,13 +127,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9hOIE27vHcFT1Q=
|
||||
- JG4yiHcZPHcFydQ=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '2'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 03:28:51 GMT
|
||||
- Thu, 03 Aug 2023 23:41:55 GMT
|
||||
x-amzn-RequestId:
|
||||
- ffb19bbc-123d-4bc3-a2d4-52640ffab302
|
||||
- c4d171c7-91fb-4587-a7d4-2417fab3f265
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
|
||||
225
backend/handler/tests/cassettes/test_get_rom.yaml
generated
225
backend/handler/tests/cassettes/test_get_rom.yaml
generated
@@ -1,21 +1,20 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: "\n search \"Paper Mario\";\n fields
|
||||
id, slug, name, summary, screenshots;\n where platforms=[4]
|
||||
;\n "
|
||||
body: "\n search \"Paper Mario\";\n fields id, slug,
|
||||
name, summary, screenshots;\n where platforms=[4] ;\n "
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '166'
|
||||
- '150'
|
||||
User-Agent:
|
||||
- python-requests/2.31.0
|
||||
method: POST
|
||||
@@ -83,7 +82,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb1fb27c3e36aa-YYZ
|
||||
- 7f126d5f6b293987-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -93,21 +92,21 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 03:51:38 GMT
|
||||
- Thu, 03 Aug 2023 23:44:12 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=tYA7FoYlhkvK11e1rJDYoJt29z8zKtCvnmg8sPCYy_w-1690861898-0-ASwvhl+zouXVmGAkLbYiKnPdKOQ6xYLcGnBq1drKyeM+YI3JH1+pcgdQL83tpDQiC5tG4Nz5FxYZq6Vn+7hyogM=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:21:38 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=bLLcuaIASi0bZmVFhPmsX64QEIxShbJgYdDg4.c2ovU-1691106252-0-Af/kCgNlQvV1rE830NQoa11FwK9tKYYqJIhdq9Ne70yNfd+9N6roout2ppRMV3hZf2tDUlIkk7VPLq96Jl680lA=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:14:12 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Via:
|
||||
- 1.1 9b4f2014232c90b3056e1fb1e00215fc.cloudfront.net (CloudFront)
|
||||
- 1.1 60c77d7f2a0954d991174a909a828016.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- EA2iGalDUXwdsoMCIP37qOnRHah6i_BN6JQldcQlsMh01zmE-ekC0g==
|
||||
- 8vOBHPI5YpN5BjvXTfZybpQmbmz3-vVi1eqgJu7rgJwJXgxxVmB-9Q==
|
||||
X-Amz-Cf-Pop:
|
||||
- YUL62-C2
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -117,13 +116,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9kjtGKUPHcF1UA=
|
||||
- JG5ICGJyPHcFr6g=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '1595'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 03:51:38 GMT
|
||||
- Thu, 03 Aug 2023 23:44:12 GMT
|
||||
x-amzn-RequestId:
|
||||
- 30db0468-6dbe-405c-90ff-e093ab4278b3
|
||||
- 0e5f62e6-d558-484f-93c3-13f9ddaf5c01
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
@@ -135,9 +134,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -154,7 +153,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb1fb3ddbc3972-YYZ
|
||||
- 7f126d622f3236bd-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -162,21 +161,23 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 03:51:39 GMT
|
||||
- Thu, 03 Aug 2023 23:44:13 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=FebkrRmEuOVhHBzP67Y1M.MHYCqs2.KHGanFcKnJwtY-1690861899-0-Aa3c0EjIqiyw9FVxJ+xIDPLINDtXRrbCILNW1XwQdTvepDk4De9O/h9jUlQOGkLqjUP9rj9p/YqiVUyFZ+bUB8g=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:21:39 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=RYYy_LYLPL6J1D0C7dMjF3mdj5vb2BcSNfg5ziPlan0-1691106253-0-AdxlU0S8rRHZvUuYozrUZBqmjNEixJEUWLANTttjOerusnkJG+fHNNMOB2V7TmHwSzfojdfk/IXmHvJ8NPthlVA=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:14:13 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Via:
|
||||
- 1.1 8dc256e43720ba0f5d01b9e6cd4ce544.cloudfront.net (CloudFront)
|
||||
- 1.1 ea419f8269940bd7231c70acd36c430c.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- 1scVQqMoUooKOfXS0lws7_9VyShFnWjK7DuktBdhV1zhXFZHvD7d2Q==
|
||||
- 0fticAwqoch2VCjBD18G9UZ-0fuL55bDm4DbU-tT295PetwxbQdHlQ==
|
||||
X-Amz-Cf-Pop:
|
||||
- ORD51-C2
|
||||
- YUL62-C2
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -186,13 +187,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9kjxG6QvHcFSow=
|
||||
- JG5IGGpaPHcF4gA=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '96'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 03:51:39 GMT
|
||||
- Thu, 03 Aug 2023 23:44:13 GMT
|
||||
x-amzn-RequestId:
|
||||
- 72a26163-8ddb-404e-b38b-53000cb45683
|
||||
- 4f89ffc9-fac0-4330-92de-818292867e7b
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
@@ -204,9 +205,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -227,7 +228,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb1fb65cd639de-YYZ
|
||||
- 7f126d64abf3369c-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -235,21 +236,23 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 03:51:39 GMT
|
||||
- Thu, 03 Aug 2023 23:44:13 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=qfMe0jDOv8xQfLkSSinTP1gVgDoHSboKutTITBGpNko-1690861899-0-ASgSGgVP6uJf8v+WMpKmHJzoUWQgZ0ggJp/UtHk44GLjV53xbwto6jGb1TuvlSE/58hv51O2kP5w04/7tZ+c3Ug=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:21:39 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=s4Ce14Sy3VrVUWlPy9dJolmqHh4AdrCbjVqVzyabHi4-1691106253-0-AVXeoHwfSXLWaN5JdVMNdDPv3McFYvMJBnD5X5JtFzQ79/ttXibX8gDdeps0pbUgbt2fB75ZMKR2ASCESOqS8U4=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:14:13 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Via:
|
||||
- 1.1 6f5a63f08c741820abad2a0b2a35176c.cloudfront.net (CloudFront)
|
||||
- 1.1 412b0215b557780a6efcc1651037dc90.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- HygNsNp7_JpnKV9rmFiS3LOxgPhY6PeuZCZyiFWIlA55KduOoFh41Q==
|
||||
- 6GbnvP9WqZDoHIjyYWSWYHS1D1PD9E-93l1wkEcx6f-Q9m4-U5YV_Q==
|
||||
X-Amz-Cf-Pop:
|
||||
- ORD51-C2
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -259,33 +262,33 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9kjzFzpvHcFwHQ=
|
||||
- JG5IKELtvHcFxxQ=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '542'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 03:51:39 GMT
|
||||
- Thu, 03 Aug 2023 23:44:13 GMT
|
||||
x-amzn-RequestId:
|
||||
- dbb64f4c-cda6-4e13-985c-4fc3341a7aa7
|
||||
- 7814ec9e-fa3c-4235-8f34-70b6be623622
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: "\n search \"Not a real game title\";\n fields
|
||||
id, slug, name, summary, screenshots;\n where platforms=[4]
|
||||
;\n "
|
||||
body: "\n search \"Not a real game title\";\n fields
|
||||
id, slug, name, summary, screenshots;\n where platforms=[4] ;\n
|
||||
\ "
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '176'
|
||||
- '160'
|
||||
User-Agent:
|
||||
- python-requests/2.31.0
|
||||
method: POST
|
||||
@@ -297,7 +300,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb1fb8da23a1ec-YYZ
|
||||
- 7f126d674fde38e3-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -305,19 +308,19 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 03:51:39 GMT
|
||||
- Thu, 03 Aug 2023 23:44:14 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=RG06o5ZAUvWQyEzHnXvfRVTloGQS83LkqSsc5UQNcb8-1690861899-0-AdCsYBB6/xTNt5afaJTa5HAx3kvwaVLUeZzBPCxKX8CoLDQnkI2/evtllKYoNFDCkF+IJbeIgVY7BvVoq9hAKWE=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:21:39 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=WTnyz18eCRd0SfvcLc1.HL_GB8_5XtEqwHLupWyo1Dg-1691106254-0-ASe88xYd/xOCRifJo9ibTwxWgMzt+uhs6kXhoZLXnyeeVnKXTUvDvfII11sR7Zajf1MwAGY2KFa+yInFOpOonC8=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:14:14 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Via:
|
||||
- 1.1 de0a592002999100a0085e087a370864.cloudfront.net (CloudFront)
|
||||
- 1.1 8422f3871db2552d4ad0cc9f31e22c2e.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- setlZZdf1Scj7w0ozugKvNf9nIFZ5p-VdxGYCOZmXlhR_Ld3q0tOdw==
|
||||
- NN1HJEq_rY56WFe0PbI_jWbXq6ZqcZAvmSEMBXtoEAzZnft8lUsmDw==
|
||||
X-Amz-Cf-Pop:
|
||||
- YUL62-C2
|
||||
X-Cache:
|
||||
@@ -329,33 +332,33 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9kj5GR3PHcFzLQ=
|
||||
- JG5IPEUBvHcFwbw=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '2'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 03:51:39 GMT
|
||||
- Thu, 03 Aug 2023 23:44:14 GMT
|
||||
x-amzn-RequestId:
|
||||
- 929c1657-ed53-4ddf-b7a3-3910fb3c570b
|
||||
- bf6f91b7-25e1-40d7-a740-b428e853bf35
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: "\n search \"Not a real game title\";\n fields
|
||||
id, slug, name, summary, screenshots;\n where platforms=[4]
|
||||
& category=10;\n "
|
||||
body: "\n search \"Not a real game title\";\n fields
|
||||
id, slug, name, summary, screenshots;\n where platforms=[4] &
|
||||
category=10;\n "
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '189'
|
||||
- '173'
|
||||
User-Agent:
|
||||
- python-requests/2.31.0
|
||||
method: POST
|
||||
@@ -367,7 +370,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb1fbad99c38e1-YYZ
|
||||
- 7f126d6a7e22a222-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -375,21 +378,21 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 03:51:40 GMT
|
||||
- Thu, 03 Aug 2023 23:44:14 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=p3M51f.3s3v0XVTOYUcs8CgZzgsK7h660K1uoCEvmt8-1690861900-0-AWjW0oaIJvojYqMLrDZP4VXSXX0zN4XNn8Aq4QSVIybhc6K4bAlSG/1A4pW7+YlRqpZ2g/LLyUYdydm0lq0DK94=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:21:40 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=ZEpgW84if5CBp_nuRPeBszoRejGEuzDMoTTukpl9aGU-1691106254-0-ATQMHD+4OraybHGTUEaQ1WPKsSolum+hEuf2bWGAlNp0QsvyLzkp/ZfeHsIol8op89rWh9p+6q/dE/pA+EAdOL0=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:14:14 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Via:
|
||||
- 1.1 238ef6b7fcc1fd30826738c560d235e0.cloudfront.net (CloudFront)
|
||||
- 1.1 412b0215b557780a6efcc1651037dc90.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- m4ZjInTbkJ3_eFzi0xUOsrCIiE0DoMdaFP7WH5ePbpVd3isKHXOhIg==
|
||||
- nQj1vjB38m0Jxw89M0oo3I0iBd84uzouIJn25TaRsmHqd13Auqz5cg==
|
||||
X-Amz-Cf-Pop:
|
||||
- ORD51-C2
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -399,33 +402,33 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9kj7E5EPHcFkrg=
|
||||
- JG5IVEZRPHcFkfQ=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '2'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 03:51:40 GMT
|
||||
- Thu, 03 Aug 2023 23:44:14 GMT
|
||||
x-amzn-RequestId:
|
||||
- 9e50a8b9-3d3e-427c-96a6-6c15255cd97a
|
||||
- 213d4393-5519-4c42-907c-95b4e45336ab
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: "\n search \"Not a real game title\";\n fields
|
||||
id, slug, name, summary, screenshots;\n where platforms=[4]
|
||||
;\n "
|
||||
body: "\n search \"Not a real game title\";\n fields
|
||||
id, slug, name, summary, screenshots;\n where platforms=[4] ;\n
|
||||
\ "
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '176'
|
||||
- '160'
|
||||
User-Agent:
|
||||
- python-requests/2.31.0
|
||||
method: POST
|
||||
@@ -437,7 +440,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb1fbc1b1439e3-YYZ
|
||||
- 7f126d6d0fb6a247-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -445,21 +448,21 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 03:51:40 GMT
|
||||
- Thu, 03 Aug 2023 23:44:15 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=U3ZQXP_dXJL0kmdH0AIGc7JuaJQkf7mdnSEgrTbI8I4-1690861900-0-ARqes4hdr46xpGPIGkKXMnFhNlGvzKiETWH/8D+B/lA0xZhJs5QjGhkrZ9xLcivT5UxjXHl1Q81KyYhNAKKlmyU=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:21:40 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=EIGZAzE7UTkwHk6Cy4cHYMXe6eCeYp7lRcxqNQKqWTE-1691106255-0-AeryOBWmbTOcAZmG+pm/kc1X6+g6zO/vi6h7g1wfgv9khTpHAybk4gwR1WlF4jxKEQ32GWzW/MBI8HBDbvJjO/Q=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:14:15 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Via:
|
||||
- 1.1 2b26355dcf9bbc955d60730f6007457c.cloudfront.net (CloudFront)
|
||||
- 1.1 9a6f07a84b60a85466bb31603767843c.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- 0_vqElusi94bElcjGQTL9WOQWTeXGfgaNzlsVsOWIco8jf68DQpm6A==
|
||||
- 1seMwudjh6edOHPTjFDA_8sl6LfjJ9AgxwsztlbmygsXuFSzBiD8cg==
|
||||
X-Amz-Cf-Pop:
|
||||
- ORD51-C2
|
||||
- YUL62-C2
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -469,13 +472,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9kj-F3svHcFgag=
|
||||
- JG5IYHasPHcFnLQ=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '2'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 03:51:40 GMT
|
||||
- Thu, 03 Aug 2023 23:44:15 GMT
|
||||
x-amzn-RequestId:
|
||||
- 268c4d22-166e-4591-b866-90f1068f8d33
|
||||
- 6bc197a6-5b2e-4c0c-b926-9f8d9bb2ac99
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
@@ -487,9 +490,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -505,7 +508,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7f062e7adffd248c-ZAG
|
||||
- 7f126d6eab87369f-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -513,21 +516,21 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Wed, 02 Aug 2023 12:04:08 GMT
|
||||
- Thu, 03 Aug 2023 23:44:15 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=OA0Btf4sSBZmQBWC.hfGaJeuAWKHc5xFsa4S5MCrzlY-1690977848-0-Abax6wH16taJDXFxRjIaXRicsnrMsOKd7VxMqOK2OqcdbJ1uF8WMaGkeVgWXXEu10vYikE36VGKOjGjm5VRERO8=;
|
||||
path=/; expires=Wed, 02-Aug-23 12:34:08 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=tqA0IF6yWEomy4yV9QiwUwE7.4Kxsxr7TeOmF7saxGU-1691106255-0-AZUVJ/r/9E0qbSxr7pYly6Kp+tI3wluyRdlleI871f+WGkwmIdx8YBIE5DyCJgZ5uC99izspK/cDBsl4g0PX8ss=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:14:15 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Via:
|
||||
- 1.1 76991fdca074ecae847653e013587ff8.cloudfront.net (CloudFront)
|
||||
- 1.1 9b2dd59575ce5b546a63dbe37a7ae2de.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- v4pwbs5KWB6RQ1CRb9sO7wA6WWEJ_aDQEFL_Oj3my_YWJeKHg6Qqgg==
|
||||
- iJ_jvuAeqLXjh4hHIEcWfvv17ywpd4ZHBRXsvheiBcHE-Ay5WI9_-A==
|
||||
X-Amz-Cf-Pop:
|
||||
- ZAG50-C1
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -537,13 +540,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- JB_oyF9cvHcFwbw=
|
||||
- JG5IaGsUPHcFzjg=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '2'
|
||||
x-amzn-Remapped-Date:
|
||||
- Wed, 02 Aug 2023 12:04:07 GMT
|
||||
- Thu, 03 Aug 2023 23:44:15 GMT
|
||||
x-amzn-RequestId:
|
||||
- 9a334f49-4ab7-4320-bdcc-768dd05f5995
|
||||
- be9ad64d-2bfc-4678-8469-66e1df44ff1d
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
@@ -555,9 +558,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -573,7 +576,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7f062e7fd97e248e-ZAG
|
||||
- 7f126d70eb7d3987-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -581,21 +584,21 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Wed, 02 Aug 2023 12:04:09 GMT
|
||||
- Thu, 03 Aug 2023 23:44:16 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=G8qCJxiK2VQ2YXLdpRtIDIUnxAYNZoSwh6yk7yEt8_k-1690977849-0-AUW1ne/mttDDZFlft6+VfbQ1lYCG3hWdQzp6BTmROO/QayHithqXAgDlxjebjbdhTtTXQ75Mmn8Mq02OTEBsEXc=;
|
||||
path=/; expires=Wed, 02-Aug-23 12:34:09 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=Trl8yAz8GxOWXz9JKbgLrhg8c0hxPPnl9cDU5AqEpds-1691106256-0-ATDgj0RSkUa8kxzr+rHLdVTYCTqNT346OCChaC1XS/bJ1EJGEpp7zlXUpDR6dr4iY/0t7uVO1VWp2MllwfxCfe8=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:14:16 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Via:
|
||||
- 1.1 3cf68d8be617999c7beade955cf69ddc.cloudfront.net (CloudFront)
|
||||
- 1.1 ea419f8269940bd7231c70acd36c430c.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- yBzgR4iCXRqL7kWZb-EqfH7Yv2IkmSYanmMFslJh8bW1hivSb-0blA==
|
||||
- f8_2TZSuaneVVFachgZ1rnafKeqO72WMjDtyyT-bRUPfQBwtQeRoGQ==
|
||||
X-Amz-Cf-Pop:
|
||||
- VIE50-C2
|
||||
- YUL62-C2
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -605,13 +608,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- JB_o6HQkPHcFcyQ=
|
||||
- JG5IfFhIPHcFSwA=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '2'
|
||||
x-amzn-Remapped-Date:
|
||||
- Wed, 02 Aug 2023 12:04:08 GMT
|
||||
- Thu, 03 Aug 2023 23:44:15 GMT
|
||||
x-amzn-RequestId:
|
||||
- cb2dc6ca-812f-480e-9722-c0402e227023
|
||||
- 688c2d14-6d90-4ae5-8132-dcefd35c64ad
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
|
||||
232
backend/handler/tests/cassettes/test_get_rom_by_id.yaml
generated
232
backend/handler/tests/cassettes/test_get_rom_by_id.yaml
generated
@@ -7,9 +7,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -31,7 +31,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb2f259ab73870-YYZ
|
||||
- 7f1269a8fcd7a247-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -39,23 +39,23 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 04:02:11 GMT
|
||||
- Thu, 03 Aug 2023 23:41:40 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=i1hnIQq6bEFhrB2wW7JvWnYsLWIqXJLP9Jn16rgAY1w-1690862531-0-AYORyWCnwE/sCsm1RJBSMdbevZODJ3XvSL06vzGQSPfSLWewPhrhcTPYtjjAYY4uVWdiWtlhNa15RBhDTPD3S7Y=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:32:11 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=6wzIMGNL1E0nC8FEHiAaWtMRKU6EIrbq2Ntv2efJZfE-1691106100-0-AZZ/vrJrRHIqQWl/fytfaIwcqEoedL5R5fQgG/C2c+nx4VK5qWWzGBJOkFmxor5QNrv6K5xruYTouCBBkdWdgjY=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:11:40 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Via:
|
||||
- 1.1 a809017c4252ec777a5d97cf31a304ca.cloudfront.net (CloudFront)
|
||||
- 1.1 81f76a57a3b40a803013e33a76a4e06e.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- iCVEVASOjkhjT0cQgtwNq0crI1ss_8nxlIDvKL23G77DeF0q7UQodA==
|
||||
- G_7eipAXaxm2iJo1sotArdRN4qN2Wtrqp8DYw7pYZNyTJcYNORgBhQ==
|
||||
X-Amz-Cf-Pop:
|
||||
- ORD51-C2
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -65,13 +65,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9mGmHwuPHcF2KA=
|
||||
- JG4wSGUQvHcFYrA=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '500'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 04:02:11 GMT
|
||||
- Thu, 03 Aug 2023 23:41:40 GMT
|
||||
x-amzn-RequestId:
|
||||
- 3cb33f97-7ad8-4c7b-a60f-6c5bf5f73b9f
|
||||
- 6963a67f-2b24-4bc0-8081-09a90f6569a2
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
@@ -83,9 +83,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -102,7 +102,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb2f27ab6b36ab-YYZ
|
||||
- 7f1269ab983053e9-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -110,23 +110,23 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 04:02:11 GMT
|
||||
- Thu, 03 Aug 2023 23:41:41 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=ZRpxsQoxQ.HQInPWr4VEQ9brPyqcESO99fIHGQgAHlU-1690862531-0-AbmRtWRInI30r/HsyVkRxrj7aUTYZgNklYyth2oSTTZgATrTCIXYTODot3L2TeyBVb6h/6VDnIKozYHkTb681oo=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:32:11 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=rdcKYHcKq26Q2vdhqVF5COrJY4h_YTSx_p8njGrHqLY-1691106101-0-ASjK+08Wese/yd21+LpAUCe22Fut1gTH5QazUGBWoHkxptAOyaURuo7qa+m2d3EAnSqTDFw8d/xj94qUNoLdSfE=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:11:41 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Via:
|
||||
- 1.1 ea419f8269940bd7231c70acd36c430c.cloudfront.net (CloudFront)
|
||||
- 1.1 4eb35caa679bb95c591a03f41b151b8c.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- e1xv9uKddvoJLnXLASmmYRxGa2VgGp0PuSZ8io9Io-uZ_Vj0jrRHHw==
|
||||
- OySucqxNocLndzmwnA0RXzP7HnMXfSWUqkj9d0Q90FksRHJbrNwKVQ==
|
||||
X-Amz-Cf-Pop:
|
||||
- YUL62-C2
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -136,13 +136,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9mGpErpvHcFSGQ=
|
||||
- JG4wWEESvHcFakw=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '96'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 04:02:11 GMT
|
||||
- Thu, 03 Aug 2023 23:41:41 GMT
|
||||
x-amzn-RequestId:
|
||||
- 544f3939-7665-4d02-af04-680d7599d0d0
|
||||
- db3f045b-761f-469a-b719-57b88738d4a1
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
@@ -154,9 +154,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -168,16 +168,16 @@ interactions:
|
||||
response:
|
||||
body:
|
||||
string: "[\n {\n \"id\": 24169,\n \"url\": \"//images.igdb.com/igdb/image/upload/t_thumb/ig9ainu9fershqdinox1.jpg\"\n
|
||||
\ },\n {\n \"id\": 24170,\n \"url\": \"//images.igdb.com/igdb/image/upload/t_thumb/jz66se3deczeta6hd4ys.jpg\"\n
|
||||
\ },\n {\n \"id\": 24167,\n \"url\": \"//images.igdb.com/igdb/image/upload/t_thumb/a5r3k2lf3lgvifrycqeg.jpg\"\n
|
||||
\ },\n {\n \"id\": 24168,\n \"url\": \"//images.igdb.com/igdb/image/upload/t_thumb/hdxgs9nruycvrzcgvseu.jpg\"\n
|
||||
\ },\n {\n \"id\": 24171,\n \"url\": \"//images.igdb.com/igdb/image/upload/t_thumb/kjnf90jnud6njmwto3th.jpg\"\n
|
||||
\ },\n {\n \"id\": 24170,\n \"url\": \"//images.igdb.com/igdb/image/upload/t_thumb/jz66se3deczeta6hd4ys.jpg\"\n
|
||||
\ }\n]"
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb2f290e18a217-YYZ
|
||||
- 7f1269ad3ae936b6-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
@@ -185,23 +185,23 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 04:02:12 GMT
|
||||
- Thu, 03 Aug 2023 23:41:41 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=EJdO3isAaJKcMeRXmcpkDHGzRtf84ozt_8U5533aulQ-1690862532-0-AVrDAo5KNUkaxQaTm8cMRdJyEuas79edlHrvJnJM+hOnOyHFgxbG111AXMb7ERhb4wmV9d19adlJyyfbs+x//gc=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:32:12 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=V2EzboOlys1qC_1rCvMGuAYqWHg6exbnLFTAwk18HNc-1691106101-0-AUVfW9ylQmKuU8FSost3PCJ69VmAzKWlv2gFNGXKZN5Ecfjh+JxJ6ncnJo7yTLpHIyxN80u8YCtVa+nFj4ZH1zM=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:11:41 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
Via:
|
||||
- 1.1 5fa5e473f638d77357bb0fccef4ca526.cloudfront.net (CloudFront)
|
||||
- 1.1 412b0215b557780a6efcc1651037dc90.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- J5OvOqDUVGCxwmEhjXXyYsRQCwTUfmwgyErgvio59zTrJGWR8N6uXQ==
|
||||
- lDjjOfPXojmh1N0JA7iCjtolLfhzGzgQFZTcYzM3097xveFgRm3s5g==
|
||||
X-Amz-Cf-Pop:
|
||||
- YUL62-C2
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
@@ -211,13 +211,13 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9mGsGw8PHcF8aQ=
|
||||
- JG4wYHyxvHcFdBw=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '542'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 04:02:12 GMT
|
||||
- Thu, 03 Aug 2023 23:41:41 GMT
|
||||
x-amzn-RequestId:
|
||||
- 8168b675-4621-40e5-91ec-b042cebc7dfb
|
||||
- 6ced9a9b-e270-4864-a67b-b58a72128b6a
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
@@ -229,9 +229,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -247,7 +247,7 @@ interactions:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7efb2f2b8feaa1e6-YYZ
|
||||
- 7f1269af6c115419-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -255,19 +255,87 @@ interactions:
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 01 Aug 2023 04:02:12 GMT
|
||||
- Thu, 03 Aug 2023 23:41:41 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=cAyTHDqftrQxH5Z3aRJHN1p.yQspBQkbZ2cbiAhy5QU-1690862532-0-AUabkaAZQnn/lqEyNlFeakrJXyr9Kc+fMb+5G1ikER0JscWmu5mWg/JCnHVg1+5U7UYOhVR+eU+lFtGnZqybYhk=;
|
||||
path=/; expires=Tue, 01-Aug-23 04:32:12 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
- __cf_bm=.IuBT64Zl0P9HFHRbmzYUvn0LxUFVVWEeB51pclhMbc-1691106101-0-Aes8qFtfvaTYIHRim5g5UsyYlLlbeLb0RYKs6dH1k+UQhpzcPnu+4kyh0+XGGwsVsmY+F+bfiVhMwAIzJ4b4wxo=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:11:41 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Via:
|
||||
- 1.1 ae7bbb23871eba9dda7f1abdc6bacfa0.cloudfront.net (CloudFront)
|
||||
- 1.1 81f76a57a3b40a803013e33a76a4e06e.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- l4vuNKT3tVbbwCD55voSuiHCPxDMw9RB0bvrMfu51uyiOOGKsgLMlA==
|
||||
- QwTCMhbMD62JN1DNzxMmMmioV-kL4ehctEnL9rplhxI3R0OwLBDjew==
|
||||
X-Amz-Cf-Pop:
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Count:
|
||||
- '0'
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- JG4wcGp_vHcFxbQ=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '2'
|
||||
x-amzn-Remapped-Date:
|
||||
- Thu, 03 Aug 2023 23:41:41 GMT
|
||||
x-amzn-RequestId:
|
||||
- 51479284-06f1-44cd-8591-16dbd0c22888
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: fields url; where game=-1;
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '26'
|
||||
User-Agent:
|
||||
- python-requests/2.31.0
|
||||
method: POST
|
||||
uri: https://api.igdb.com/v4/covers/
|
||||
response:
|
||||
body:
|
||||
string: '[]'
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7f1269b0bdb539f4-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '2'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 03 Aug 2023 23:41:42 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=UzK344EOvvk79GVWYJSEnZJNFP6uBXUckwRde6tIpTI-1691106102-0-AUaO+wV9SzoahyOktV0gi9B7YPac/QEIeXoe/iXwQSuk/Yj4m4kK/Hj42opNj48Ydd8C6pId/2eQZMSTPKbxyKI=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:11:42 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Via:
|
||||
- 1.1 9b4f2014232c90b3056e1fb1e00215fc.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- kZSnPkBGV0WgbprGevxrFf0xsOf6b2l4bBpDVnJJ7S5aSHzfkcYAGw==
|
||||
X-Amz-Cf-Pop:
|
||||
- YUL62-C2
|
||||
X-Cache:
|
||||
@@ -279,13 +347,81 @@ interactions:
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- I9mGwFWGPHcFQDA=
|
||||
- JG4wfFWcPHcFwZA=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '2'
|
||||
x-amzn-Remapped-Date:
|
||||
- Tue, 01 Aug 2023 04:02:12 GMT
|
||||
- Thu, 03 Aug 2023 23:41:42 GMT
|
||||
x-amzn-RequestId:
|
||||
- ba25354a-8333-4029-9d1f-35203c031ed7
|
||||
- fc08ed9f-b8c5-4d13-9d6c-628b9c011b1d
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: fields url; where game=-1; limit 5;
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '35'
|
||||
User-Agent:
|
||||
- python-requests/2.31.0
|
||||
method: POST
|
||||
uri: https://api.igdb.com/v4/screenshots/
|
||||
response:
|
||||
body:
|
||||
string: '[]'
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7f1269b409525437-YYZ
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '2'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 03 Aug 2023 23:41:42 GMT
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- __cf_bm=axZm.mr0lB8JkBdGcKtnpHkHi6nJ.oEP0moNoMlEY2w-1691106102-0-AXRGMueuDxqLV9bNscRE5iLrYVOwr/bndxIFcIUy880ClWajI1VDz14VdRGdemsHLzG45UqeOQr+pyUiYfN49qg=;
|
||||
path=/; expires=Fri, 04-Aug-23 00:11:42 GMT; domain=.igdb.com; HttpOnly; Secure;
|
||||
SameSite=None
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Via:
|
||||
- 1.1 81f76a57a3b40a803013e33a76a4e06e.cloudfront.net (CloudFront)
|
||||
X-Amz-Cf-Id:
|
||||
- _js5d9WGvne3WLyLbCwxCKKDsxju3sK33vHdMvyrQnniikMLI4JH7w==
|
||||
X-Amz-Cf-Pop:
|
||||
- YTO50-P1
|
||||
X-Cache:
|
||||
- Miss from cloudfront
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Count:
|
||||
- '0'
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
x-amz-apigw-id:
|
||||
- JG4wjFClPHcFXrg=
|
||||
x-amzn-Remapped-Content-Length:
|
||||
- '2'
|
||||
x-amzn-Remapped-Date:
|
||||
- Thu, 03 Aug 2023 23:41:42 GMT
|
||||
x-amzn-RequestId:
|
||||
- bc54f6c1-18b5-4e6a-861b-6837c69a2f50
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from handler.igdb_handler import IGDBHandler
|
||||
|
||||
@@ -23,8 +24,8 @@ def test_get_rom():
|
||||
assert rom["r_slug"] == "paper-mario"
|
||||
assert rom["r_name"] == "Paper Mario"
|
||||
assert rom["summary"]
|
||||
assert "images.igdb.com" in rom["url_cover"]
|
||||
assert "images.igdb.com" in rom["url_screenshots"][0]
|
||||
assert urlparse(rom["url_cover"]).hostname == "images.igdb.com"
|
||||
assert urlparse(rom["url_screenshots"][0]).hostname == "images.igdb.com"
|
||||
|
||||
rom = igdbh.get_rom("Not a real game title", 4)
|
||||
assert rom == {
|
||||
@@ -44,11 +45,12 @@ def test_get_rom_by_id():
|
||||
assert rom["r_slug"] == "paper-mario"
|
||||
assert rom["r_name"] == "Paper Mario"
|
||||
assert rom["summary"]
|
||||
assert "images.igdb.com" in rom["url_cover"]
|
||||
assert "images.igdb.com" in rom["url_screenshots"][0]
|
||||
assert urlparse(rom["url_cover"]).hostname == "images.igdb.com"
|
||||
assert urlparse(rom["url_screenshots"][0]).hostname == "images.igdb.com"
|
||||
|
||||
rom = igdbh.get_rom_by_id(-1)
|
||||
assert rom == {}
|
||||
assert rom["r_igdb_id"] == -1
|
||||
assert not rom["r_name"]
|
||||
|
||||
|
||||
@pytest.mark.vcr()
|
||||
@@ -87,8 +89,8 @@ def test_get_matched_roms():
|
||||
assert roms[0]["r_slug"] == "paper-mario"
|
||||
assert roms[0]["r_name"] == "Paper Mario"
|
||||
assert roms[0]["summary"]
|
||||
assert "images.igdb.com" in roms[0]["url_cover"]
|
||||
assert "images.igdb.com" in roms[0]["url_screenshots"][0]
|
||||
assert urlparse(roms[0]["url_cover"]).hostname == "images.igdb.com"
|
||||
assert urlparse(roms[0]["url_screenshots"][0]).hostname == "images.igdb.com"
|
||||
|
||||
roms = igdbh.get_matched_roms("Paper Mario (USA).n64", None)
|
||||
assert roms == []
|
||||
|
||||
@@ -27,7 +27,11 @@ sm.mount_to("/ws", app)
|
||||
|
||||
|
||||
async def scan_handler(*args):
|
||||
await scan.scan(*args, sm)
|
||||
try:
|
||||
await scan.scan(sm, *args)
|
||||
except Exception as err:
|
||||
await sm.emit("scan:done_ko", str(err))
|
||||
raise (err)
|
||||
|
||||
|
||||
sm.on("scan", handler=scan_handler)
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import emoji
|
||||
|
||||
from handler import igdbh
|
||||
from utils import fs, parse_tags, get_file_extension, get_file_name_with_no_tags
|
||||
from config.config_loader import config
|
||||
from models.platform import Platform
|
||||
from models.rom import Rom
|
||||
from logger.logger import log
|
||||
|
||||
|
||||
def scan_platform(fs_slug: str) -> Platform:
|
||||
@@ -14,6 +17,8 @@ def scan_platform(fs_slug: str) -> Platform:
|
||||
Platform object
|
||||
"""
|
||||
|
||||
log.info(f"· {fs_slug}")
|
||||
|
||||
platform_attrs = {}
|
||||
platform_attrs["fs_slug"] = fs_slug
|
||||
|
||||
@@ -25,7 +30,14 @@ def scan_platform(fs_slug: str) -> Platform:
|
||||
except (KeyError, TypeError, AttributeError):
|
||||
platform_attrs["slug"] = fs_slug
|
||||
|
||||
platform_attrs.update(igdbh.get_platform(platform_attrs["slug"]))
|
||||
platform = igdbh.get_platform(platform_attrs["slug"])
|
||||
|
||||
if platform["igdb_id"]:
|
||||
log.info(emoji.emojize(f" Identified as {platform['name']} :video_game:"))
|
||||
else:
|
||||
log.warning(f" {fs_slug} not found in IGDB")
|
||||
|
||||
platform_attrs.update(platform)
|
||||
platform_attrs["n_roms"] = len(fs.get_roms(platform_attrs["fs_slug"]))
|
||||
|
||||
return Platform(**platform_attrs)
|
||||
@@ -40,14 +52,24 @@ def scan_rom(
|
||||
p_slug = platform.fs_slug if platform.fs_slug else platform.slug
|
||||
roms_path = fs.get_roms_structure(p_slug)
|
||||
|
||||
log.info(f"\t · {r_igbd_id_search or rom_attrs['file_name']}")
|
||||
|
||||
if rom_attrs.get("multi", False):
|
||||
[log.info(f"\t\t · {file}") for file in rom_attrs["files"]]
|
||||
|
||||
if r_igbd_id_search:
|
||||
igdbh_rom = igdbh.get_rom_by_id(r_igbd_id_search)
|
||||
else:
|
||||
igdbh_rom = igdbh.get_rom(rom_attrs["file_name"], platform.igdb_id)
|
||||
|
||||
if not igdbh_rom:
|
||||
if not igdbh_rom["r_igdb_id"]:
|
||||
log.warning(
|
||||
f"\t {r_igbd_id_search or rom_attrs['file_name']} not found in IGDB"
|
||||
)
|
||||
return Rom(**rom_attrs)
|
||||
|
||||
log.info(emoji.emojize(f"\t Identified as {igdbh_rom['r_name']} :alien_monster:"))
|
||||
|
||||
rom_attrs.update(igdbh_rom)
|
||||
rom_attrs.update(
|
||||
fs.get_cover(
|
||||
|
||||
@@ -7,9 +7,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -77,9 +77,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
|
||||
12
backend/utils/tests/cassettes/test_scan_rom.yaml
generated
12
backend/utils/tests/cassettes/test_scan_rom.yaml
generated
@@ -9,9 +9,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -135,9 +135,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
@@ -206,9 +206,9 @@ interactions:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Client-ID:
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
|
||||
@@ -29,6 +29,27 @@ const searchCursor = ref("");
|
||||
const emitter = inject("emitter");
|
||||
emitter.on("filter", onFilterChange);
|
||||
|
||||
socket.on("scan:done", () => {
|
||||
scanning.set(false);
|
||||
emitter.emit("refreshGallery");
|
||||
emitter.emit("snackbarShow", {
|
||||
msg: "Scan completed successfully!",
|
||||
icon: "mdi-check-bold",
|
||||
color: "green",
|
||||
});
|
||||
socket.disconnect();
|
||||
});
|
||||
|
||||
socket.on("scan:done_ko", (msg) => {
|
||||
scanning.set(false);
|
||||
emitter.emit("snackbarShow", {
|
||||
msg: `Scan couldn't be completed. Something went wrong: ${msg}`,
|
||||
icon: "mdi-close-circle",
|
||||
color: "red",
|
||||
});
|
||||
socket.disconnect();
|
||||
});
|
||||
|
||||
// Functions
|
||||
async function scan() {
|
||||
scanning.set(true);
|
||||
@@ -37,26 +58,8 @@ async function scan() {
|
||||
icon: "mdi-loading mdi-spin",
|
||||
color: "rommAccent1",
|
||||
});
|
||||
|
||||
if (!socket.connected) socket.connect();
|
||||
socket.on("scan:done", () => {
|
||||
scanning.set(false);
|
||||
emitter.emit("refreshGallery");
|
||||
emitter.emit("snackbarShow", {
|
||||
msg: "Scan completed successfully!",
|
||||
icon: "mdi-check-bold",
|
||||
color: "green",
|
||||
});
|
||||
socket.disconnect();
|
||||
});
|
||||
socket.on("scan:done_ko", (msg) => {
|
||||
scanning.set(false);
|
||||
emitter.emit("snackbarShow", {
|
||||
msg: `Scan couldn't be completed. Something went wrong: ${msg}`,
|
||||
icon: "mdi-close-circle",
|
||||
color: "red",
|
||||
});
|
||||
socket.disconnect();
|
||||
});
|
||||
socket.emit("scan", JSON.stringify([route.params.platform]), false);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,52 +9,56 @@ import PlatformIcon from "@/components/Platform/PlatformIcon.vue";
|
||||
const platforms = storePlatforms();
|
||||
const platformsToScan = ref([]);
|
||||
const scanning = storeScanning();
|
||||
const scanningPlatform = ref("");
|
||||
const scannedPlatforms = ref([]);
|
||||
const completeRescan = ref(false);
|
||||
|
||||
// Event listeners bus
|
||||
const emitter = inject("emitter");
|
||||
|
||||
socket.on("scan:scanning_platform", ({ p_name, p_slug }) => {
|
||||
scannedPlatforms.value.push({
|
||||
name: p_name,
|
||||
slug: p_slug,
|
||||
roms: [],
|
||||
});
|
||||
});
|
||||
|
||||
socket.on("scan:scanning_rom", ({ p_slug, file_name, r_name }) => {
|
||||
const platform = scannedPlatforms.value.find((p) => p.slug === p_slug);
|
||||
platform.roms.push({
|
||||
name: r_name,
|
||||
file_name: file_name,
|
||||
});
|
||||
});
|
||||
|
||||
socket.on("scan:done", () => {
|
||||
scanning.set(false);
|
||||
emitter.emit("refreshPlatforms");
|
||||
emitter.emit("snackbarShow", {
|
||||
msg: "Scan completed successfully!",
|
||||
icon: "mdi-check-bold",
|
||||
color: "green",
|
||||
});
|
||||
socket.disconnect();
|
||||
});
|
||||
|
||||
socket.on("scan:done_ko", (msg) => {
|
||||
scanning.set(false);
|
||||
emitter.emit("snackbarShow", {
|
||||
msg: `Scan couldn't be completed. Something went wrong: ${msg}`,
|
||||
icon: "mdi-close-circle",
|
||||
color: "red",
|
||||
});
|
||||
socket.disconnect();
|
||||
});
|
||||
|
||||
// Functions
|
||||
async function scan() {
|
||||
scanning.set(true);
|
||||
scannedPlatforms.value = [];
|
||||
|
||||
if (!socket.connected) socket.connect();
|
||||
socket.on("scan:scanning_platform", (platform) => {
|
||||
scannedPlatforms.value.push({
|
||||
name: platform[0],
|
||||
slug: platform[1],
|
||||
rom: [],
|
||||
});
|
||||
scanningPlatform.value = platform[1];
|
||||
});
|
||||
socket.on("scan:scanning_rom", (rom) => {
|
||||
scannedPlatforms.value.forEach((platform) => {
|
||||
if (platform.slug == scanningPlatform.value) {
|
||||
platform.rom.push(rom);
|
||||
}
|
||||
});
|
||||
});
|
||||
socket.on("scan:done", () => {
|
||||
scanning.set(false);
|
||||
emitter.emit("refreshPlatforms");
|
||||
emitter.emit("snackbarShow", {
|
||||
msg: "Scan completed successfully!",
|
||||
icon: "mdi-check-bold",
|
||||
color: "green",
|
||||
});
|
||||
socket.disconnect();
|
||||
});
|
||||
socket.on("scan:done_ko", (msg) => {
|
||||
scanning.set(false);
|
||||
emitter.emit("snackbarShow", {
|
||||
msg: `Scan couldn't be completed. Something went wrong: ${msg}`,
|
||||
icon: "mdi-close-circle",
|
||||
color: "red",
|
||||
});
|
||||
socket.disconnect();
|
||||
});
|
||||
|
||||
socket.emit(
|
||||
"scan",
|
||||
JSON.stringify(platformsToScan.value.map((p) => p.fs_slug)),
|
||||
@@ -130,8 +134,13 @@ async function scan() {
|
||||
<platform-icon :platform="platform"></platform-icon>
|
||||
</v-avatar>
|
||||
<span class="text-body-2 ml-5"> {{ platform.name }}</span>
|
||||
<v-list-item v-for="rom in platform.rom" class="text-body-2" disabled>
|
||||
- {{ rom }}
|
||||
<v-list-item v-for="rom in platform.roms" class="text-body-2" disabled>
|
||||
<span v-if="rom.name" class="ml-10">
|
||||
• Identified <b>{{ rom.name }} 👾</b>
|
||||
</span>
|
||||
<span v-else class="ml-10">
|
||||
• {{ rom.file_name }} not found in IGDB
|
||||
</span>
|
||||
</v-list-item>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
Reference in New Issue
Block a user