Skip to content

Conversation

@laylafogiel-hash
Copy link
Contributor

  • Make sure to get images with reasonable resolution. By default the url igdb returns is in "t_thumb" size, an image of size 90x90, which is good only for the icon, but bad for pretty much else. This commit will make sure covers will be of size "t_cover_big", artworks of 1080p height (i.e. "t_1080p") and logos will have their original size ("t_original"). Maybe "t_logo_med" is more appropriate?

  • Fetch screenshots as well.

  • Use a separate image for icon and for cover. icon needs to be a square, and can be of low resolution, so the "t_thmb" size is more appropriate for him.

  • If there is a storyline for a game use it as a short description.

    * Make sure to get images with reasonable resolution.
      By default the url igdb returns is in "t_thumb" size,
      an image of size 90x90, which is good only for the icon,
      but bad for pretty much else. This commit will make sure
      covers will be of size "t_cover_big", artworks of 1080p
      height (i.e. "t_1080p") and logos will have their original
      size ("t_original"). Maybe "t_logo_med" is more appropriate?

    * Fetch screenshots as well.

    * Use a separate image for icon and for cover.
      icon needs to be a square, and can be of low
      resolution, so the "t_thmb" size is more appropriate
      for him.

    * If there is a storyline for a game use it as a short
      description.
Comment on lines -374 to +381
const images = [icon];
const images = [coverID];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to include the icon in the images array as that's meant to include every imagine iirc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not included in the other metadata fetchers :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If icon isn't used anywhere then can you remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used in the return value of fetchgame(), but it is not part of the images array. The icons are used in the side menu of the library page
image
and as a browser tab icon in a game page inside the store
image
If the icon was part of the images array it would appear together with the other images as an option to add it to carousel, which is not very useful IMO.

id: currentGame.id.toString(),
name: currentGame.name,
shortDescription: deck,
shortDescription: currentGame.storyline ?? deck,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is storyline more likely to be a shorter block of text? Also can you give a quick example of it for a game?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, in the examples I checked originally the storyline is about the same length, although a bit shorter:

but then:

and arguably in the last two examples the text is not really a story. Given the large content of the story in the last example, maybe a test to see which is shorter should be done?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It honestly seems like both the story and description are equally bad options for a short explanation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a better idea than checking which one is longer and trimming to make sure the description is not too long. Any suggestions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe?? Since the api call gets both, why not compare their lengths and use the shortest one?

@DecDuck
Copy link
Member

DecDuck commented Oct 13, 2025

@Huskydog9988 is this okay to merge?

@Huskydog9988
Copy link
Contributor

I haven't had time to test this, but assuming it works I'm fine with it.

@DecDuck DecDuck merged commit b20d355 into Drop-OSS:develop Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants