From 246c97ccc9ed63f07469cc6cc54f04b644147954 Mon Sep 17 00:00:00 2001 From: Hicks-99 <94490389+Hicks-99@users.noreply.github.com> Date: Fri, 21 Nov 2025 12:27:36 +0100 Subject: [PATCH] Add additional content screenshots for Steam provider (#284) --- server/internal/metadata/steam.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/server/internal/metadata/steam.ts b/server/internal/metadata/steam.ts index 5cee2a9..7caa8db 100644 --- a/server/internal/metadata/steam.ts +++ b/server/internal/metadata/steam.ts @@ -117,6 +117,10 @@ interface SteamAppDetailsLarge extends SteamAppDetailsSmall { filename: string; ordinal: number; }[]; + mature_content_screenshots: { + filename: string; + ordinal: number; + }[]; }; full_description: string; } @@ -689,16 +693,20 @@ export class SteamProvider implements MetadataProvider { context?.progress(40); const images = [cover, banner]; - const screenshotCount = game.screenshots?.all_ages_screenshots?.length || 0; - context?.logger.info(`Processing ${screenshotCount} screenshots...`); - for (const image of game.screenshots?.all_ages_screenshots || []) { + const screenshots = game.screenshots?.all_ages_screenshots || []; + screenshots.push(...(game.screenshots?.mature_content_screenshots || [])); + screenshots.sort((a, b) => a.ordinal - b.ordinal); + + context?.logger.info(`Processing ${screenshots.length} screenshots...`); + + for (const image of screenshots) { const imageUrl = this._getImageUrl(image.filename); images.push(createObject(imageUrl)); } context?.logger.info( - `Image processing complete: icon, cover, banner and ${screenshotCount} screenshots`, + `Image processing complete: icon, cover, banner and ${screenshots.length} screenshots`, ); context?.progress(50);