Merge pull request #582 from zurdi15/master

v2.3.0
This commit is contained in:
Zurdi
2024-01-08 17:33:01 +01:00
committed by GitHub
189 changed files with 2399 additions and 1000 deletions

View File

@@ -1,3 +1,21 @@
# v2.3.0 (_08-01-2024_)
## Added
- Now ``platforms`` can be ``deleted`` from the gallery. Closes [#567](https://github.com/zurdi15/romm/issues/567)
- Support for ``switch`` ``updates`` and ``DLC`` files. Closes [#554](https://github.com/zurdi15/romm/issues/554)
- Additional Webrcade resources by @Casuallynoted.
- ``Exclusions`` in ``config`` file now accepts ``wildcards``. Check the [config.example.yml](examples/config.example.yml). Closes [#575](https://github.com/zurdi15/romm/issues/575)
## Fixed
- ``Not identified`` games are no longer being grouped when ``group roms`` option is enabled.
- Changes in the ``config`` file from one to other platform are now more consistent. Closes [#567](https://github.com/zurdi15/romm/issues/567)
- Some other minor fixes.
## Changed
- File extensions now can have up to ``100`` characters. Closes [#531](https://github.com/zurdi15/romm/issues/531)
- Now files without extension are skipped during scan by @bfenty.
- Logs are now clearer.
# v2.2.1 (_02-01-2024_)
## Added

View File

@@ -0,0 +1,36 @@
"""empty message
Revision ID: 0013_upgrade_file_extension
Revises: 0012_add_regions_languages
Create Date: 2024-01-02 16:51:20.485746
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = "0013_upgrade_file_extension"
down_revision = "0012_add_regions_languages"
branch_labels = None
depends_on = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("roms", schema=None) as batch_op:
batch_op.alter_column(
"file_extension", type_=sa.String(length=100), existing_type=sa.String(length=10)
)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("roms", schema=None) as batch_op:
batch_op.alter_column(
"file_extension", type_=sa.String(length=10), existing_type=sa.String(length=100)
)
# ### end Alembic commands ###

View File

@@ -4,6 +4,7 @@ import yaml
import pydash
from yaml.loader import SafeLoader
from urllib.parse import quote_plus
from typing_extensions import TypedDict
from config import (
ROMM_DB_DRIVER,
@@ -18,6 +19,16 @@ from config import (
from logger.logger import log
class ConfigDict(TypedDict):
EXCLUDED_PLATFORMS: list[str]
EXCLUDED_SINGLE_EXT: list[str]
EXCLUDED_SINGLE_FILES: list[str]
EXCLUDED_MULTI_FILES: list[str]
EXCLUDED_MULTI_PARTS_EXT: list[str]
EXCLUDED_MULTI_PARTS_FILES: list[str]
PLATFORMS_BINDING: dict[str, str]
class ConfigLoader:
# Tests require custom config path
def __init__(self, config_path: str = ROMM_USER_CONFIG_PATH):
@@ -77,7 +88,6 @@ class ConfigLoader:
self.config["PLATFORMS_BINDING"] = pydash.get(
self.config, "system.platforms", {}
)
log.info(f"Config loaded successfully from {self.config_path}")
config = ConfigLoader().config

View File

@@ -1,10 +1,13 @@
from fastapi import APIRouter, Request
from fastapi import APIRouter, Request, status, HTTPException
from pydantic import BaseModel
from typing import Optional
from typing_extensions import TypedDict
from handler import dbh
from exceptions.fs_exceptions import PlatformNotFoundException
from utils.fs import remove_platform
from utils.oauth import protected_route
from config import ROMM_HOST
from logger.logger import log
router = APIRouter()
@@ -117,3 +120,34 @@ def platforms_webrcade_feed(request: Request):
if p.slug in WEBRCADE_SUPPORTED_PLATFORM_SLUGS
],
}
class DeletePlatformResponse(TypedDict):
msg: str
@protected_route(router.delete, "/platforms/{fs_slug}", ["platforms.write"])
def delete_platform(
request: Request, fs_slug: str, delete_from_fs: bool = False
) -> DeletePlatformResponse:
"""Detele platform from database [and filesystem]"""
platform = dbh.get_platform_by_fs_slug(fs_slug)
if not platform:
error = f"Platform {platform.name} - [{platform.fs_slug}] not found"
log.error(error)
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=error)
log.info(f"Deleting {platform.name} [{platform.fs_slug}] from database")
dbh.delete_platform(platform.slug)
if delete_from_fs:
log.info(f"Deleting {platform.name} [{platform.fs_slug}] from filesystem")
try:
remove_platform(fs_slug)
except PlatformNotFoundException as e:
error = f"Couldn't delete from filesystem: {str(e)}"
log.error(error)
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=error)
return {"msg": f"{platform.name} - [{platform.fs_slug}] deleted successfully!"}

View File

@@ -306,7 +306,6 @@ def _delete_single_rom(rom_id: int, delete_from_fs: bool = False):
error = f"Couldn't delete from filesystem: {str(e)}"
log.error(error)
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=error)
return rom

View File

@@ -43,7 +43,7 @@ async def scan_platforms(
log.info(f"Found {len(platform_list)} platforms in file system ")
for platform_slug in platform_list:
scanned_platform = scan_platform(platform_slug)
scanned_platform = scan_platform(platform_slug, fs_platforms)
_new_platform = dbh.add_platform(scanned_platform)
new_platform = dbh.get_platform(_new_platform.slug)

View File

@@ -10,6 +10,15 @@ class PlatformsNotFoundException(Exception):
return self.message
class PlatformNotFoundException(Exception):
def __init__(self, platform: str):
self.message = f"Platform {platform} not found"
super().__init__(self.message)
def __repr__(self):
return self.message
class RomsNotFoundException(Exception):
def __init__(self, platform: str):
self.message = f"Roms not found for platform {platform}. {folder_struct_msg}"

View File

@@ -19,8 +19,8 @@ class DBHandler:
def begin_session(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
if hasattr(kwargs, 'session'):
return func(*args, session=kwargs.get('session'))
if hasattr(kwargs, "session"):
return func(*args, session=kwargs.get("session"))
try:
with args[0].session.begin() as s:
@@ -46,12 +46,39 @@ class DBHandler:
def get_platform(self, slug: str, session: Session = None):
return session.get(Platform, slug)
@begin_session
def get_platform_by_fs_slug(self, fs_slug: str, session: Session = None):
return session.scalars(
select(Platform).filter_by(fs_slug=fs_slug).limit(1)
).first()
@begin_session
def delete_platform(self, slug: str, session: Session = None):
# Remove all roms from that platforms first
session.execute(
delete(Rom)
.where(Rom.platform_slug == slug)
.execution_options(synchronize_session="evaluate")
)
return session.execute(
delete(Platform)
.where(Platform.slug == slug)
.execution_options(synchronize_session="evaluate")
)
@begin_session
def purge_platforms(self, platforms: list[str], session: Session = None):
return session.execute(
delete(Platform)
.where(or_(Platform.fs_slug.not_in(platforms), Platform.slug.is_(None)))
.execution_options(synchronize_session="evaluate")
.where(
select(func.count())
.select_from(Rom)
.filter_by(platform_slug=Platform.slug)
.as_scalar()
== 0
)
.execution_options(synchronize_session="fetch")
)
# ========= Roms =========

View File

@@ -165,18 +165,21 @@ class IGDBHandler:
@staticmethod
async def _ps2_opl_format(match: re.Match[str], search_term: str) -> str:
serial_code = match.group(1)
with open(PS2_OPL_INDEX_FILE, "r") as index_json:
opl_index = json.loads(index_json.read())
index_entry = opl_index.get(serial_code, None)
if index_entry:
search_term = index_entry["Name"] # type: ignore
return search_term
@staticmethod
async def _switch_titledb_format(match: re.Match[str], search_term: str) -> str:
title_id = match.group(1)
titledb_index = {}
title_id = match.group(1)
try:
with open(SWITCH_TITLEDB_INDEX_FILE, "r") as index_json:
titledb_index = json.loads(index_json.read())
@@ -192,12 +195,19 @@ class IGDBHandler:
index_entry = titledb_index.get(title_id, None)
if index_entry:
search_term = index_entry["name"] # type: ignore
return search_term
@staticmethod
async def _switch_productid_format(match: re.Match[str], search_term: str) -> str:
product_id = match.group(1)
product_id_index = {}
product_id = match.group(1)
# Game updates have the same product ID as the main application, except with bitmask 0x800 set
product_id = list(product_id)
product_id[-3] = '0'
product_id = ''.join(product_id)
try:
with open(SWITCH_PRODUCT_ID_FILE, "r") as index_json:
product_id_index = json.loads(index_json.read())
@@ -218,6 +228,7 @@ class IGDBHandler:
@staticmethod
async def _mame_format(search_term: str) -> str:
mame_index = {"menu": {"game": []}}
try:
with open(MAME_XML_FILE, "r") as index_xml:
mame_index = xmltodict.parse(index_xml.read())
@@ -240,6 +251,7 @@ class IGDBHandler:
search_term = get_search_term(
index_entry[0].get("description", search_term)
)
return search_term
@check_twitch_token
@@ -268,7 +280,7 @@ class IGDBHandler:
search_term = await self._ps2_opl_format(match, search_term)
# Support for switch titleID filename format
match = re.match(SWITCH_TITLEDB_REGEX, file_name)
match = re.search(SWITCH_TITLEDB_REGEX, file_name)
if platform_idgb_id == SWITCH_IGDB_ID and match:
search_term = await self._switch_titledb_format(match, search_term)
@@ -292,19 +304,21 @@ class IGDBHandler:
)
igdb_id = res.get("id", None)
slug = res.get("slug", "")
name = res.get("name", search_term)
summary = res.get("summary", "")
return IGDBRomType(
rom = IGDBRomType(
igdb_id=igdb_id,
slug=slug,
name=name,
summary=summary,
url_cover=self._search_cover(igdb_id),
url_screenshots=self._search_screenshots(igdb_id),
slug=res.get("slug", ""),
name=res.get("name", search_term),
summary=res.get("summary", ""),
url_cover=DEFAULT_URL_COVER_L,
url_screenshots=[],
)
if igdb_id:
rom['url_cover'] = self._search_cover(igdb_id)
rom['url_screenshots'] = self._search_screenshots(igdb_id)
return rom
@check_twitch_token
def get_rom_by_id(self, igdb_id: int) -> IGDBRomType:
roms = self._request(

View File

@@ -31,7 +31,7 @@ interactions:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 83df0a12ccdfa23a-YYZ
- 840e1def59b553ef-YYZ
Connection:
- keep-alive
Content-Length:
@@ -39,19 +39,19 @@ interactions:
Content-Type:
- application/json
Date:
- Sun, 31 Dec 2023 02:19:44 GMT
- Fri, 05 Jan 2024 19:27:09 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=75F6Cd9J_wGU4SOZ_3fx9Cm2BR7lAvkRnvXdjLmHaiU-1703989184-1-ATMcHIhC7jkEKs10GT7EIGnApp3pt9Cqhl5EmEO3W+bprH+gmPNvvorctoLKCeljpX/1zyUZROSX+zVaz3KXUEQ=;
path=/; expires=Sun, 31-Dec-23 02:49:44 GMT; domain=.igdb.com; HttpOnly; Secure;
- __cf_bm=UaS11VA2fB8atCFOx97aBLqoxkRUnsy_5rrNYIL3YoU-1704482829-1-AdzDyNg7l51RyROpA43PUQnVRrzVRtMP8CRdttBmqJFmha5lAkwAgZnY4Ph2NBm43oQ71fP5Tz8xSl3SeV4jfT4=;
path=/; expires=Fri, 05-Jan-24 19:57:09 GMT; domain=.igdb.com; HttpOnly; Secure;
SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Via:
- 1.1 192b5dfe0d3306c6761973a7786a01d4.cloudfront.net (CloudFront)
- 1.1 f7da5d3db9ee44e1812f138a4bdfd564.cloudfront.net (CloudFront)
X-Amz-Cf-Id:
- dBVVlnJT-jrZmZMPbAnEcl-6pp04UAyNyBgGTE61PGI8NNjMHoSYIA==
- cY3sSQbEy2b71uGVJZ8qt0KgtzDfyrJqc8WVhXjxCfPiztfGVWglGg==
X-Amz-Cf-Pop:
- YUL62-C2
X-Cache:
@@ -61,11 +61,11 @@ interactions:
alt-svc:
- h3=":443"; ma=86400
x-amz-apigw-id:
- QyVmIEylPHcELDA=
- RFKyDFjYPHcEgLw=
x-amzn-ErrorType:
- AccessDeniedException
x-amzn-RequestId:
- 0e8e898b-d07c-42e5-b9af-37b90507329a
- 4db631d7-10ca-4505-99b0-000e64fab321
status:
code: 401
message: Unauthorized
@@ -86,7 +86,7 @@ interactions:
uri: https://id.twitch.tv/oauth2/token?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&client_secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&grant_type=client_credentials
response:
body:
string: '{"access_token":"kzpl3usb531xaea7slfr8qj61ko0pk","expires_in":5594983,"token_type":"bearer"}
string: '{"access_token":"ycmxc7vv0hesse6mjvg9hium4iku9s","expires_in":4762653,"token_type":"bearer"}
'
headers:
@@ -99,11 +99,11 @@ interactions:
Content-Type:
- application/json
Date:
- Sun, 31 Dec 2023 02:19:45 GMT
- Fri, 05 Jan 2024 19:27:09 GMT
Server:
- nginx
X-Ctxlog-Logid:
- 1-6590cfc0-1e4f09df1f1e03d607439118
- 1-6598580d-72814aa35ddb1dba5cc27010
status:
code: 200
message: OK
@@ -116,7 +116,7 @@ interactions:
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer kzpl3usb531xaea7slfr8qj61ko0pk
- Bearer ycmxc7vv0hesse6mjvg9hium4iku9s
Client-ID:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Connection:
@@ -134,7 +134,7 @@ interactions:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 83df0a17ac08a1f3-YYZ
- 840e1df61ff9a1e4-YYZ
Connection:
- keep-alive
Content-Length:
@@ -142,19 +142,19 @@ interactions:
Content-Type:
- application/json
Date:
- Sun, 31 Dec 2023 02:19:45 GMT
- Fri, 05 Jan 2024 19:27:10 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=6UJb45qsF2HLy2xF25hzItD1tZUd5HkIdaf7WkoP2hw-1703989185-1-AbGrcK4DSq33Cq6WRWcY2YEMA4HQ4Yd+2fybmyf0kTTnm9VlUjIzp6qX297aHmZ1ikV/NQxFKDEQpVsphizKNgs=;
path=/; expires=Sun, 31-Dec-23 02:49:45 GMT; domain=.igdb.com; HttpOnly; Secure;
- __cf_bm=cBz3M1IzatwlfWTrENffjuZWUox3KdMY_ruN2OU8nT0-1704482830-1-AfBxgPXgQ/M/YsHGDYtUnb3VK8BHBhrI5of44hGUBp+KE03mKP2SH/Ui+s/O3vbcAmwr5cQdKCi7wvrP3MPpkL0=;
path=/; expires=Fri, 05-Jan-24 19:57:10 GMT; domain=.igdb.com; HttpOnly; Secure;
SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Via:
- 1.1 5da360f23ca6a5d9a9a5e95b0b553be0.cloudfront.net (CloudFront)
- 1.1 5fa5e473f638d77357bb0fccef4ca526.cloudfront.net (CloudFront)
X-Amz-Cf-Id:
- Sd5hayMUQ_onZ0QwWyms0hUjp9ysGi4Zl9tAmLZTQupxanvXv7Osdg==
- mNE9nHzWA6zBTPOM0rq4pQC4IyRVgWBPIx7HGN6u8T8nv7cZLq5ZPg==
X-Amz-Cf-Pop:
- YUL62-C2
X-Cache:
@@ -166,13 +166,13 @@ interactions:
alt-svc:
- h3=":443"; ma=86400
x-amz-apigw-id:
- QyVmREngPHcEVnw=
- RFKyNFyyvHcEKyA=
x-amzn-Remapped-Content-Length:
- '2'
x-amzn-Remapped-Date:
- Sun, 31 Dec 2023 02:19:45 GMT
- Fri, 05 Jan 2024 19:27:10 GMT
x-amzn-RequestId:
- c03daa25-3551-4ac3-96a6-edb047de1246
- ea9517b3-ad01-416d-99dd-7a9a73868337
status:
code: 200
message: OK
@@ -186,7 +186,7 @@ interactions:
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer kzpl3usb531xaea7slfr8qj61ko0pk
- Bearer ycmxc7vv0hesse6mjvg9hium4iku9s
Client-ID:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Connection:
@@ -204,7 +204,7 @@ interactions:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 83df0a1b0cc736b1-YYZ
- 840e1df959f8a21d-YYZ
Connection:
- keep-alive
Content-Length:
@@ -212,19 +212,19 @@ interactions:
Content-Type:
- application/json
Date:
- Sun, 31 Dec 2023 02:19:46 GMT
- Fri, 05 Jan 2024 19:27:10 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=5BQHqyeD34RCYOEL2f3pbUvMtjIHmXH3tJIDWmCqiqQ-1703989186-1-ATav2LWxOELl+5UYqXyvF/sh7hSC08i/mbgcLsd/WER/Px0KlNWb97ysy+mebHL8UUHgQvvSd3pP1TrKAms3t6w=;
path=/; expires=Sun, 31-Dec-23 02:49:46 GMT; domain=.igdb.com; HttpOnly; Secure;
- __cf_bm=QiozKIK2Ap6T3BMS1.zFk9IfLGmrgDQV4tCC4mR5aVA-1704482830-1-AXm8pPyNZPolOcXxd2oXAtP/fZ+y+rwS2hHZL1ntRcWSpXMEmy3diGuqtZ61HzvH41ztaO0YBXA289em+GBAAV4=;
path=/; expires=Fri, 05-Jan-24 19:57:10 GMT; domain=.igdb.com; HttpOnly; Secure;
SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Via:
- 1.1 19d1514f5f81da4dca6349d0f75a352c.cloudfront.net (CloudFront)
- 1.1 22068bada9db7a55ac57b9824fe6f9b4.cloudfront.net (CloudFront)
X-Amz-Cf-Id:
- m4RGNvzJO4LRJ3QnybNE4xmnTOeyv5XDkIG3-kuoDODiZ9YuZD53_Q==
- vLFpUC9iRNUiBqE1P5BNBSEmzpZpYdY92TXSUGZ8tH-Zpc7AO13Kww==
X-Amz-Cf-Pop:
- YUL62-C2
X-Cache:
@@ -236,13 +236,13 @@ interactions:
alt-svc:
- h3=":443"; ma=86400
x-amz-apigw-id:
- QyVmVGsFPHcEHfg=
- RFKyTG7HPHcEpug=
x-amzn-Remapped-Content-Length:
- '2'
x-amzn-Remapped-Date:
- Sun, 31 Dec 2023 02:19:45 GMT
- Fri, 05 Jan 2024 19:27:10 GMT
x-amzn-RequestId:
- 6d9fce3b-cc72-4dfc-970d-dfcc146abe3b
- de9b5cba-2134-42cb-b13a-d0886acde238
status:
code: 200
message: OK
@@ -255,7 +255,7 @@ interactions:
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer kzpl3usb531xaea7slfr8qj61ko0pk
- Bearer ycmxc7vv0hesse6mjvg9hium4iku9s
Client-ID:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Connection:
@@ -273,7 +273,7 @@ interactions:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 83df0a1dbea036aa-YYZ
- 840e1dfc9aa236c3-YYZ
Connection:
- keep-alive
Content-Length:
@@ -281,19 +281,19 @@ interactions:
Content-Type:
- application/json
Date:
- Sun, 31 Dec 2023 02:19:46 GMT
- Fri, 05 Jan 2024 19:27:11 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=yVWqAGgiY8m1vAqMrF4hnaRVXXq9StyxG0rfsOcK_Y0-1703989186-1-Ad90fMqsJf3/sY3O/FHNdRC6bC1a0iN62/borIbCAekZksK/FO3MuC6fIqzPwPm+eQFzkZv7ZhMkKFixg9HY8uE=;
path=/; expires=Sun, 31-Dec-23 02:49:46 GMT; domain=.igdb.com; HttpOnly; Secure;
- __cf_bm=NmMjWGx_xEiiM1uaWbgA84EAXUBTNmuTz9ZbInymZ00-1704482831-1-AXNxQ3/n3pxXz7JDMQBCqUGP1kl/TA0WSkLvOGP9Casw5j1J9WLw6zbPg/CqUntFGmZlIZrnJ1xFi1aJSlm1Ps8=;
path=/; expires=Fri, 05-Jan-24 19:57:11 GMT; domain=.igdb.com; HttpOnly; Secure;
SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Via:
- 1.1 5da360f23ca6a5d9a9a5e95b0b553be0.cloudfront.net (CloudFront)
- 1.1 8422f3871db2552d4ad0cc9f31e22c2e.cloudfront.net (CloudFront)
X-Amz-Cf-Id:
- HEuRD3670DasLWvvca01I8r28BaNjVKR-YDp6KKLUyNlScTFECjesQ==
- nNG-gTaYCZ5rpsGaE9w0Q6W7n0Zcgas_ijV_07HttzgZRJvFgewDyA==
X-Amz-Cf-Pop:
- YUL62-C2
X-Cache:
@@ -305,156 +305,16 @@ interactions:
alt-svc:
- h3=":443"; ma=86400
x-amz-apigw-id:
- QyVmZEXtPHcEKkA=
- RFKyZFsMvHcEs2A=
x-amzn-Remapped-Content-Length:
- '2'
x-amzn-Remapped-Date:
- Sun, 31 Dec 2023 02:19:46 GMT
- Fri, 05 Jan 2024 19:27:11 GMT
x-amzn-RequestId:
- 9f163773-b317-46b3-9737-329654bc6fa3
- bda8994c-74ff-40b9-946b-5c291feba36c
status:
code: 200
message: OK
- request:
body: fields url; where game=None;
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer kzpl3usb531xaea7slfr8qj61ko0pk
Client-ID:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Connection:
- keep-alive
Content-Length:
- '28'
User-Agent:
- python-requests/2.31.0
method: POST
uri: https://api.igdb.com/v4/covers/
response:
body:
string: "[\n {\n \"title\": \"Syntax Error\",\n \"status\": 400,\n \"cause\":
\"Expecting a STRING as input, surround your input with quotes starting at
\\u0027None\\u0027 expecting {\\u0027{\\u0027, \\u0027f\\u0027, \\u0027(\\u0027,
\\u0027[\\u0027, \\u0027true\\u0027, \\u0027t\\u0027, \\u0027false\\u0027,
\\u0027null\\u0027, \\u0027n\\u0027\"\n }\n]"
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 83df0a20481b3a06-YYZ
Connection:
- keep-alive
Content-Length:
- '319'
Content-Type:
- application/json
Date:
- Sun, 31 Dec 2023 02:19:46 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=bxF1ldr_a8VYbOuDtCls6xW7jcKMonXKhZQW_manM.Q-1703989186-1-Ad3KZWGupk1/HXKjvGpcZLuv9+dmLDGk3OkErU3F7uhxgaZHdyYM4z88D3sNrGuUxIxl9QKDf7UZJJu8hoAW3k4=;
path=/; expires=Sun, 31-Dec-23 02:49:46 GMT; domain=.igdb.com; HttpOnly; Secure;
SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Via:
- 1.1 6e873fe6803a6da3d6232f8bb9104e9e.cloudfront.net (CloudFront)
X-Amz-Cf-Id:
- ChOeGB4POBUUKoGU2RIBFUXJ6gKelniIl7I6hZ3vl3SjkeR66U62XA==
X-Amz-Cf-Pop:
- YUL62-C2
X-Cache:
- Error from cloudfront
X-Content-Type-Options:
- nosniff
alt-svc:
- h3=":443"; ma=86400
x-amz-apigw-id:
- QyVmeFrjPHcESmg=
x-amzn-Remapped-Content-Length:
- '319'
x-amzn-Remapped-Date:
- Sun, 31 Dec 2023 02:19:46 GMT
x-amzn-RequestId:
- 81da4b8e-8e00-4d66-bd38-d6aaf2221769
status:
code: 400
message: Bad Request
- request:
body: fields url; where game=None; limit 5;
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer kzpl3usb531xaea7slfr8qj61ko0pk
Client-ID:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Connection:
- keep-alive
Content-Length:
- '37'
User-Agent:
- python-requests/2.31.0
method: POST
uri: https://api.igdb.com/v4/screenshots/
response:
body:
string: "[\n {\n \"title\": \"Syntax Error\",\n \"status\": 400,\n \"cause\":
\"Expecting a STRING as input, surround your input with quotes starting at
\\u0027None\\u0027 expecting {\\u0027{\\u0027, \\u0027f\\u0027, \\u0027(\\u0027,
\\u0027[\\u0027, \\u0027true\\u0027, \\u0027t\\u0027, \\u0027false\\u0027,
\\u0027null\\u0027, \\u0027n\\u0027\"\n }\n]"
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 83df0a237e2fa235-YYZ
Connection:
- keep-alive
Content-Length:
- '319'
Content-Type:
- application/json
Date:
- Sun, 31 Dec 2023 02:19:47 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=WBpRo3Sp6M6TFZonZ96StFupvRQy1xArVgcTZV_bNE4-1703989187-1-AWXEpgPR1S3mSsz/ItY4aeYbtDk7YpM0UkScBTjhnNIsjhSmGlaIoCzeY4ZomDgO0osNi4YtC8DS4UUPs8UnA3w=;
path=/; expires=Sun, 31-Dec-23 02:49:47 GMT; domain=.igdb.com; HttpOnly; Secure;
SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Via:
- 1.1 192b5dfe0d3306c6761973a7786a01d4.cloudfront.net (CloudFront)
X-Amz-Cf-Id:
- oPVLd8RjOrjlH3SefnpdDHjsHL9Q36XKrZMUaWKwQFmFDPhH2deLFw==
X-Amz-Cf-Pop:
- YUL62-C2
X-Cache:
- Error from cloudfront
X-Content-Type-Options:
- nosniff
alt-svc:
- h3=":443"; ma=86400
x-amz-apigw-id:
- QyVmiFBTPHcEj1A=
x-amzn-Remapped-Content-Length:
- '319'
x-amzn-Remapped-Date:
- Sun, 31 Dec 2023 02:19:47 GMT
x-amzn-RequestId:
- 0a19ca68-8636-4592-9222-679db9468e06
status:
code: 400
message: Bad Request
- request:
body: "\n search \"WWE SmackDown! vs. RAW\";\n fields
id, slug, name, summary, screenshots;\n where platforms=[8] ;\n
@@ -488,7 +348,7 @@ interactions:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 83df0a257eba36a6-YYZ
- 840e1dffcff87119-YYZ
Connection:
- keep-alive
Content-Length:
@@ -496,19 +356,19 @@ interactions:
Content-Type:
- application/json
Date:
- Sun, 31 Dec 2023 02:19:47 GMT
- Fri, 05 Jan 2024 19:27:11 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=.0InkIabwGR.ZQgAzYrFR.lbKsd1scrNznjzN3lI6Sg-1703989187-1-AXZnOZ7cfnkUUfTp5zsr7x8F99+iZWH0iScPG+YOEwPQc8iUPj7pouvp9LoJu/jrI/wN/CQ4/yAvyW/nBdrtOcg=;
path=/; expires=Sun, 31-Dec-23 02:49:47 GMT; domain=.igdb.com; HttpOnly; Secure;
- __cf_bm=08u9u5ApvfMie_jqiDNmXs9WL4bHaapgSVqf2xT_mLg-1704482831-1-AfJfmqIEV831rLFDaZg0D4C4D31H8oSfMR9ecWO7NIQo8pbw6LzbVBjWBZq6ryV3t/yGLxXtDjKMLnWifUaN4Bo=;
path=/; expires=Fri, 05-Jan-24 19:57:11 GMT; domain=.igdb.com; HttpOnly; Secure;
SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Via:
- 1.1 036a9c4a824b984cd31ef0e9e0ecd306.cloudfront.net (CloudFront)
- 1.1 144825e0e5f4523d1f7ce8c9b62cd908.cloudfront.net (CloudFront)
X-Amz-Cf-Id:
- 1mpoJ-0r7u-K8-M1l9veGwVguks0RPdl-m3G2WDQHX4S02nnxGJo5w==
- oeRw1015Xc3mSJUL7mrLuCKk9m_myM3RDMip_0iodK7uFY32s66BwA==
X-Amz-Cf-Pop:
- YUL62-C2
X-Cache:
@@ -518,11 +378,11 @@ interactions:
alt-svc:
- h3=":443"; ma=86400
x-amz-apigw-id:
- QyVmmEMWPHcEFBQ=
- RFKyeGWhvHcEPug=
x-amzn-ErrorType:
- AccessDeniedException
x-amzn-RequestId:
- 2bd4fb71-5b83-42df-8a19-b93605746d25
- e8572348-415f-48ea-b3fa-15643a26b6f4
status:
code: 401
message: Unauthorized
@@ -543,7 +403,7 @@ interactions:
uri: https://id.twitch.tv/oauth2/token?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&client_secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&grant_type=client_credentials
response:
body:
string: '{"access_token":"gq1864m66f1ngu2qoxnd49ookehhy1","expires_in":4717256,"token_type":"bearer"}
string: '{"access_token":"9vv70shduosepkqte323j2sk7e5l16","expires_in":5478750,"token_type":"bearer"}
'
headers:
@@ -556,11 +416,11 @@ interactions:
Content-Type:
- application/json
Date:
- Sun, 31 Dec 2023 02:19:48 GMT
- Fri, 05 Jan 2024 19:27:12 GMT
Server:
- nginx
X-Ctxlog-Logid:
- 1-6590cfc4-55872e824708d2163c3bf0bd
- 1-65985810-32ff685c334e1d562685f667
status:
code: 200
message: OK
@@ -574,7 +434,7 @@ interactions:
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer gq1864m66f1ngu2qoxnd49ookehhy1
- Bearer 9vv70shduosepkqte323j2sk7e5l16
Client-ID:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Connection:
@@ -670,7 +530,7 @@ interactions:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 83df0a2c6d3739f8-YYZ
- 840e1e062e8839f9-YYZ
Connection:
- keep-alive
Content-Encoding:
@@ -680,19 +540,19 @@ interactions:
Content-Type:
- application/json
Date:
- Sun, 31 Dec 2023 02:19:48 GMT
- Fri, 05 Jan 2024 19:27:12 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=ZVLfjxo3b1s.egTLDimGV1IcBMp.jgZGaWg8Qsf4nI8-1703989188-1-AS3R9VgSnvyLAQzT1oMDr9g3mx6aA/HUbiqB0EUtBch4+VEeFnEd4irjYPnf46rDsWHBlrCGcaaEPlkLvuBMck8=;
path=/; expires=Sun, 31-Dec-23 02:49:48 GMT; domain=.igdb.com; HttpOnly; Secure;
- __cf_bm=SBQ0hfeNWLeVDi9u25Ycqjy0_y_lVOlQ6RUoOXpoUvE-1704482832-1-AX8irnnXyf/2o19KeyDM46YduN9meO/Qdwu0d/tDbrrtqL6M1ExPQqPN4J9DMGR9e6Gh2JtAV0DZTn8wlCe5B5E=;
path=/; expires=Fri, 05-Jan-24 19:57:12 GMT; domain=.igdb.com; HttpOnly; Secure;
SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Via:
- 1.1 22068bada9db7a55ac57b9824fe6f9b4.cloudfront.net (CloudFront)
- 1.1 f7da5d3db9ee44e1812f138a4bdfd564.cloudfront.net (CloudFront)
X-Amz-Cf-Id:
- 77YY97O3K7hJor0l_SoXlj6-Q6JNQOJtmaRhphMOhqmQIs4gNX0V_w==
- 4QRv9SqNlv9c1l6rJlzTPHUwAvsoje8ZHFOL381FA2S-mPfChjzv7Q==
X-Amz-Cf-Pop:
- YUL62-C2
X-Cache:
@@ -704,13 +564,13 @@ interactions:
alt-svc:
- h3=":443"; ma=86400
x-amz-apigw-id:
- QyVmxEyevHcEGVA=
- RFKyoFdtPHcENCA=
x-amzn-Remapped-Content-Length:
- '2424'
x-amzn-Remapped-Date:
- Sun, 31 Dec 2023 02:19:48 GMT
- Fri, 05 Jan 2024 19:27:12 GMT
x-amzn-RequestId:
- 02559e63-f5e0-4f25-97e0-68b947e3575a
- 1725c117-1e0b-4617-aaa3-e28514f91fc5
status:
code: 200
message: OK
@@ -722,7 +582,7 @@ interactions:
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer gq1864m66f1ngu2qoxnd49ookehhy1
- Bearer 9vv70shduosepkqte323j2sk7e5l16
Client-ID:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Connection:
@@ -741,7 +601,7 @@ interactions:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 83df0a2ef87138e4-YYZ
- 840e1e0928333701-YYZ
Connection:
- keep-alive
Content-Encoding:
@@ -749,23 +609,23 @@ interactions:
Content-Type:
- application/json
Date:
- Sun, 31 Dec 2023 02:19:49 GMT
- Fri, 05 Jan 2024 19:27:13 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=7E6Aa_Xg9bF0t5mNjDo3YtZQUkcV2ILpIGb3gw9STwA-1703989189-1-AZ8bctOyaW9AO5zG7hgt4TXUO4FbMB3j5SVryE8nGZQkHArA09Z+FnA0nDBfNZ1q6NEAd3zdUU7BJoUY+4w1XLU=;
path=/; expires=Sun, 31-Dec-23 02:49:49 GMT; domain=.igdb.com; HttpOnly; Secure;
- __cf_bm=bI2hirE91RIdKvLGAuGYFmNDWo.7x186AGjRyaxu1w8-1704482833-1-AWDx/4zSK3tfOUw0nN7HIEAoOYngfUQlpngXXAjSghmK9lSyrCfAnhgaYSN4H+rWVNQxOZ31tuZLwOOisbiz/Zo=;
path=/; expires=Fri, 05-Jan-24 19:57:13 GMT; domain=.igdb.com; HttpOnly; Secure;
SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Transfer-Encoding:
- chunked
Via:
- 1.1 dc63ed289fa4d9a64b4cc2f12891a350.cloudfront.net (CloudFront)
- 1.1 0df778cadb5eaa000de4f1d7838b16e0.cloudfront.net (CloudFront)
X-Amz-Cf-Id:
- b_9MnfhzfB8yDqchukg4D-P0w3a2AfFS0Tqx6Z8IQTaG0WRRKU7Alw==
- pJHvaV9ghiHsZMTQ_IcKG9EX2fXmnbLHRZQdBFPHA31DrhiJTcMAcQ==
X-Amz-Cf-Pop:
- YTO50-P1
- YUL62-C2
X-Cache:
- Miss from cloudfront
X-Content-Type-Options:
@@ -775,13 +635,13 @@ interactions:
alt-svc:
- h3=":443"; ma=86400
x-amz-apigw-id:
- QyVm1EyaPHcEN8Q=
- RFKysFlZvHcEQfQ=
x-amzn-Remapped-Content-Length:
- '97'
x-amzn-Remapped-Date:
- Sun, 31 Dec 2023 02:19:49 GMT
- Fri, 05 Jan 2024 19:27:13 GMT
x-amzn-RequestId:
- c8088104-c103-4cb3-8fe7-7af8265c9fe6
- 391acfec-991b-4b11-8ec1-bc5ccc558a7c
status:
code: 200
message: OK
@@ -793,7 +653,7 @@ interactions:
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer gq1864m66f1ngu2qoxnd49ookehhy1
- Bearer 9vv70shduosepkqte323j2sk7e5l16
Client-ID:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Connection:
@@ -816,7 +676,7 @@ interactions:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 83df0a319ff139d8-YYZ
- 840e1e0c8e45a1da-YYZ
Connection:
- keep-alive
Content-Encoding:
@@ -824,23 +684,23 @@ interactions:
Content-Type:
- application/json
Date:
- Sun, 31 Dec 2023 02:19:49 GMT
- Fri, 05 Jan 2024 19:27:13 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=WgZhLZjpJEkGND5txV2r93a99zvNo0lh09leUWO0CA0-1703989189-1-Acf7RzSBFYhUXoJdDP3aJycqij+4JqNEkIqgSTe2YRr/B276k4eASY4pcGEe2BYUqaHsC8J0FpBnXNwtszTngJ0=;
path=/; expires=Sun, 31-Dec-23 02:49:49 GMT; domain=.igdb.com; HttpOnly; Secure;
- __cf_bm=_Lbr4oQE0LaNfBP5BiCrLEOHj.IXNE2El_O5u8FK.o4-1704482833-1-AQ5NVKvfJ9qNvAwufTD+7oNVvnlkcCbO0Qv+OIrYoYM4xPER/87JcGOd65ILQVduWMI7dX259NTaJe/oCgeTzZs=;
path=/; expires=Fri, 05-Jan-24 19:57:13 GMT; domain=.igdb.com; HttpOnly; Secure;
SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Transfer-Encoding:
- chunked
Via:
- 1.1 81f76a57a3b40a803013e33a76a4e06e.cloudfront.net (CloudFront)
- 1.1 f7da5d3db9ee44e1812f138a4bdfd564.cloudfront.net (CloudFront)
X-Amz-Cf-Id:
- o2807X138GU4QKufYTs8fI914b7qecahIByBME1JfkZC5FPQOLKbBA==
- L9J0t_WDbn0jZmgEBmKE7fN3m-ZQAHr2GpcHcZznMRsnJ1Su2BRQQA==
X-Amz-Cf-Pop:
- YTO50-P1
- YUL62-C2
X-Cache:
- Miss from cloudfront
X-Content-Type-Options:
@@ -850,13 +710,13 @@ interactions:
alt-svc:
- h3=":443"; ma=86400
x-amz-apigw-id:
- QyVm6H0TvHcES9A=
- RFKyyGQhPHcEpHQ=
x-amzn-Remapped-Content-Length:
- '477'
x-amzn-Remapped-Date:
- Sun, 31 Dec 2023 02:19:49 GMT
- Fri, 05 Jan 2024 19:27:13 GMT
x-amzn-RequestId:
- ad55a8e3-1508-4e14-91e1-23fb56bb68b5
- c3bcc7b4-bdfc-4c69-8a60-c8b5e6a7478b
status:
code: 200
message: OK

View File

@@ -7,6 +7,7 @@ from fastapi.middleware.cors import CORSMiddleware
from fastapi_pagination import add_pagination
from starlette.middleware.authentication import AuthenticationMiddleware
from starlette.middleware.sessions import SessionMiddleware
from typing_extensions import TypedDict
from config import (
DEV_PORT,
@@ -31,7 +32,7 @@ from utils.auth import (
create_default_admin_user,
)
from utils import get_version
from config.config_loader import config
from config.config_loader import config, ConfigDict
app = FastAPI(title="RomM API", version="0.1.0")
@@ -76,9 +77,33 @@ add_pagination(app)
app.mount("/ws", socket_app)
class WatcherDict(TypedDict):
ENABLED: bool
TITLE: str
MESSAGE: str
class TaskDict(WatcherDict):
CRON: str
class SchedulerDict(TypedDict):
RESCAN: TaskDict
SWITCH_TITLEDB: TaskDict
MAME_XML: TaskDict
class HeartbeatReturn(TypedDict):
VERSION: str
ROMM_AUTH_ENABLED: bool
WATCHER: WatcherDict
SCHEDULER: SchedulerDict
CONFIG: ConfigDict
# Endpoint to set the CSRF token in cache
@app.get("/heartbeat")
def heartbeat():
def heartbeat() -> HeartbeatReturn:
return {
"VERSION": get_version(),
"ROMM_AUTH_ENABLED": ROMM_AUTH_ENABLED,
@@ -107,7 +132,7 @@ def heartbeat():
"MESSAGE": "Updates the MAME XML file",
},
},
"CONFIG": config
"CONFIG": config,
}

View File

@@ -105,10 +105,14 @@ class Rom(BaseModel):
def sibling_roms(self) -> list["Rom"]:
from handler import dbh
if not self.igdb_id:
return []
with dbh.session.begin() as session:
return session.scalars(
dbh.get_roms(self.platform_slug).filter(
Rom.id != self.id, Rom.igdb_id == self.igdb_id
Rom.id != self.id,
Rom.igdb_id == self.igdb_id,
)
).all()

View File

@@ -23,7 +23,7 @@ class ScanLibraryTask(PeriodicTask):
return
log.info("Scheduled library scan started...")
scan_platforms([])
await scan_platforms([])
log.info("Scheduled library scan done")

View File

@@ -1,14 +1,16 @@
import emoji
from typing import Any
from handler import igdbh
from handler import igdbh, dbh
from utils import fs, parse_tags, get_file_extension, get_file_name_with_no_tags
from config.config_loader import config
from models import Platform, Rom
from logger.logger import log
SWAPPED_PLATFORM_BINDINGS = dict((v, k) for k, v in config["PLATFORMS_BINDING"].items())
def scan_platform(fs_slug: str) -> Platform:
def scan_platform(fs_slug: str, fs_platforms) -> Platform:
"""Get platform details
Args:
@@ -22,6 +24,16 @@ def scan_platform(fs_slug: str) -> Platform:
platform_attrs: dict[str, Any] = {}
platform_attrs["fs_slug"] = fs_slug
# Sometimes users change the name of the folder, so we try to match it with the config
if fs_slug not in fs_platforms:
log.warning(
f" {fs_slug} not found in file system, trying to match via config..."
)
if fs_slug in SWAPPED_PLATFORM_BINDINGS.keys():
platform = dbh.get_platform_by_fs_slug(fs_slug)
if platform:
platform_attrs["fs_slug"] = SWAPPED_PLATFORM_BINDINGS[platform.slug]
try:
if fs_slug in config["PLATFORMS_BINDING"].keys():
platform_attrs["slug"] = config["PLATFORMS_BINDING"][fs_slug]
@@ -29,6 +41,7 @@ def scan_platform(fs_slug: str) -> Platform:
platform_attrs["slug"] = fs_slug
except (KeyError, TypeError, AttributeError):
platform_attrs["slug"] = fs_slug
platform = igdbh.get_platform(platform_attrs["slug"])
if platform["igdb_id"]:

View File

@@ -4,6 +4,7 @@ import shutil
from pathlib import Path
import datetime
import requests
import fnmatch
from urllib.parse import quote
from PIL import Image
@@ -24,6 +25,7 @@ from config import (
from config.config_loader import config
from exceptions.fs_exceptions import (
PlatformsNotFoundException,
PlatformNotFoundException,
RomsNotFoundException,
RomNotFoundError,
RomAlreadyExistsException,
@@ -216,6 +218,14 @@ def get_platforms() -> list[str]:
raise PlatformsNotFoundException from exc
def remove_platform(fs_slug: str):
platform_path = get_roms_structure(fs_slug)
try:
shutil.rmtree(f"{LIBRARY_BASE_PATH}/{platform_path}")
except FileNotFoundError as exc:
raise PlatformNotFoundException(fs_slug) from exc
# ========= Roms utils =========
def get_roms_structure(fs_slug: str):
return (
@@ -231,9 +241,22 @@ def _exclude_files(files, filetype) -> list[str]:
filtered_files: list = []
for file in files:
if file.split(".")[-1] in excluded_extensions or file in excluded_names:
# Split the file name to get the extension.
parts = file.split(".")
# Exclude the file if it has no extension or the extension is in the excluded list.
if len(parts) == 1 or parts[-1] in excluded_extensions:
filtered_files.append(file)
# Additionally, check if the file name mathes a pattern in the excluded list.
if len(excluded_names) > 0:
[
filtered_files.append(file)
for name in excluded_names
if file == name or fnmatch.fnmatch(file, name)
]
# Return files that are not in the filtered list.
return [f for f in files if f not in filtered_files]

View File

@@ -7,7 +7,7 @@ from models import Platform, Rom
@pytest.mark.vcr()
def test_scan_platform():
platform = scan_platform("n64")
platform = scan_platform("n64", "n64")
assert platform.__class__ == Platform
assert platform.fs_slug == "n64"
@@ -16,7 +16,7 @@ def test_scan_platform():
assert platform.igdb_id == 4
try:
platform = scan_platform("")
platform = scan_platform("", "")
except RomsNotFoundException as e:
assert "Roms not found for platform" in str(e)

View File

@@ -1,4 +1,5 @@
import pytest
from unittest.mock import patch
from ..fs import (
get_cover,
@@ -6,6 +7,7 @@ from ..fs import (
get_roms_structure,
get_roms,
get_rom_file_size,
_exclude_files,
# get_screenshots # TODO: write test
# store_default_resources # TODO: write test
# get_rom_files, # TODO: write test
@@ -128,3 +130,49 @@ def test_rom_size():
)
assert rom_size == (2.0, "KB")
def test__exclude_files():
from config.config_loader import config
config["EXCLUDED_SINGLE_FILES"] = ["Super Mario 64 (J) (Rev A) [Part 1].z64"]
patch("utils.fs.config", config)
filtered_files = _exclude_files(
files=["Super Mario 64 (J) (Rev A) [Part 1].z64", "Super Mario 64 (J) (Rev A) [Part 2].z64"],
filetype="single",
)
assert len(filtered_files) == 1
config["EXCLUDED_SINGLE_EXT"] = ["z64"]
filtered_files = _exclude_files(
files=["Super Mario 64 (J) (Rev A) [Part 1].z64", "Super Mario 64 (J) (Rev A) [Part 2].z64"],
filetype="single",
)
assert len(filtered_files) == 0
config["EXCLUDED_SINGLE_FILES"] = ["*.z64"]
filtered_files = _exclude_files(
files=["Super Mario 64 (J) (Rev A) [Part 1].z64", "Super Mario 64 (J) (Rev A) [Part 2].z64"],
filetype="single",
)
assert len(filtered_files) == 0
config["EXCLUDED_SINGLE_FILES"] = ["_.*"]
filtered_files = _exclude_files(
files=[
"Links Awakening.nsp",
"_.Links Awakening.nsp",
"Kirby's Adventure.nsp",
"_.Kirby's Adventure.nsp",
],
filetype="single",
)
assert len(filtered_files) == 2

View File

@@ -7,12 +7,14 @@ exclude:
roms:
## Single file games section
single_file:
# Exclude matched file names to be scanned
names:
- 'info.txt'
# Exclude all files with certain extensions to be scanned
extensions:
- 'xml'
# Exclude matched file names to be scanned
names:
- 'info.txt'
- '._*' # Supports unix filename pattern matching
- '*.nfo' # Can also exclude files by extension
## Multi files games section
multi_file:

View File

@@ -29,6 +29,7 @@ services:
- REDIS_PORT=6379 # default: 6379
- REDIS_PASSWORD=<redis password> # [Optional] Support for secured redis
# [Optional] Will enable asynchronous tasks (all disabled by default)
# Important: Do NOT wrap the cron expression in quotes
- ENABLE_RESCAN_ON_FILESYSTEM_CHANGE=true # Runs a quick scan on the library when a file is added or removed
- RESCAN_ON_FILESYSTEM_CHANGE_DELAY=5 # Delay in seconds before running the quick scan (default: 5)
- ENABLE_SCHEDULED_RESCAN=true # Runs a quick scan on the library at a given time

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -9,6 +9,6 @@
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

View File

@@ -6,7 +6,6 @@
"packages": {
"": {
"name": "romm",
"version": "2.1.0",
"dependencies": {
"@mdi/font": "7.0.96",
"axios": "^1.6.0",
@@ -16,7 +15,8 @@
"js-cookie": "^3.0.5",
"jszip": "^3.10.1",
"lodash": "^4.17.21",
"mitt": "^3.0.0",
"mitt": "^3.0.1",
"nanoid": "^5.0.4",
"pinia": "^2.1.6",
"roboto-fontface": "*",
"socket.io-client": "^4.6.1",
@@ -27,14 +27,23 @@
},
"devDependencies": {
"@types/file-saver": "^2.0.5",
"@types/js-cookie": "^3.0.6",
"@types/lodash": "^4.14.202",
"@types/node": "^20.10.6",
"@types/webfontloader": "^1.6.38",
"@vitejs/plugin-vue": "^3.0.3",
"@vue/tsconfig": "^0.5.1",
"eslint": "^8.22.0",
"eslint-plugin-vue": "^9.3.0",
"openapi-typescript-codegen": "^0.25.0",
"sass": "^1.55.0",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"vite": "^3.2.7",
"vite-plugin-pwa": "^0.14.7",
"vite-plugin-rewrite-all": "^1.0.1",
"vite-plugin-vuetify": "^1.0.0-alpha.12"
"vite-plugin-vuetify": "^1.0.0-alpha.12",
"vue-tsc": "^1.8.27"
}
},
"node_modules/@ampproject/remapping": {
@@ -50,6 +59,18 @@
"node": ">=6.0.0"
}
},
"node_modules/@apidevtools/json-schema-ref-parser": {
"version": "9.0.9",
"resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz",
"integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==",
"dev": true,
"dependencies": {
"@jsdevtools/ono": "^7.1.3",
"@types/json-schema": "^7.0.6",
"call-me-maybe": "^1.0.1",
"js-yaml": "^4.1.0"
}
},
"node_modules/@babel/code-frame": {
"version": "7.22.13",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
@@ -1999,6 +2020,12 @@
"integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
"devOptional": true
},
"node_modules/@jsdevtools/ono": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz",
"integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==",
"dev": true
},
"node_modules/@mdi/font": {
"version": "7.0.96",
"resolved": "https://registry.npmjs.org/@mdi/font/-/font-7.0.96.tgz",
@@ -2224,11 +2251,32 @@
"integrity": "sha512-zv9kNf3keYegP5oThGLaPk8E081DFDuwfqjtiTzm6PoxChdJ1raSuADf2YGCVIyrSynLrgc8JWv296s7Q7pQSQ==",
"dev": true
},
"node_modules/@types/js-cookie": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-3.0.6.tgz",
"integrity": "sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==",
"dev": true
},
"node_modules/@types/json-schema": {
"version": "7.0.15",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
"dev": true
},
"node_modules/@types/lodash": {
"version": "4.14.202",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz",
"integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==",
"dev": true
},
"node_modules/@types/node": {
"version": "18.15.11",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz",
"integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==",
"devOptional": true
"version": "20.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz",
"integrity": "sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==",
"devOptional": true,
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/@types/resolve": {
"version": "1.17.1",
@@ -2245,6 +2293,12 @@
"integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==",
"dev": true
},
"node_modules/@types/webfontloader": {
"version": "1.6.38",
"resolved": "https://registry.npmjs.org/@types/webfontloader/-/webfontloader-1.6.38.tgz",
"integrity": "sha512-kUaF72Fv202suFx6yBrwXqeVRMx7hGtJTesyESZgn9sEPCUeDXm2p0SiyS1MTqW74nQP4p7JyrOCwZ7pNFns4w==",
"dev": true
},
"node_modules/@vitejs/plugin-vue": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-3.2.0.tgz",
@@ -2258,6 +2312,34 @@
"vue": "^3.2.25"
}
},
"node_modules/@volar/language-core": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-1.11.1.tgz",
"integrity": "sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==",
"dev": true,
"dependencies": {
"@volar/source-map": "1.11.1"
}
},
"node_modules/@volar/source-map": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-1.11.1.tgz",
"integrity": "sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==",
"dev": true,
"dependencies": {
"muggle-string": "^0.3.1"
}
},
"node_modules/@volar/typescript": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-1.11.1.tgz",
"integrity": "sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==",
"dev": true,
"dependencies": {
"@volar/language-core": "1.11.1",
"path-browserify": "^1.0.1"
}
},
"node_modules/@vue/compiler-core": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz",
@@ -2320,6 +2402,55 @@
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.0.tgz",
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
},
"node_modules/@vue/language-core": {
"version": "1.8.27",
"resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-1.8.27.tgz",
"integrity": "sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==",
"dev": true,
"dependencies": {
"@volar/language-core": "~1.11.1",
"@volar/source-map": "~1.11.1",
"@vue/compiler-dom": "^3.3.0",
"@vue/shared": "^3.3.0",
"computeds": "^0.0.1",
"minimatch": "^9.0.3",
"muggle-string": "^0.3.1",
"path-browserify": "^1.0.1",
"vue-template-compiler": "^2.7.14"
},
"peerDependencies": {
"typescript": "*"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/@vue/language-core/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/@vue/language-core/node_modules/minimatch": {
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/@vue/reactivity": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.4.tgz",
@@ -2387,6 +2518,12 @@
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.4.tgz",
"integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
},
"node_modules/@vue/tsconfig": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/@vue/tsconfig/-/tsconfig-0.5.1.tgz",
"integrity": "sha512-VcZK7MvpjuTPx2w6blwnwZAu5/LgBUtejFOi3pPGQFXQN5Ela03FUtd2Qtg4yWGGissVL0dr6Ro1LfOFh+PCuQ==",
"dev": true
},
"node_modules/@vuetify/loader-shared": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/@vuetify/loader-shared/-/loader-shared-1.7.1.tgz",
@@ -2686,6 +2823,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/call-me-maybe": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz",
"integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==",
"dev": true
},
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -2695,10 +2838,22 @@
"node": ">=6"
}
},
"node_modules/camelcase": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
"integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001480",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001480.tgz",
"integrity": "sha512-q7cpoPPvZYgtyC4VaBSN0Bt+PJ4c4EYRf0DrduInOz2SkFpHD5p3LnvEpqBp7UnJn+8x1Ogl1s38saUxe+ihQQ==",
"version": "1.0.30001572",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001572.tgz",
"integrity": "sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==",
"dev": true,
"funding": [
{
@@ -2820,6 +2975,12 @@
"integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
"devOptional": true
},
"node_modules/computeds": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/computeds/-/computeds-0.0.1.tgz",
"integrity": "sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==",
"dev": true
},
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -2917,6 +3078,12 @@
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
"integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
},
"node_modules/de-indent": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
"integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==",
"dev": true
},
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -4058,6 +4225,27 @@
"integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==",
"dev": true
},
"node_modules/handlebars": {
"version": "4.7.8",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz",
"integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==",
"dev": true,
"dependencies": {
"minimist": "^1.2.5",
"neo-async": "^2.6.2",
"source-map": "^0.6.1",
"wordwrap": "^1.0.0"
},
"bin": {
"handlebars": "bin/handlebars"
},
"engines": {
"node": ">=0.4.7"
},
"optionalDependencies": {
"uglify-js": "^3.1.4"
}
},
"node_modules/has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
@@ -4139,6 +4327,15 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
"dev": true,
"bin": {
"he": "bin/he"
}
},
"node_modules/idb": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz",
@@ -4600,6 +4797,19 @@
"integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",
"dev": true
},
"node_modules/json-schema-ref-parser": {
"version": "9.0.9",
"resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz",
"integrity": "sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q==",
"deprecated": "Please switch to @apidevtools/json-schema-ref-parser",
"dev": true,
"dependencies": {
"@apidevtools/json-schema-ref-parser": "9.0.9"
},
"engines": {
"node": ">=10"
}
},
"node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
@@ -4828,20 +5038,35 @@
"node": "*"
}
},
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/mitt": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz",
"integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ=="
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
"integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="
},
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/muggle-string": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.3.1.tgz",
"integrity": "sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==",
"dev": true
},
"node_modules/nanoid": {
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.4.tgz",
"integrity": "sha512-vAjmBf13gsmhXSgBrtIclinISzFFy22WwCYoyilZlsrRXNIHSwgFQ1bEdjRwMT3aoadeIF6HMuDRlOxzfXV8ig==",
"funding": [
{
"type": "github",
@@ -4849,10 +5074,10 @@
}
],
"bin": {
"nanoid": "bin/nanoid.cjs"
"nanoid": "bin/nanoid.js"
},
"engines": {
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
"node": "^18 || >=20"
}
},
"node_modules/natural-compare": {
@@ -4861,6 +5086,12 @@
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
"dev": true
},
"node_modules/neo-async": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true
},
"node_modules/node-releases": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz",
@@ -4933,6 +5164,45 @@
"wrappy": "1"
}
},
"node_modules/openapi-typescript-codegen": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/openapi-typescript-codegen/-/openapi-typescript-codegen-0.25.0.tgz",
"integrity": "sha512-nN/TnIcGbP58qYgwEEy5FrAAjePcYgfMaCe3tsmYyTgI3v4RR9v8os14L+LEWDvV50+CmqiyTzRkKKtJeb6Ybg==",
"dev": true,
"dependencies": {
"camelcase": "^6.3.0",
"commander": "^11.0.0",
"fs-extra": "^11.1.1",
"handlebars": "^4.7.7",
"json-schema-ref-parser": "^9.0.9"
},
"bin": {
"openapi": "bin/index.js"
}
},
"node_modules/openapi-typescript-codegen/node_modules/commander": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz",
"integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==",
"dev": true,
"engines": {
"node": ">=16"
}
},
"node_modules/openapi-typescript-codegen/node_modules/fs-extra": {
"version": "11.2.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=14.14"
}
},
"node_modules/optionator": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
@@ -5006,6 +5276,12 @@
"node": ">=6"
}
},
"node_modules/path-browserify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
"integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",
"dev": true
},
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -5210,6 +5486,23 @@
"node": ">=4"
}
},
"node_modules/postcss/node_modules/nanoid": {
"version": "3.3.7",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"bin": {
"nanoid": "bin/nanoid.cjs"
},
"engines": {
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/prelude-ls": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
@@ -5920,6 +6213,12 @@
"punycode": "^2.1.0"
}
},
"node_modules/tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
"dev": true
},
"node_modules/type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@@ -5958,6 +6257,32 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/typescript": {
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
"devOptional": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/uglify-js": {
"version": "3.17.4",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz",
"integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==",
"dev": true,
"optional": true,
"bin": {
"uglifyjs": "bin/uglifyjs"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/unbox-primitive": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
@@ -5973,6 +6298,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"devOptional": true
},
"node_modules/unicode-canonical-property-names-ecmascript": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
@@ -6259,6 +6590,33 @@
"vue": "^3.2.0"
}
},
"node_modules/vue-template-compiler": {
"version": "2.7.16",
"resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz",
"integrity": "sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==",
"dev": true,
"dependencies": {
"de-indent": "^1.0.2",
"he": "^1.2.0"
}
},
"node_modules/vue-tsc": {
"version": "1.8.27",
"resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-1.8.27.tgz",
"integrity": "sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==",
"dev": true,
"dependencies": {
"@volar/typescript": "~1.11.1",
"@vue/language-core": "1.8.27",
"semver": "^7.5.4"
},
"bin": {
"vue-tsc": "bin/vue-tsc.js"
},
"peerDependencies": {
"typescript": "*"
}
},
"node_modules/vuetify": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-3.3.3.tgz",
@@ -6374,6 +6732,12 @@
"node": ">=0.10.0"
}
},
"node_modules/wordwrap": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
"integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==",
"dev": true
},
"node_modules/workbox-background-sync": {
"version": "6.5.4",
"resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.5.4.tgz",

View File

@@ -3,9 +3,11 @@
"private": true,
"scripts": {
"dev": "vite --host",
"build": "vite build",
"build": "npm run typecheck && vite build",
"preview": "vite preview",
"lint": "eslint . --fix"
"lint": "eslint . --fix",
"typecheck": "vue-tsc --noEmit",
"generate": "openapi --input http://localhost:5000/openapi.json --output ./src/__generated__ --client axios --useOptions --useUnionTypes --exportServices false --exportSchemas false --exportCore false"
},
"dependencies": {
"@mdi/font": "7.0.96",
@@ -16,7 +18,8 @@
"js-cookie": "^3.0.5",
"jszip": "^3.10.1",
"lodash": "^4.17.21",
"mitt": "^3.0.0",
"mitt": "^3.0.1",
"nanoid": "^5.0.4",
"pinia": "^2.1.6",
"roboto-fontface": "*",
"socket.io-client": "^4.6.1",
@@ -27,13 +30,22 @@
},
"devDependencies": {
"@types/file-saver": "^2.0.5",
"@types/js-cookie": "^3.0.6",
"@types/lodash": "^4.14.202",
"@types/node": "^20.10.6",
"@types/webfontloader": "^1.6.38",
"@vitejs/plugin-vue": "^3.0.3",
"@vue/tsconfig": "^0.5.1",
"eslint": "^8.22.0",
"eslint-plugin-vue": "^9.3.0",
"openapi-typescript-codegen": "^0.25.0",
"sass": "^1.55.0",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"vite": "^3.2.7",
"vite-plugin-pwa": "^0.14.7",
"vite-plugin-rewrite-all": "^1.0.1",
"vite-plugin-vuetify": "^1.0.0-alpha.12"
"vite-plugin-vuetify": "^1.0.0-alpha.12",
"vue-tsc": "^1.8.27"
}
}

