From 73463563ff4b4096b11c10b890c6a43d66d08618 Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Sat, 21 Dec 2024 18:18:04 -0500 Subject: [PATCH 1/2] Update emulatorjs to 4.2.0 --- frontend/package-lock.json | 16 +++++++++------- frontend/package.json | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 0ae6e067c..e273ef763 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -15,7 +15,7 @@ "axios": "^1.7.4", "core-js": "^3.37.1", "cronstrue": "^2.50.0", - "emulatorjs": "github:emulatorjs/emulatorjs#v4.1.1", + "emulatorjs": "github:emulatorjs/emulatorjs#v4.2.0", "file-saver": "^2.0.5", "js-cookie": "^3.0.5", "jszip": "^3.10.1", @@ -3936,8 +3936,8 @@ }, "node_modules/emulatorjs": { "name": "@emulatorjs/emulatorjs", - "version": "4.0.12", - "resolved": "git+ssh://git@github.com/emulatorjs/emulatorjs.git#a7b59f19a3e9415c2a42121461da3df03b25d3b5", + "version": "4.2.0", + "resolved": "git+ssh://git@github.com/emulatorjs/emulatorjs.git#8d42d53d4fdf0166f71eaa07529cadf93350b76e", "dependencies": { "http-server": "^14.1.1" } @@ -5676,14 +5676,15 @@ "dev": true }, "node_modules/nanoid": { - "version": "5.0.7", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.9.tgz", + "integrity": "sha512-Aooyr6MXU6HpvvWXKoVoXwKMs/KyVakWwg7xQfv5/S/RIgJMy0Ifa45H9qqYy7pTCszrHzP21Uk4PZq2HpEM8Q==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "bin": { "nanoid": "bin/nanoid.js" }, @@ -6089,14 +6090,15 @@ } }, "node_modules/postcss/node_modules/nanoid": { - "version": "3.3.7", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, diff --git a/frontend/package.json b/frontend/package.json index 2d5beb5bb..9f4253f1d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -33,7 +33,7 @@ "axios": "^1.7.4", "core-js": "^3.37.1", "cronstrue": "^2.50.0", - "emulatorjs": "github:emulatorjs/emulatorjs#v4.1.1", + "emulatorjs": "github:emulatorjs/emulatorjs#v4.2.0", "file-saver": "^2.0.5", "js-cookie": "^3.0.5", "jszip": "^3.10.1", From 6e912054ac9ce94ef764402aea5eb6620c2df73f Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Sun, 22 Dec 2024 21:39:06 -0500 Subject: [PATCH 2/2] Expand list of non-hashable platforms --- .github/workflows/build.yml | 18 +++++++++--------- .github/workflows/pytest.yml | 4 ++-- .github/workflows/trunk-check.yml | 2 +- .github/workflows/typecheck.yml | 4 ++-- backend/handler/scan_handler.py | 29 ++++++++++++++++++++++++++++- 5 files changed, 42 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3292e993..99d00e6de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,22 +16,22 @@ jobs: packages: write steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -39,7 +39,7 @@ jobs: - name: Generate Docker metadata id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | name=rommapp/romm @@ -52,14 +52,14 @@ jobs: org.opencontainers.image.version={{version}} org.opencontainers.image.title="rommapp/romm" org.opencontainers.image.description="RomM (ROM Manager) allows you to scan, enrich, and browse your game collection with a clean and responsive interface. With support for multiple platforms, various naming schemes and custom tags, RomM is a must-have for anyone who plays on emulators." - org.opencontainers.image.licenses="GPL-3.0" + org.opencontainers.image.licenses="AGPLv3" - name: Set version run: | sed -i 's//${{ steps.meta.outputs.version }}/' backend/__version__.py - - name: Build image - uses: docker/build-push-action@v4 + - name: Build base image + uses: docker/build-push-action@v6 with: file: docker/Dockerfile context: . diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index ddb70fca6..30b80beab 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -31,7 +31,7 @@ jobs: options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install mariadb connectors run: | @@ -43,7 +43,7 @@ jobs: pipx install poetry - name: Set up Python 3.12 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.12" cache: "poetry" diff --git a/.github/workflows/trunk-check.yml b/.github/workflows/trunk-check.yml index edb56d80c..033b4bea5 100644 --- a/.github/workflows/trunk-check.yml +++ b/.github/workflows/trunk-check.yml @@ -17,6 +17,6 @@ jobs: contents: read # For repo checkout steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Trunk Check uses: trunk-io/trunk-action@v1 diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 80b329205..22a178d6c 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -20,10 +20,10 @@ jobs: pull-requests: write steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: "18" diff --git a/backend/handler/scan_handler.py b/backend/handler/scan_handler.py index 91aa0d137..d1136b0cc 100644 --- a/backend/handler/scan_handler.py +++ b/backend/handler/scan_handler.py @@ -20,7 +20,34 @@ from models.platform import Platform from models.rom import Rom from models.user import User -NON_HASHABLE_PLATFORMS = ["pc", "win", "mac", "linux"] +NON_HASHABLE_PLATFORMS = [ + "pc", + "win", + "mac", + "linux", + "switch", + "ps3", + "ps4", + "ps4--1", + "ps5", + "wiiu", + "xbox-360", + "xboxone", + "series-x", + "android", + "ios", + "ipad", + "amazon-alexa", + "amazon-fire-tv", + "gear-vr", + "meta-quest-2", + "meta-quest-3", + "oculus-go", + "oculus-quest", + "oculus-rift", + "psvr", + "psvr2", +] class ScanType(Enum):