diff --git a/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue b/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue index 5b567d855..31667d12c 100644 --- a/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue +++ b/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue @@ -44,6 +44,31 @@ const aspectRatioOptions = computed(() => [ size: 3 / 4, source: "IGDB / MobyGames", }, + { + name: "0.71 / 1", + size: 0.71 / 1, + source: "DVD", + }, + { + name: "0.79 / 1", + size: 0.79 / 1, + source: "Blu-ray (Full artwork)", + }, + { + name: "0.87 / 1", + size: 0.87 / 1, + source: "Blu-ray (Plastic header)", + }, + { + name: "1.08 / 1", + size: 1.08 / 1, + source: "Nintendo DS / 3DS", + }, + { + name: "0.58 / 1", + size: 0.58 / 1, + source: "PSP", + }, { name: "1 / 1", size: 1 / 1, diff --git a/frontend/src/stores/galleryView.ts b/frontend/src/stores/galleryView.ts index bacbf6d61..f19e918c4 100644 --- a/frontend/src/stores/galleryView.ts +++ b/frontend/src/stores/galleryView.ts @@ -46,10 +46,14 @@ export default defineStore("galleryView", { const platformsStore = storePlatforms(); const platform = platformId ? platformsStore.get(platformId) : null; if (platform?.aspect_ratio) { - return ( - parseInt(platform.aspect_ratio.split("/")[0]) / - parseInt(platform.aspect_ratio.split("/")[1]) - ); + const ratioParts = platform.aspect_ratio.match(/\d+(?:\.\d+)?/g); + if (ratioParts && ratioParts.length >= 2) { + const width = Number(ratioParts[0]); + const height = Number(ratioParts[1]); + if (Number.isFinite(width) && Number.isFinite(height) && height !== 0) { + return width / height; + } + } } return this.defaultAspectRatio;