View File

@@ -1,4 +1,4 @@
<script setup>
<script setup lang="ts">
import { onBeforeMount } from "vue";
import cookie from "js-cookie";
import storeAuth from "@/stores/auth";

30
frontend/src/__generated__/index.ts generated Normal file
View File

@@ -0,0 +1,30 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type { Body_token_token_post } from './models/Body_token_token_post';
export type { Body_update_rom_roms__id__patch } from './models/Body_update_rom_roms__id__patch';
export type { Body_update_user_users__user_id__patch } from './models/Body_update_user_users__user_id__patch';
export type { Body_upload_roms_roms_upload_put } from './models/Body_upload_roms_roms_upload_put';
export type { ConfigDict } from './models/ConfigDict';
export type { CursorPage_RomSchema_ } from './models/CursorPage_RomSchema_';
export type { DeletePlatformResponse } from './models/DeletePlatformResponse';
export type { DeleteRomResponse } from './models/DeleteRomResponse';
export type { EnhancedRomSchema } from './models/EnhancedRomSchema';
export type { HeartbeatReturn } from './models/HeartbeatReturn';
export type { HTTPValidationError } from './models/HTTPValidationError';
export type { IGDBRomType } from './models/IGDBRomType';
export type { MassDeleteRomResponse } from './models/MassDeleteRomResponse';
export type { MessageResponse } from './models/MessageResponse';
export type { PlatformSchema } from './models/PlatformSchema';
export type { Role } from './models/Role';
export type { RomSchema } from './models/RomSchema';
export type { RomSearchResponse } from './models/RomSearchResponse';
export type { SchedulerDict } from './models/SchedulerDict';
export type { TaskDict } from './models/TaskDict';
export type { TokenResponse } from './models/TokenResponse';
export type { UploadRomResponse } from './models/UploadRomResponse';
export type { UserSchema } from './models/UserSchema';
export type { ValidationError } from './models/ValidationError';
export type { WatcherDict } from './models/WatcherDict';

