diff --git a/backend/endpoints/responses/rom.py b/backend/endpoints/responses/rom.py index a744c6bd5..e8127c784 100644 --- a/backend/endpoints/responses/rom.py +++ b/backend/endpoints/responses/rom.py @@ -207,7 +207,6 @@ class RomSchema(BaseModel): platform_id: int platform_slug: str platform_fs_slug: str - platform_name: str platform_custom_name: str | None platform_display_name: str diff --git a/backend/endpoints/sockets/scan.py b/backend/endpoints/sockets/scan.py index 9610a85ae..8a15e5aac 100644 --- a/backend/endpoints/sockets/scan.py +++ b/backend/endpoints/sockets/scan.py @@ -379,7 +379,7 @@ async def _identify_platform( await socket_manager.emit( "scan:scanning_platform", PlatformSchema.model_validate(platform).model_dump( - include={"id", "name", "slug", "fs_slug", "is_identified"} + include={"id", "name", "display_name", "slug", "fs_slug", "is_identified"} ), ) await socket_manager.emit("", None) diff --git a/backend/models/rom.py b/backend/models/rom.py index 7d82de394..f1aff5d44 100644 --- a/backend/models/rom.py +++ b/backend/models/rom.py @@ -263,10 +263,6 @@ class Rom(BaseModel): def platform_fs_slug(self) -> str: return self.platform.fs_slug - @property - def platform_name(self) -> str: - return self.platform.name - @property def platform_custom_name(self) -> str | None: return self.platform.custom_name diff --git a/frontend/src/__generated__/models/DetailedRomSchema.ts b/frontend/src/__generated__/models/DetailedRomSchema.ts index f81d1278f..c99588ba8 100644 --- a/frontend/src/__generated__/models/DetailedRomSchema.ts +++ b/frontend/src/__generated__/models/DetailedRomSchema.ts @@ -34,7 +34,6 @@ export type DetailedRomSchema = { platform_id: number; platform_slug: string; platform_fs_slug: string; - platform_name: string; platform_custom_name: (string | null); platform_display_name: string; fs_name: string; diff --git a/frontend/src/__generated__/models/SimpleRomSchema.ts b/frontend/src/__generated__/models/SimpleRomSchema.ts index a3f976587..671f622ff 100644 --- a/frontend/src/__generated__/models/SimpleRomSchema.ts +++ b/frontend/src/__generated__/models/SimpleRomSchema.ts @@ -28,7 +28,6 @@ export type SimpleRomSchema = { platform_id: number; platform_slug: string; platform_fs_slug: string; - platform_name: string; platform_custom_name: (string | null); platform_display_name: string; fs_name: string; diff --git a/frontend/src/components/Details/Title.vue b/frontend/src/components/Details/Title.vue index ed2df4349..ad8be3962 100644 --- a/frontend/src/components/Details/Title.vue +++ b/frontend/src/components/Details/Title.vue @@ -20,7 +20,7 @@ const releaseDate = new Date( }); const platformsStore = storePlatforms(); -const { filteredPlatforms } = storeToRefs(platformsStore); +const { allPlatforms } = storeToRefs(platformsStore); const hashMatches = computed(() => { return [ @@ -81,7 +81,7 @@ const hashMatches = computed(() => { > { >("emitter"); const onFilterChange = debounce( @@ -305,7 +305,7 @@ onMounted(async () => { ); watch( - () => filteredPlatforms.value, + () => allPlatforms.value, async () => setFilters(), { immediate: true }, // Ensure watcher is triggered immediately ); diff --git a/frontend/src/components/Settings/LibraryManagement/Config/PlatformVersions.vue b/frontend/src/components/Settings/LibraryManagement/Config/PlatformVersions.vue index ab32d99d8..68d96a772 100644 --- a/frontend/src/components/Settings/LibraryManagement/Config/PlatformVersions.vue +++ b/frontend/src/components/Settings/LibraryManagement/Config/PlatformVersions.vue @@ -36,10 +36,8 @@ const editable = ref(false); />

- Versions of the same platform. A common example is Capcom Play System - 1 is an arcade system. Platform versions will let you setup a custom - platform for RomM to import and tell RomM which platform it needs to - scrape against. + Platform versions allow you to create custom platform entries for + games that belong to the same system but have different versions.

diff --git a/frontend/src/components/Settings/ServerStats/PlatformsStats.vue b/frontend/src/components/Settings/ServerStats/PlatformsStats.vue index 1d54e18a8..42a3657bd 100644 --- a/frontend/src/components/Settings/ServerStats/PlatformsStats.vue +++ b/frontend/src/components/Settings/ServerStats/PlatformsStats.vue @@ -12,22 +12,22 @@ const props = defineProps<{ }>(); const { t } = useI18n(); const platformsStore = storePlatforms(); -const { filteredPlatforms } = storeToRefs(platformsStore); +const { allPlatforms } = storeToRefs(platformsStore); const orderBy = ref<"name" | "size" | "count">("name"); const sortedPlatforms = computed(() => { - const platforms = [...filteredPlatforms.value]; if (orderBy.value === "size") { - return platforms.sort( + return allPlatforms.value.sort( (a, b) => Number(b.fs_size_bytes) - Number(a.fs_size_bytes), ); } if (orderBy.value === "count") { - return platforms.sort((a, b) => b.rom_count - a.rom_count); + return allPlatforms.value.sort((a, b) => b.rom_count - a.rom_count); } - // Default to name - return platforms.sort((a, b) => - a.name.localeCompare(b.name, undefined, { sensitivity: "base" }), + return allPlatforms.value.sort((a, b) => + a.display_name.localeCompare(b.display_name, undefined, { + sensitivity: "base", + }), ); }); diff --git a/frontend/src/components/common/Game/Card/Base.vue b/frontend/src/components/common/Game/Card/Base.vue index a9d9a1c77..4a680a50c 100644 --- a/frontend/src/components/common/Game/Card/Base.vue +++ b/frontend/src/components/common/Game/Card/Base.vue @@ -311,7 +311,7 @@ onBeforeUnmount(() => { :key="rom.platform_slug" :size="25" :slug="rom.platform_slug" - :name="rom.platform_name" + :name="rom.platform_display_name" :fs-slug="rom.platform_fs_slug" class="ml-1" /> diff --git a/frontend/src/components/common/Navigation/ScanBtn.vue b/frontend/src/components/common/Navigation/ScanBtn.vue index 4b27e304f..864d2c991 100644 --- a/frontend/src/components/common/Navigation/ScanBtn.vue +++ b/frontend/src/components/common/Navigation/ScanBtn.vue @@ -37,13 +37,13 @@ if (!socket.connected) socket.connect(); socket.on( "scan:scanning_platform", ({ - name, + display_name, slug, id, fs_slug, is_identified, }: { - name: string; + display_name: string; slug: string; id: number; fs_slug: string; @@ -51,10 +51,10 @@ socket.on( }) => { scanningStore.set(true); scanningPlatforms.value = scanningPlatforms.value.filter( - (platform) => platform.name !== name, + (platform) => platform.display_name !== display_name, ); scanningPlatforms.value.push({ - name, + display_name, slug, id, fs_slug, @@ -87,7 +87,7 @@ socket.on("scan:scanning_rom", (rom: SimpleRom) => { // Add the platform if the socket dropped and it's missing if (!scannedPlatform) { scanningPlatforms.value.push({ - name: rom.platform_name, + display_name: rom.platform_display_name, slug: rom.platform_slug, id: rom.platform_id, fs_slug: rom.platform_fs_slug, diff --git a/frontend/src/console/Layout.vue b/frontend/src/console/Layout.vue index e97c32714..bb4754435 100644 --- a/frontend/src/console/Layout.vue +++ b/frontend/src/console/Layout.vue @@ -1,6 +1,6 @@ @@ -96,7 +99,7 @@ onMounted(() => { :class="{ '-translate-y-[2px] scale-[1.03] shadow-[0_8px_28px_rgba(0,0,0,0.35),_0_0_0_2px_var(--console-game-card-focus-border),_0_0_16px_var(--console-game-card-focus-border)]': selected, - 'w-[250px] shrink-0': isRecent, + 'w-[250px] shrink-0': continuePlaying, }" @click="emit('click')" @focus="emit('focus')" diff --git a/frontend/src/console/composables/useElementRegistry.ts b/frontend/src/console/composables/useElementRegistry.ts index 7d7464ee6..3420b906d 100644 --- a/frontend/src/console/composables/useElementRegistry.ts +++ b/frontend/src/console/composables/useElementRegistry.ts @@ -25,7 +25,7 @@ export function useElementRegistry() { // Create a shared registry instance for each section export const systemElementRegistry = useElementRegistry(); -export const recentElementRegistry = useElementRegistry(); +export const continuePlayingElementRegistry = useElementRegistry(); export const collectionElementRegistry = useElementRegistry(); export const smartCollectionElementRegistry = useElementRegistry(); export const virtualCollectionElementRegistry = useElementRegistry(); diff --git a/frontend/src/console/views/Game.vue b/frontend/src/console/views/Game.vue index 501930800..0d9adfede 100644 --- a/frontend/src/console/views/Game.vue +++ b/frontend/src/console/views/Game.vue @@ -574,7 +574,7 @@ onUnmounted(() => { }" > {{ - rom.platform_name || + rom.platform_display_name || (rom.platform_slug || "RETRO")?.toString().toUpperCase() }} diff --git a/frontend/src/console/views/GamesList.vue b/frontend/src/console/views/GamesList.vue index 7c77c3e9f..cbd0c5039 100644 --- a/frontend/src/console/views/GamesList.vue +++ b/frontend/src/console/views/GamesList.vue @@ -1,4 +1,5 @@