diff --git a/backend/src/config/__init__.py b/backend/src/config/__init__.py index 5d3d7f6b0..951423ce0 100644 --- a/backend/src/config/__init__.py +++ b/backend/src/config/__init__.py @@ -1,25 +1,23 @@ import os -import pathlib import yaml from yaml.loader import SafeLoader - # Uvicorn DEV_PORT: int = 5000 DEV_HOST: str = "0.0.0.0" # PATHS -LIBRARY_BASE_PATH: str = f"{pathlib.Path(__file__).parent.parent.parent.parent.resolve()}/library" -ROMM_USER_CONFIG_PATH: str = f"{pathlib.Path(__file__).parent.parent.parent.parent.resolve()}/romm/config.yml" - -# ROMM RESERVED FOLDERS -RESERVED_FOLDERS: list = ['resources', 'database'] +LIBRARY_BASE_PATH: str = "/romm/library" +ROMM_USER_CONFIG_PATH: str = "/romm/config.yml" +SQLITE_DB_BASE_PATH: str = "/romm/database" +HIGH_PRIO_STRUCTURE_PATH: str = f"{LIBRARY_BASE_PATH}/roms" +RESOURCES_BASE_PATH: str = "/romm/resources" # DEFAULT RESOURCES DEFAULT_URL_COVER_L: str = "https://images.igdb.com/igdb/image/upload/t_cover_big/nocover.png" -DEFAULT_PATH_COVER_L: str = f"/assets/library/resources/default/cover_l.png" +DEFAULT_PATH_COVER_L: str = f"{RESOURCES_BASE_PATH}/default/cover_l.png" DEFAULT_URL_COVER_S: str = "https://images.igdb.com/igdb/image/upload/t_cover_small/nocover.png" -DEFAULT_PATH_COVER_S: str = f"/assets/library/resources/default/cover_s.png" +DEFAULT_PATH_COVER_S: str = f"{RESOURCES_BASE_PATH}/default/cover_s.png" # IGDB CLIENT_ID: str = os.getenv('CLIENT_ID') diff --git a/backend/src/config/config_loader.py b/backend/src/config/config_loader.py index 6aa703eea..097a2870b 100644 --- a/backend/src/config/config_loader.py +++ b/backend/src/config/config_loader.py @@ -2,7 +2,7 @@ import os import sys from urllib.parse import quote_plus -from config import ROMM_DB_DRIVER, SUPPORTED_DB_DRIVERS, LIBRARY_BASE_PATH +from config import ROMM_DB_DRIVER, SUPPORTED_DB_DRIVERS, SQLITE_DB_BASE_PATH from logger.logger import log @@ -23,9 +23,8 @@ def get_db_engine(): return f"mariadb+mariadbconnector://{DB_USER}:%s@{DB_HOST}:{DB_PORT}/{DB_NAME}" % quote_plus(DB_PASSWD) elif ROMM_DB_DRIVER == 'sqlite': - SQLITE_PATH: str = f"{LIBRARY_BASE_PATH}/database" - if not os.path.exists(SQLITE_PATH): os.makedirs(SQLITE_PATH) - return f"sqlite:////{SQLITE_PATH}/romm.db" + if not os.path.exists(SQLITE_DB_BASE_PATH): os.makedirs(SQLITE_DB_BASE_PATH) + return f"sqlite:////{SQLITE_DB_BASE_PATH}/romm.db" else: log.critical(f"Not supported {ROMM_DB_DRIVER} database") diff --git a/backend/src/handler/db_handler.py b/backend/src/handler/db_handler.py index b8f1f8e52..01f211936 100644 --- a/backend/src/handler/db_handler.py +++ b/backend/src/handler/db_handler.py @@ -1,5 +1,4 @@ import functools -import json from fastapi import HTTPException from sqlalchemy import select diff --git a/backend/src/handler/igdb_handler.py b/backend/src/handler/igdb_handler.py index 5ff4b2646..bb1283a71 100644 --- a/backend/src/handler/igdb_handler.py +++ b/backend/src/handler/igdb_handler.py @@ -64,7 +64,7 @@ class IGDBHandler(): except KeyError: pass - else: + else: #TODO: improve API calls to make only one search_term: str = unidecode.unidecode(file_name_no_tags) if p_igdb_id: try: diff --git a/backend/src/main.py b/backend/src/main.py index 45ca3d2c7..86685396c 100644 --- a/backend/src/main.py +++ b/backend/src/main.py @@ -75,7 +75,7 @@ async def platforms() -> dict: @app.put("/scan") -async def scan(req: Request, overwrite: bool=False) -> dict: +async def scan(req: Request, full_scan: bool=False, overwrite: bool=False) -> dict: """Scan platforms and roms and write them in database.""" log.info("complete scaning...") @@ -84,10 +84,10 @@ async def scan(req: Request, overwrite: bool=False) -> dict: platforms: list[str] = data['platforms'] if data['platforms'] else fs.get_platforms() for p_slug in platforms: platform: Platform = fastapi.scan_platform(p_slug) - roms: list[dict] = fs.get_roms(p_slug) + roms: list[dict] = fs.get_roms(p_slug, full_scan) for rom in roms: fastapi.scan_rom(platform, rom) - dbh.purge_roms(p_slug, roms) + dbh.purge_roms(p_slug, fs.get_roms(p_slug, True)) dbh.purge_platforms(fs.get_platforms()) return {'msg': 'success'} diff --git a/backend/src/utils/fastapi.py b/backend/src/utils/fastapi.py index 43140ffa0..b359b18f1 100644 --- a/backend/src/utils/fastapi.py +++ b/backend/src/utils/fastapi.py @@ -31,7 +31,7 @@ def scan_platform(p_slug: str) -> Platform: platform_attrs: dict = igdbh.get_platform_details(p_slug) platform_attrs['slug'] = p_slug platform_attrs['logo_path'] = '' - platform_attrs['n_roms'] = fs.get_roms(p_slug, only_amount=True) + platform_attrs['n_roms'] = fs.get_roms(p_slug, True, only_amount=True) log.info(f"Platform n_roms: {platform_attrs['n_roms']}") platform = Platform(**platform_attrs) dbh.add_platform(platform) diff --git a/backend/src/utils/fs.py b/backend/src/utils/fs.py index b72cbc9a9..401c302b3 100644 --- a/backend/src/utils/fs.py +++ b/backend/src/utils/fs.py @@ -6,7 +6,8 @@ from pathlib import Path import requests from fastapi import HTTPException -from config import user_config, LIBRARY_BASE_PATH, RESERVED_FOLDERS, DEFAULT_URL_COVER_L, DEFAULT_PATH_COVER_L, DEFAULT_URL_COVER_S, DEFAULT_PATH_COVER_S +from config import user_config, LIBRARY_BASE_PATH, HIGH_PRIO_STRUCTURE_PATH, RESOURCES_BASE_PATH, DEFAULT_URL_COVER_L, DEFAULT_PATH_COVER_L, DEFAULT_URL_COVER_S, DEFAULT_PATH_COVER_S +from handler import dbh from logger.logger import log @@ -35,7 +36,6 @@ def get_platforms() -> list[str]: platforms: list[str] = list(os.walk(f"{LIBRARY_BASE_PATH}/roms"))[0][1] else: platforms: list[str] = list(os.walk(LIBRARY_BASE_PATH))[0][1] - [platforms.remove(reserved) for reserved in RESERVED_FOLDERS if reserved in platforms] try: excluded_folders: list = user_config['exclude']['folders'] try: @@ -52,12 +52,11 @@ def get_platforms() -> list[str]: # ========= Roms utils ========= def _check_folder_structure(p_slug) -> tuple: - if os.path.exists(f"{LIBRARY_BASE_PATH}/roms"): - roms_path: str = f"{LIBRARY_BASE_PATH}/roms/{p_slug}" - roms_files = list(os.walk(f"{LIBRARY_BASE_PATH}/roms/{p_slug}"))[0][2] - else: - roms_path: str = f"{LIBRARY_BASE_PATH}/{p_slug}/roms" - roms_files = list(os.walk(f"{LIBRARY_BASE_PATH}/{p_slug}/roms"))[0][2] + roms_path: str = f"{HIGH_PRIO_STRUCTURE_PATH}/{p_slug}" if os.path.exists(HIGH_PRIO_STRUCTURE_PATH) else f"{LIBRARY_BASE_PATH}/{p_slug}/roms" + try: + roms_files = list(os.walk(roms_path))[0][2] + except IndexError: + roms_files = [] return roms_path, roms_files @@ -91,7 +90,7 @@ def parse_tags(file_name: str) -> tuple: return reg, rev, other_tags -def get_roms(p_slug: str, only_amount: bool = False) -> list[dict]: +def get_roms(p_slug: str, full_scan: bool, only_amount: bool = False) -> list[dict]: """Gets all filesystem roms for a platform Args: @@ -99,22 +98,21 @@ def get_roms(p_slug: str, only_amount: bool = False) -> list[dict]: only_amount: flag to return only amount of roms instead of all info Returns: list with all the filesystem roms for a platform found in the LIBRARY_BASE_PATH. Just the amount of them if only_amount=True """ - try: - roms: list[dict] = [] - roms_path, roms_files = _check_folder_structure(p_slug) - roms_files = _exclude_files(roms_files) + roms: list[dict] = [] + roms_path, roms_files = _check_folder_structure(p_slug) + roms_files = _exclude_files(roms_files) - if only_amount: return len(roms_files) + if only_amount: return len(roms_files) - for rom in roms_files: - file_size: str = str(round(os.stat(f"{roms_path}/{rom}").st_size / (1024 * 1024), 2)) - file_extension: str = rom.split('.')[-1] if '.' in rom else "" - reg, rev, other_tags = parse_tags(rom) - roms.append({'file_name': rom, 'file_path': roms_path, 'file_size': file_size, 'file_extension': file_extension, - 'region': reg, 'revision': rev, 'tags': other_tags}) - log.info(f"Roms found for {p_slug}: {roms}") - except IndexError: - log.warning(f"Roms not found for {p_slug}") + excluded_roms: list[str] = [rom.file_name for rom in dbh.get_roms(p_slug)] + for rom in roms_files: + if rom in excluded_roms and not full_scan: continue + file_size: str = str(round(os.stat(f"{roms_path}/{rom}").st_size / (1024 * 1024), 2)) + file_extension: str = rom.split('.')[-1] if '.' in rom else "" + reg, rev, other_tags = parse_tags(rom) + roms.append({'file_name': rom, 'file_path': roms_path, 'file_size': file_size, 'file_extension': file_extension, + 'region': reg, 'revision': rev, 'tags': other_tags}) + log.info(f"Roms found for {p_slug}: {roms}") if only_amount: return 0 return roms @@ -158,19 +156,19 @@ def _cover_exists(p_slug: str, file_name: str, size: str) -> bool: Returns True if cover exists in filesystem else False """ - logo_path: str = f"{LIBRARY_BASE_PATH}/resources/{p_slug}/{file_name}_{size}.png" + logo_path: str = f"{RESOURCES_BASE_PATH}/{p_slug}/{file_name}_{size}.png" return True if os.path.exists(logo_path) else False def _get_cover_path(p_slug: str, file_name: str, size: str) -> str: - """Returns platform logo filesystem path + """Returns rom cover filesystem path adapted to frontend folder structure Args: p_slug: short name of the platform file_name: name of rom file size: size of the cover -> big as 'l' | small as 's' """ - return f"/assets/library/resources/{p_slug}/{file_name}_{size}.png" + return f"{RESOURCES_BASE_PATH}/{p_slug}/{file_name}_{size}.png" def _store_cover(p_slug: str, file_name: str, url_cover: str, size: str) -> None: @@ -183,7 +181,7 @@ def _store_cover(p_slug: str, file_name: str, url_cover: str, size: str) -> None size: size of the cover -> big as 'l' | small as 's' """ cover_file: str = f"{file_name}_{size}.png" - cover_path: str = f"{LIBRARY_BASE_PATH}/resources/{p_slug}/" + cover_path: str = f"{RESOURCES_BASE_PATH}/{p_slug}/" sizes: dict = {'l': 'big', 's': 'small'} res = requests.get(url_cover.replace('t_thumb', f't_cover_{sizes[size]}'), stream=True) if res.status_code == 200: diff --git a/changelog.md b/changelog.md index 72108e5f1..cbccfa389 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ - Now sqlite database location can be binded to ``/romm/database``. Check [docker-compose](docker/docker-compose.example.yml) example. - Now resources location (games cover) can be binded to ``/romm/resources``. Check [docker-compose](docker/docker-compose.example.yml) example. - More platforms support. Check [platforms support](https://github.com/zurdi15/romm#platforms-support) + - Now RomM version appears in the bottom of the settings panel ## Fixed - Download feature is now fixed for RomM structucture 1 ## Changed diff --git a/docker/Dockerfile b/docker/Dockerfile index 622e322b8..492e3ee57 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -10,7 +10,9 @@ RUN npm run build FROM ubuntu/nginx:1.18-22.04_edge as production-stage COPY --from=front-build-stage /front/dist /var/www/html COPY ./frontend/assets/platforms /var/www/html/assets/platforms -RUN ln -s /library /var/www/html/assets/library +RUN mkdir -p /var/www/html/assets/romm +RUN ln -s /romm/library /var/www/html/assets/romm/library +RUN ln -s /romm/resources /var/www/html/assets/romm/resources # setup backend RUN apt update diff --git a/docker/docker-compose.example.yml b/docker/docker-compose.example.yml index 51d4fd8a4..c9acf4a79 100644 --- a/docker/docker-compose.example.yml +++ b/docker/docker-compose.example.yml @@ -14,8 +14,10 @@ services: - CLIENT_SECRET= - STEAMGRIDDB_API_KEY=WIP volumes: - - '/path/to/library:/library' + - '/path/to/library:/romm/library' + - '/path/to/resources:/romm/resources' - '/path/to/config.yml:/romm/config.yml' + - '/path/to/database:/romm/database' # Only if ROMM_DB_DRIVER='sqlite' or ROMM_DB_DRIVER not exists ports: - '80:80' depends_on: diff --git a/docker/init_scripts/init_back b/docker/init_scripts/init_back index 0f0918fba..8112c1e90 100755 --- a/docker/init_scripts/init_back +++ b/docker/init_scripts/init_back @@ -1,4 +1,4 @@ #!/bin/bash cd /back -uvicorn main:app --proxy-headers --host 0.0.0.0 --port 5000 --workers 2 \ No newline at end of file +uvicorn main:app --proxy-headers --host 0.0.0.0 --port 5000 --workers 3 \ No newline at end of file diff --git a/frontend/.env b/frontend/.env new file mode 100644 index 000000000..5f9286bec --- /dev/null +++ b/frontend/.env @@ -0,0 +1 @@ +VITE_ROMM_VERSION='1.6.1' \ No newline at end of file diff --git a/frontend/assets/platforms/3ds.ico b/frontend/assets/platforms/3ds.ico new file mode 100644 index 000000000..1822d7231 Binary files /dev/null and b/frontend/assets/platforms/3ds.ico differ diff --git a/frontend/assets/platforms/3ds.png b/frontend/assets/platforms/3ds.png deleted file mode 100644 index d77b71dde..000000000 Binary files a/frontend/assets/platforms/3ds.png and /dev/null differ diff --git a/frontend/assets/platforms/amiga.ico b/frontend/assets/platforms/amiga.ico new file mode 100644 index 000000000..a02a6760e Binary files /dev/null and b/frontend/assets/platforms/amiga.ico differ diff --git a/frontend/assets/platforms/amiga.png b/frontend/assets/platforms/amiga.png deleted file mode 100644 index 8987fcf18..000000000 Binary files a/frontend/assets/platforms/amiga.png and /dev/null differ diff --git a/frontend/assets/platforms/arcade.ico b/frontend/assets/platforms/arcade.ico new file mode 100644 index 000000000..98f0a70ff Binary files /dev/null and b/frontend/assets/platforms/arcade.ico differ diff --git a/frontend/assets/platforms/arcade.png b/frontend/assets/platforms/arcade.png deleted file mode 100644 index 5a9165765..000000000 Binary files a/frontend/assets/platforms/arcade.png and /dev/null differ diff --git a/frontend/assets/platforms/atari.ico b/frontend/assets/platforms/atari.ico new file mode 100644 index 000000000..3629bd06c Binary files /dev/null and b/frontend/assets/platforms/atari.ico differ diff --git a/frontend/assets/platforms/atari.png b/frontend/assets/platforms/atari.png deleted file mode 100644 index 03c50376f..000000000 Binary files a/frontend/assets/platforms/atari.png and /dev/null differ diff --git a/frontend/assets/platforms/coleco.ico b/frontend/assets/platforms/coleco.ico new file mode 100644 index 000000000..20ed9be51 Binary files /dev/null and b/frontend/assets/platforms/coleco.ico differ diff --git a/frontend/assets/platforms/coleco.png b/frontend/assets/platforms/coleco.png deleted file mode 100644 index 04dbc00d0..000000000 Binary files a/frontend/assets/platforms/coleco.png and /dev/null differ diff --git a/frontend/assets/platforms/commodore.ico b/frontend/assets/platforms/commodore.ico new file mode 100644 index 000000000..785a08725 Binary files /dev/null and b/frontend/assets/platforms/commodore.ico differ diff --git a/frontend/assets/platforms/commodore.png b/frontend/assets/platforms/commodore.png deleted file mode 100644 index 4f06dc891..000000000 Binary files a/frontend/assets/platforms/commodore.png and /dev/null differ diff --git a/frontend/assets/platforms/cpc.ico b/frontend/assets/platforms/cpc.ico new file mode 100644 index 000000000..bc40324c9 Binary files /dev/null and b/frontend/assets/platforms/cpc.ico differ diff --git a/frontend/assets/platforms/cpc.png b/frontend/assets/platforms/cpc.png deleted file mode 100644 index f93045f5c..000000000 Binary files a/frontend/assets/platforms/cpc.png and /dev/null differ diff --git a/frontend/assets/platforms/cps1.ico b/frontend/assets/platforms/cps1.ico new file mode 100644 index 000000000..d58b6a638 Binary files /dev/null and b/frontend/assets/platforms/cps1.ico differ diff --git a/frontend/assets/platforms/cps1.png b/frontend/assets/platforms/cps1.png deleted file mode 100644 index 814c685cf..000000000 Binary files a/frontend/assets/platforms/cps1.png and /dev/null differ diff --git a/frontend/assets/platforms/cps2.ico b/frontend/assets/platforms/cps2.ico new file mode 100644 index 000000000..5fd476185 Binary files /dev/null and b/frontend/assets/platforms/cps2.ico differ diff --git a/frontend/assets/platforms/cps2.png b/frontend/assets/platforms/cps2.png deleted file mode 100644 index 5256109f1..000000000 Binary files a/frontend/assets/platforms/cps2.png and /dev/null differ diff --git a/frontend/assets/platforms/cps3.ico b/frontend/assets/platforms/cps3.ico new file mode 100644 index 000000000..4f3848e1c Binary files /dev/null and b/frontend/assets/platforms/cps3.ico differ diff --git a/frontend/assets/platforms/cps3.png b/frontend/assets/platforms/cps3.png deleted file mode 100644 index 25bcea947..000000000 Binary files a/frontend/assets/platforms/cps3.png and /dev/null differ diff --git a/frontend/assets/platforms/daphne.ico b/frontend/assets/platforms/daphne.ico new file mode 100644 index 000000000..aeaebbade Binary files /dev/null and b/frontend/assets/platforms/daphne.ico differ diff --git a/frontend/assets/platforms/daphne.png b/frontend/assets/platforms/daphne.png deleted file mode 100644 index 96c8ce7da..000000000 Binary files a/frontend/assets/platforms/daphne.png and /dev/null differ diff --git a/frontend/assets/platforms/dc.ico b/frontend/assets/platforms/dc.ico new file mode 100644 index 000000000..f1e9e1fcf Binary files /dev/null and b/frontend/assets/platforms/dc.ico differ diff --git a/frontend/assets/platforms/dc.png b/frontend/assets/platforms/dc.png deleted file mode 100644 index bf6c9550e..000000000 Binary files a/frontend/assets/platforms/dc.png and /dev/null differ diff --git a/frontend/assets/platforms/dos.ico b/frontend/assets/platforms/dos.ico new file mode 100644 index 000000000..badcb3fcb Binary files /dev/null and b/frontend/assets/platforms/dos.ico differ diff --git a/frontend/assets/platforms/dos.png b/frontend/assets/platforms/dos.png deleted file mode 100644 index f873cc138..000000000 Binary files a/frontend/assets/platforms/dos.png and /dev/null differ diff --git a/frontend/assets/platforms/fairchild.ico b/frontend/assets/platforms/fairchild.ico new file mode 100644 index 000000000..27360b4cd Binary files /dev/null and b/frontend/assets/platforms/fairchild.ico differ diff --git a/frontend/assets/platforms/fairchild.png b/frontend/assets/platforms/fairchild.png deleted file mode 100644 index 29abea634..000000000 Binary files a/frontend/assets/platforms/fairchild.png and /dev/null differ diff --git a/frontend/assets/platforms/fba2012.ico b/frontend/assets/platforms/fba2012.ico new file mode 100644 index 000000000..ff7e0316a Binary files /dev/null and b/frontend/assets/platforms/fba2012.ico differ diff --git a/frontend/assets/platforms/fba2012.png b/frontend/assets/platforms/fba2012.png deleted file mode 100644 index a0549f366..000000000 Binary files a/frontend/assets/platforms/fba2012.png and /dev/null differ diff --git a/frontend/assets/platforms/fbneo.ico b/frontend/assets/platforms/fbneo.ico new file mode 100644 index 000000000..ff7e0316a Binary files /dev/null and b/frontend/assets/platforms/fbneo.ico differ diff --git a/frontend/assets/platforms/fbneo.png b/frontend/assets/platforms/fbneo.png deleted file mode 100644 index a0549f366..000000000 Binary files a/frontend/assets/platforms/fbneo.png and /dev/null differ diff --git a/frontend/assets/platforms/fds.ico b/frontend/assets/platforms/fds.ico new file mode 100644 index 000000000..0ad68ab09 Binary files /dev/null and b/frontend/assets/platforms/fds.ico differ diff --git a/frontend/assets/platforms/fds.png b/frontend/assets/platforms/fds.png deleted file mode 100644 index 0d4d7e651..000000000 Binary files a/frontend/assets/platforms/fds.png and /dev/null differ diff --git a/frontend/assets/platforms/gb.ico b/frontend/assets/platforms/gb.ico new file mode 100644 index 000000000..9ad74561b Binary files /dev/null and b/frontend/assets/platforms/gb.ico differ diff --git a/frontend/assets/platforms/gb.png b/frontend/assets/platforms/gb.png deleted file mode 100644 index efd4134da..000000000 Binary files a/frontend/assets/platforms/gb.png and /dev/null differ diff --git a/frontend/assets/platforms/gba.ico b/frontend/assets/platforms/gba.ico new file mode 100644 index 000000000..046b56ee9 Binary files /dev/null and b/frontend/assets/platforms/gba.ico differ diff --git a/frontend/assets/platforms/gba.png b/frontend/assets/platforms/gba.png deleted file mode 100644 index 303fac218..000000000 Binary files a/frontend/assets/platforms/gba.png and /dev/null differ diff --git a/frontend/assets/platforms/gbc.ico b/frontend/assets/platforms/gbc.ico new file mode 100644 index 000000000..bd795fbc1 Binary files /dev/null and b/frontend/assets/platforms/gbc.ico differ diff --git a/frontend/assets/platforms/gbc.png b/frontend/assets/platforms/gbc.png deleted file mode 100644 index d53d7af18..000000000 Binary files a/frontend/assets/platforms/gbc.png and /dev/null differ diff --git a/frontend/assets/platforms/genesis-slash-megadrive.ico b/frontend/assets/platforms/genesis-slash-megadrive.ico new file mode 100644 index 000000000..cee06625f Binary files /dev/null and b/frontend/assets/platforms/genesis-slash-megadrive.ico differ diff --git a/frontend/assets/platforms/genesis-slash-megadrive.png b/frontend/assets/platforms/genesis-slash-megadrive.png deleted file mode 100644 index f159f461d..000000000 Binary files a/frontend/assets/platforms/genesis-slash-megadrive.png and /dev/null differ diff --git a/frontend/assets/platforms/gg.ico b/frontend/assets/platforms/gg.ico new file mode 100644 index 000000000..456949389 Binary files /dev/null and b/frontend/assets/platforms/gg.ico differ diff --git a/frontend/assets/platforms/gg.png b/frontend/assets/platforms/gg.png deleted file mode 100644 index 154fb6d3f..000000000 Binary files a/frontend/assets/platforms/gg.png and /dev/null differ diff --git a/frontend/assets/platforms/gw.ico b/frontend/assets/platforms/gw.ico new file mode 100644 index 000000000..e32ddd906 Binary files /dev/null and b/frontend/assets/platforms/gw.ico differ diff --git a/frontend/assets/platforms/gw.png b/frontend/assets/platforms/gw.png deleted file mode 100644 index db4ac8c1b..000000000 Binary files a/frontend/assets/platforms/gw.png and /dev/null differ diff --git a/frontend/assets/platforms/intellivision.ico b/frontend/assets/platforms/intellivision.ico new file mode 100644 index 000000000..2939b1feb Binary files /dev/null and b/frontend/assets/platforms/intellivision.ico differ diff --git a/frontend/assets/platforms/intellivision.png b/frontend/assets/platforms/intellivision.png deleted file mode 100644 index 21f7e77df..000000000 Binary files a/frontend/assets/platforms/intellivision.png and /dev/null differ diff --git a/frontend/assets/platforms/jaguar.ico b/frontend/assets/platforms/jaguar.ico new file mode 100644 index 000000000..8deb111b8 Binary files /dev/null and b/frontend/assets/platforms/jaguar.ico differ diff --git a/frontend/assets/platforms/jaguar.png b/frontend/assets/platforms/jaguar.png deleted file mode 100644 index aabb6e3ef..000000000 Binary files a/frontend/assets/platforms/jaguar.png and /dev/null differ diff --git a/frontend/assets/platforms/lynx.ico b/frontend/assets/platforms/lynx.ico new file mode 100644 index 000000000..bdc20d86b Binary files /dev/null and b/frontend/assets/platforms/lynx.ico differ diff --git a/frontend/assets/platforms/lynx.png b/frontend/assets/platforms/lynx.png deleted file mode 100644 index d9d7fe04b..000000000 Binary files a/frontend/assets/platforms/lynx.png and /dev/null differ diff --git a/frontend/assets/platforms/md.ico b/frontend/assets/platforms/md.ico new file mode 100644 index 000000000..e2d5a7ad2 Binary files /dev/null and b/frontend/assets/platforms/md.ico differ diff --git a/frontend/assets/platforms/md.png b/frontend/assets/platforms/md.png deleted file mode 100644 index 344b9d2ad..000000000 Binary files a/frontend/assets/platforms/md.png and /dev/null differ diff --git a/frontend/assets/platforms/megaduck.ico b/frontend/assets/platforms/megaduck.ico new file mode 100644 index 000000000..265af75ff Binary files /dev/null and b/frontend/assets/platforms/megaduck.ico differ diff --git a/frontend/assets/platforms/megaduck.png b/frontend/assets/platforms/megaduck.png deleted file mode 100644 index 34f94bf22..000000000 Binary files a/frontend/assets/platforms/megaduck.png and /dev/null differ diff --git a/frontend/assets/platforms/ms.ico b/frontend/assets/platforms/ms.ico new file mode 100644 index 000000000..a64f3177c Binary files /dev/null and b/frontend/assets/platforms/ms.ico differ diff --git a/frontend/assets/platforms/ms.png b/frontend/assets/platforms/ms.png deleted file mode 100644 index f6861b164..000000000 Binary files a/frontend/assets/platforms/ms.png and /dev/null differ diff --git a/frontend/assets/platforms/msx.ico b/frontend/assets/platforms/msx.ico new file mode 100644 index 000000000..fa05214e6 Binary files /dev/null and b/frontend/assets/platforms/msx.ico differ diff --git a/frontend/assets/platforms/msx.png b/frontend/assets/platforms/msx.png deleted file mode 100644 index bef3697cd..000000000 Binary files a/frontend/assets/platforms/msx.png and /dev/null differ diff --git a/frontend/assets/platforms/n64.ico b/frontend/assets/platforms/n64.ico new file mode 100644 index 000000000..25458be47 Binary files /dev/null and b/frontend/assets/platforms/n64.ico differ diff --git a/frontend/assets/platforms/n64.png b/frontend/assets/platforms/n64.png deleted file mode 100644 index b2292c872..000000000 Binary files a/frontend/assets/platforms/n64.png and /dev/null differ diff --git a/frontend/assets/platforms/nds.ico b/frontend/assets/platforms/nds.ico new file mode 100644 index 000000000..2197573b9 Binary files /dev/null and b/frontend/assets/platforms/nds.ico differ diff --git a/frontend/assets/platforms/nds.png b/frontend/assets/platforms/nds.png deleted file mode 100644 index 753e0997e..000000000 Binary files a/frontend/assets/platforms/nds.png and /dev/null differ diff --git a/frontend/assets/platforms/neocd.ico b/frontend/assets/platforms/neocd.ico new file mode 100644 index 000000000..0a1d94fb1 Binary files /dev/null and b/frontend/assets/platforms/neocd.ico differ diff --git a/frontend/assets/platforms/neocd.png b/frontend/assets/platforms/neocd.png deleted file mode 100644 index 30c5c8ba8..000000000 Binary files a/frontend/assets/platforms/neocd.png and /dev/null differ diff --git a/frontend/assets/platforms/neogeo.ico b/frontend/assets/platforms/neogeo.ico new file mode 100644 index 000000000..8943904d5 Binary files /dev/null and b/frontend/assets/platforms/neogeo.ico differ diff --git a/frontend/assets/platforms/neogeo.png b/frontend/assets/platforms/neogeo.png deleted file mode 100644 index 83f3bd7d9..000000000 Binary files a/frontend/assets/platforms/neogeo.png and /dev/null differ diff --git a/frontend/assets/platforms/nes.ico b/frontend/assets/platforms/nes.ico new file mode 100644 index 000000000..e6fb0217e Binary files /dev/null and b/frontend/assets/platforms/nes.ico differ diff --git a/frontend/assets/platforms/nes.png b/frontend/assets/platforms/nes.png deleted file mode 100644 index 81b7772fa..000000000 Binary files a/frontend/assets/platforms/nes.png and /dev/null differ diff --git a/frontend/assets/platforms/ngc.ico b/frontend/assets/platforms/ngc.ico new file mode 100644 index 000000000..034c7709c Binary files /dev/null and b/frontend/assets/platforms/ngc.ico differ diff --git a/frontend/assets/platforms/ngc.png b/frontend/assets/platforms/ngc.png deleted file mode 100644 index 9c7ed84c4..000000000 Binary files a/frontend/assets/platforms/ngc.png and /dev/null differ diff --git a/frontend/assets/platforms/ngp.ico b/frontend/assets/platforms/ngp.ico new file mode 100644 index 000000000..eb43fd7cf Binary files /dev/null and b/frontend/assets/platforms/ngp.ico differ diff --git a/frontend/assets/platforms/ngp.png b/frontend/assets/platforms/ngp.png deleted file mode 100644 index 5bf84f2d1..000000000 Binary files a/frontend/assets/platforms/ngp.png and /dev/null differ diff --git a/frontend/assets/platforms/odyssey.ico b/frontend/assets/platforms/odyssey.ico new file mode 100644 index 000000000..ed6e31666 Binary files /dev/null and b/frontend/assets/platforms/odyssey.ico differ diff --git a/frontend/assets/platforms/odyssey.png b/frontend/assets/platforms/odyssey.png deleted file mode 100644 index 06c2ea2be..000000000 Binary files a/frontend/assets/platforms/odyssey.png and /dev/null differ diff --git a/frontend/assets/platforms/pce.ico b/frontend/assets/platforms/pce.ico new file mode 100644 index 000000000..7a17f7b16 Binary files /dev/null and b/frontend/assets/platforms/pce.ico differ diff --git a/frontend/assets/platforms/pce.png b/frontend/assets/platforms/pce.png deleted file mode 100644 index 3857a2805..000000000 Binary files a/frontend/assets/platforms/pce.png and /dev/null differ diff --git a/frontend/assets/platforms/pcecd.ico b/frontend/assets/platforms/pcecd.ico new file mode 100644 index 000000000..07555b46a Binary files /dev/null and b/frontend/assets/platforms/pcecd.ico differ diff --git a/frontend/assets/platforms/pcecd.png b/frontend/assets/platforms/pcecd.png deleted file mode 100644 index fae7573c5..000000000 Binary files a/frontend/assets/platforms/pcecd.png and /dev/null differ diff --git a/frontend/assets/platforms/pico.ico b/frontend/assets/platforms/pico.ico new file mode 100644 index 000000000..272b5c0a3 Binary files /dev/null and b/frontend/assets/platforms/pico.ico differ diff --git a/frontend/assets/platforms/pico.png b/frontend/assets/platforms/pico.png deleted file mode 100644 index 07217c983..000000000 Binary files a/frontend/assets/platforms/pico.png and /dev/null differ diff --git a/frontend/assets/platforms/poke.ico b/frontend/assets/platforms/poke.ico new file mode 100644 index 000000000..71c1f31e3 Binary files /dev/null and b/frontend/assets/platforms/poke.ico differ diff --git a/frontend/assets/platforms/poke.png b/frontend/assets/platforms/poke.png deleted file mode 100644 index 2d905e2c8..000000000 Binary files a/frontend/assets/platforms/poke.png and /dev/null differ diff --git a/frontend/assets/platforms/ps.ico b/frontend/assets/platforms/ps.ico new file mode 100644 index 000000000..b50e4eeb5 Binary files /dev/null and b/frontend/assets/platforms/ps.ico differ diff --git a/frontend/assets/platforms/ps.png b/frontend/assets/platforms/ps.png deleted file mode 100644 index f1bc8cec6..000000000 Binary files a/frontend/assets/platforms/ps.png and /dev/null differ diff --git a/frontend/assets/platforms/ps2.ico b/frontend/assets/platforms/ps2.ico new file mode 100644 index 000000000..a979d1074 Binary files /dev/null and b/frontend/assets/platforms/ps2.ico differ diff --git a/frontend/assets/platforms/ps2.png b/frontend/assets/platforms/ps2.png deleted file mode 100644 index fab335350..000000000 Binary files a/frontend/assets/platforms/ps2.png and /dev/null differ diff --git a/frontend/assets/platforms/ps3.ico b/frontend/assets/platforms/ps3.ico new file mode 100644 index 000000000..1bdf0e0cf Binary files /dev/null and b/frontend/assets/platforms/ps3.ico differ diff --git a/frontend/assets/platforms/ps4.ico b/frontend/assets/platforms/ps4.ico new file mode 100644 index 000000000..fa48f9536 Binary files /dev/null and b/frontend/assets/platforms/ps4.ico differ diff --git a/frontend/assets/platforms/psp.ico b/frontend/assets/platforms/psp.ico new file mode 100644 index 000000000..c7afba68a Binary files /dev/null and b/frontend/assets/platforms/psp.ico differ diff --git a/frontend/assets/platforms/psp.png b/frontend/assets/platforms/psp.png deleted file mode 100644 index 795d669d5..000000000 Binary files a/frontend/assets/platforms/psp.png and /dev/null differ diff --git a/frontend/assets/platforms/psvita.ico b/frontend/assets/platforms/psvita.ico new file mode 100644 index 000000000..53ddac4a4 Binary files /dev/null and b/frontend/assets/platforms/psvita.ico differ diff --git a/frontend/assets/platforms/scummvm.ico b/frontend/assets/platforms/scummvm.ico new file mode 100644 index 000000000..c1da1da3b Binary files /dev/null and b/frontend/assets/platforms/scummvm.ico differ diff --git a/frontend/assets/platforms/scummvm.png b/frontend/assets/platforms/scummvm.png deleted file mode 100644 index d177d04eb..000000000 Binary files a/frontend/assets/platforms/scummvm.png and /dev/null differ diff --git a/frontend/assets/platforms/segacd.ico b/frontend/assets/platforms/segacd.ico new file mode 100644 index 000000000..af0e4d620 Binary files /dev/null and b/frontend/assets/platforms/segacd.ico differ diff --git a/frontend/assets/platforms/segacd.png b/frontend/assets/platforms/segacd.png deleted file mode 100644 index f159f461d..000000000 Binary files a/frontend/assets/platforms/segacd.png and /dev/null differ diff --git a/frontend/assets/platforms/segasgone.ico b/frontend/assets/platforms/segasgone.ico new file mode 100644 index 000000000..6b9f5f71d Binary files /dev/null and b/frontend/assets/platforms/segasgone.ico differ diff --git a/frontend/assets/platforms/segasgone.png b/frontend/assets/platforms/segasgone.png deleted file mode 100644 index c2aebae10..000000000 Binary files a/frontend/assets/platforms/segasgone.png and /dev/null differ diff --git a/frontend/assets/platforms/sgb.ico b/frontend/assets/platforms/sgb.ico new file mode 100644 index 000000000..1a6025ca6 Binary files /dev/null and b/frontend/assets/platforms/sgb.ico differ diff --git a/frontend/assets/platforms/sgb.png b/frontend/assets/platforms/sgb.png deleted file mode 100644 index bab09262c..000000000 Binary files a/frontend/assets/platforms/sgb.png and /dev/null differ diff --git a/frontend/assets/platforms/sgfx.ico b/frontend/assets/platforms/sgfx.ico new file mode 100644 index 000000000..99f1f49d4 Binary files /dev/null and b/frontend/assets/platforms/sgfx.ico differ diff --git a/frontend/assets/platforms/sgfx.png b/frontend/assets/platforms/sgfx.png deleted file mode 100644 index edf6d590c..000000000 Binary files a/frontend/assets/platforms/sgfx.png and /dev/null differ diff --git a/frontend/assets/platforms/snes.ico b/frontend/assets/platforms/snes.ico new file mode 100644 index 000000000..92740223e Binary files /dev/null and b/frontend/assets/platforms/snes.ico differ diff --git a/frontend/assets/platforms/snes.png b/frontend/assets/platforms/snes.png deleted file mode 100644 index e11237ded..000000000 Binary files a/frontend/assets/platforms/snes.png and /dev/null differ diff --git a/frontend/assets/platforms/snes_alt.ico b/frontend/assets/platforms/snes_alt.ico new file mode 100644 index 000000000..be5f9b58a Binary files /dev/null and b/frontend/assets/platforms/snes_alt.ico differ diff --git a/frontend/assets/platforms/snes_alt.png b/frontend/assets/platforms/snes_alt.png deleted file mode 100644 index b39408e28..000000000 Binary files a/frontend/assets/platforms/snes_alt.png and /dev/null differ diff --git a/frontend/assets/platforms/supervision.ico b/frontend/assets/platforms/supervision.ico new file mode 100644 index 000000000..281721cd2 Binary files /dev/null and b/frontend/assets/platforms/supervision.ico differ diff --git a/frontend/assets/platforms/supervision.png b/frontend/assets/platforms/supervision.png deleted file mode 100644 index ef023d899..000000000 Binary files a/frontend/assets/platforms/supervision.png and /dev/null differ diff --git a/frontend/assets/platforms/switch.ico b/frontend/assets/platforms/switch.ico new file mode 100644 index 000000000..7cd3fc6ad Binary files /dev/null and b/frontend/assets/platforms/switch.ico differ diff --git a/frontend/assets/platforms/switch.png b/frontend/assets/platforms/switch.png deleted file mode 100644 index 23d97c3b9..000000000 Binary files a/frontend/assets/platforms/switch.png and /dev/null differ diff --git a/frontend/assets/platforms/tic.ico b/frontend/assets/platforms/tic.ico new file mode 100644 index 000000000..6ba77c719 Binary files /dev/null and b/frontend/assets/platforms/tic.ico differ diff --git a/frontend/assets/platforms/tic.png b/frontend/assets/platforms/tic.png deleted file mode 100644 index f70106ca5..000000000 Binary files a/frontend/assets/platforms/tic.png and /dev/null differ diff --git a/frontend/assets/platforms/vb.ico b/frontend/assets/platforms/vb.ico new file mode 100644 index 000000000..cd8c263d8 Binary files /dev/null and b/frontend/assets/platforms/vb.ico differ diff --git a/frontend/assets/platforms/vb.png b/frontend/assets/platforms/vb.png deleted file mode 100644 index 641f31cd3..000000000 Binary files a/frontend/assets/platforms/vb.png and /dev/null differ diff --git a/frontend/assets/platforms/vectrex.ico b/frontend/assets/platforms/vectrex.ico new file mode 100644 index 000000000..41540949c Binary files /dev/null and b/frontend/assets/platforms/vectrex.ico differ diff --git a/frontend/assets/platforms/vectrex.png b/frontend/assets/platforms/vectrex.png deleted file mode 100644 index bf6cb769c..000000000 Binary files a/frontend/assets/platforms/vectrex.png and /dev/null differ diff --git a/frontend/assets/platforms/videopac.ico b/frontend/assets/platforms/videopac.ico new file mode 100644 index 000000000..5947f0d19 Binary files /dev/null and b/frontend/assets/platforms/videopac.ico differ diff --git a/frontend/assets/platforms/videopac.png b/frontend/assets/platforms/videopac.png deleted file mode 100644 index 7c9a7871c..000000000 Binary files a/frontend/assets/platforms/videopac.png and /dev/null differ diff --git a/frontend/assets/platforms/wii.ico b/frontend/assets/platforms/wii.ico new file mode 100644 index 000000000..1e0cd036e Binary files /dev/null and b/frontend/assets/platforms/wii.ico differ diff --git a/frontend/assets/platforms/wii.png b/frontend/assets/platforms/wii.png deleted file mode 100644 index cd73e9c6e..000000000 Binary files a/frontend/assets/platforms/wii.png and /dev/null differ diff --git a/frontend/assets/platforms/wiiu.ico b/frontend/assets/platforms/wiiu.ico new file mode 100644 index 000000000..9047bc408 Binary files /dev/null and b/frontend/assets/platforms/wiiu.ico differ diff --git a/frontend/assets/platforms/win.ico b/frontend/assets/platforms/win.ico new file mode 100644 index 000000000..f9b4e6c0c Binary files /dev/null and b/frontend/assets/platforms/win.ico differ diff --git a/frontend/assets/platforms/win.png b/frontend/assets/platforms/win.png deleted file mode 100644 index f5f9dec25..000000000 Binary files a/frontend/assets/platforms/win.png and /dev/null differ diff --git a/frontend/assets/platforms/ws.ico b/frontend/assets/platforms/ws.ico new file mode 100644 index 000000000..8382e0341 Binary files /dev/null and b/frontend/assets/platforms/ws.ico differ diff --git a/frontend/assets/platforms/ws.png b/frontend/assets/platforms/ws.png deleted file mode 100644 index 799a676b1..000000000 Binary files a/frontend/assets/platforms/ws.png and /dev/null differ diff --git a/frontend/assets/platforms/xbox.ico b/frontend/assets/platforms/xbox.ico new file mode 100644 index 000000000..1f87c5d8f Binary files /dev/null and b/frontend/assets/platforms/xbox.ico differ diff --git a/frontend/assets/platforms/xbox360.ico b/frontend/assets/platforms/xbox360.ico new file mode 100644 index 000000000..c0b6bbb07 Binary files /dev/null and b/frontend/assets/platforms/xbox360.ico differ diff --git a/frontend/assets/platforms/xboxone.ico b/frontend/assets/platforms/xboxone.ico new file mode 100644 index 000000000..8af93d4e3 Binary files /dev/null and b/frontend/assets/platforms/xboxone.ico differ diff --git a/frontend/assets/romm.ico b/frontend/assets/romm.ico new file mode 100644 index 000000000..73eb89e90 Binary files /dev/null and b/frontend/assets/romm.ico differ diff --git a/frontend/index.html b/frontend/index.html index c65e8c105..61beb32ea 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -5,7 +5,7 @@ - Rom Manager + RomM diff --git a/frontend/package-lock.json b/frontend/package-lock.json index ad25dda16..58572f303 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { - "name": "vuetify-project", - "version": "0.0.0", + "name": "romm", + "version": "1.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "vuetify-project", - "version": "0.0.0", + "name": "romm", + "version": "1.2.2", "dependencies": { "@mdi/font": "7.0.96", "axios": "^1.3.4", diff --git a/frontend/package.json b/frontend/package.json index d376bc6c8..09840bc24 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "romm", - "version": "1.2.2", + "version": "1.6.1", "private": true, "scripts": { "dev": "vite --host", diff --git a/frontend/src/components/Navigation.vue b/frontend/src/components/Navigation.vue index e047f766f..dcbe38d2a 100644 --- a/frontend/src/components/Navigation.vue +++ b/frontend/src/components/Navigation.vue @@ -10,6 +10,7 @@ const currentPlatform = ref(JSON.parse(localStorage.getItem('currentPlatform')) const platformsToScan = ref([]) const scanning = ref(false) const scanOverwrite = ref(false) +const fullScan = ref(false) const gettingRomsFlag = ref(false) const filter = ref('') const drawer = ref(null) @@ -19,6 +20,7 @@ const theme = useTheme() const darkMode = (localStorage.getItem('theme') == 'light') ? ref(false) : ref(true) const router = useRouter() const { mobile } = useDisplay() +const ROMM_VERSION = import.meta.env.VITE_ROMM_VERSION // Event listeners bus const emitter = inject('emitter') @@ -33,7 +35,7 @@ async function scan() { toRaw(platformsToScan)._rawValue.forEach(p => {platforms.push(toRaw(p.slug))}) console.log(platforms) - await axios.put('/api/scan?overwrite='+scanOverwrite.value,{ + await axios.put('/api/scan?overwrite='+scanOverwrite.value+'&full_scan='+fullScan.value,{ platforms: platforms }).then((response) => { console.log("scan completed") @@ -103,19 +105,29 @@ getPlatforms() - - -

Scan

-

Scanning

- -
+ + + + +

Scan

+ +
+
+ + + +
@@ -127,15 +139,15 @@ getPlatforms() - + - ROM MANAGER + RomM - + @@ -160,7 +172,7 @@ getPlatforms() @:click="selectPlatform(platform)" class="pt-4 pb-4"> {{ rail ? '' : platform.name }}