View File

@@ -0,0 +1,15 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Body_token_token_post = {
grant_type?: string;
scope?: string;
username?: (string | null);
password?: (string | null);
client_id?: (string | null);
client_secret?: (string | null);
refresh_token?: (string | null);
};

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Body_update_rom_roms__id__patch = {
artwork?: (Blob | null);
};

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Body_update_user_users__user_id__patch = {
avatar?: (Blob | null);
};

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Body_upload_roms_roms_upload_put = {
roms: Array<Blob>;
};

View File

@@ -0,0 +1,15 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ConfigDict = {
EXCLUDED_PLATFORMS: Array<string>;
EXCLUDED_SINGLE_EXT: Array<string>;
EXCLUDED_SINGLE_FILES: Array<string>;
EXCLUDED_MULTI_FILES: Array<string>;
EXCLUDED_MULTI_PARTS_EXT: Array<string>;
EXCLUDED_MULTI_PARTS_FILES: Array<string>;
PLATFORMS_BINDING: Record<string, string>;
};

View File

@@ -0,0 +1,31 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { RomSchema } from './RomSchema';
export type CursorPage_RomSchema_ = {
items: Array<RomSchema>;
/**
* Total items
*/
total?: (number | null);
/**
* Cursor to refetch the current page
*/
current_page?: (string | null);
/**
* Cursor to refetch the current page starting from the last item
*/
current_page_backwards?: (string | null);
/**
* Cursor for the previous page
*/
previous_page?: (string | null);
/**
* Cursor for the next page
*/
next_page?: (string | null);
};

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DeletePlatformResponse = {
msg: string;
};

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DeleteRomResponse = {
msg: string;
};

View File

@@ -0,0 +1,41 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { RomSchema } from './RomSchema';
export type EnhancedRomSchema = {
id: number;
igdb_id: (number | null);
sgdb_id: (number | null);
platform_slug: string;
platform_name: string;
file_name: string;
file_name_no_tags: string;
file_extension: string;
file_path: string;
file_size: number;
file_size_units: string;
file_size_bytes: number;
name: (string | null);
slug: (string | null);
summary: (string | null);
sort_comparator: string;
path_cover_s: string;
path_cover_l: string;
has_cover: boolean;
url_cover: string;
revision: (string | null);
regions: Array<string>;
languages: Array<string>;
tags: Array<string>;
multi: boolean;
files: Array<string>;
url_screenshots: Array<string>;
path_screenshots: Array<string>;
full_path: string;
download_path: string;
sibling_roms: Array<RomSchema>;
};

View File

@@ -0,0 +1,11 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ValidationError } from './ValidationError';
export type HTTPValidationError = {
detail?: Array<ValidationError>;
};

View File

@@ -0,0 +1,17 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ConfigDict } from './ConfigDict';
import type { SchedulerDict } from './SchedulerDict';
import type { WatcherDict } from './WatcherDict';
export type HeartbeatReturn = {
VERSION: string;
ROMM_AUTH_ENABLED: boolean;
WATCHER: WatcherDict;
SCHEDULER: SchedulerDict;
CONFIG: ConfigDict;
};

View File

@@ -0,0 +1,14 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type IGDBRomType = {
igdb_id: number;
slug: string;
name: string;
summary: string;
url_cover: string;
url_screenshots: Array<string>;
};

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type MassDeleteRomResponse = {
msg: string;
};

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type MessageResponse = {
message: string;
};

View File

@@ -0,0 +1,15 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type PlatformSchema = {
slug: string;
fs_slug: string;
igdb_id?: (number | null);
sgdb_id?: (number | null);
name: (string | null);
logo_path: string;
rom_count: number;
};

View File

@@ -0,0 +1,6 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Role = 'viewer' | 'editor' | 'admin';

View File

@@ -0,0 +1,38 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type RomSchema = {
id: number;
igdb_id: (number | null);
sgdb_id: (number | null);
platform_slug: string;
platform_name: string;
file_name: string;
file_name_no_tags: string;
file_extension: string;
file_path: string;
file_size: number;
file_size_units: string;
file_size_bytes: number;
name: (string | null);
slug: (string | null);
summary: (string | null);
sort_comparator: string;
path_cover_s: string;
path_cover_l: string;
has_cover: boolean;
url_cover: string;
revision: (string | null);
regions: Array<string>;
languages: Array<string>;
tags: Array<string>;
multi: boolean;
files: Array<string>;
url_screenshots: Array<string>;
path_screenshots: Array<string>;
full_path: string;
download_path: string;
};

View File

@@ -0,0 +1,12 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { IGDBRomType } from './IGDBRomType';
export type RomSearchResponse = {
msg: string;
roms: Array<IGDBRomType>;
};

View File

@@ -0,0 +1,13 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { TaskDict } from './TaskDict';
export type SchedulerDict = {
RESCAN: TaskDict;
SWITCH_TITLEDB: TaskDict;
MAME_XML: TaskDict;
};

View File

@@ -0,0 +1,12 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type TaskDict = {
ENABLED: boolean;
TITLE: string;
MESSAGE: string;
CRON: string;
};

View File

@@ -0,0 +1,12 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type TokenResponse = {
access_token: string;
refresh_token?: string;
token_type: string;
expires: number;
};

View File

@@ -0,0 +1,10 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type UploadRomResponse = {
uploaded_roms: Array<string>;
skipped_roms: Array<string>;
};

View File

@@ -0,0 +1,16 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Role } from './Role';
export type UserSchema = {
id: number;
username: string;
enabled: boolean;
role: Role;
oauth_scopes: Array<string>;
avatar_path: string;
};

Some files were not shown because too many files have changed in this diff Show More