Skip to content

Conversation

@DevOldSchool
Copy link

Added player count metadata from SS. Displays on game detail screen and added a filter under search for player counts.

Description

AI Assistance Notice
JetBrains Junie free version was used to understand the code base and implement the initial change based on my analysis of the metadata from SS.

I reviewed all changes and rewrote most of them to follow the existing code style.

This change brings in the player count (joueurs) field from the SS endpoint. This data was already available but was not being saved in the ss_metadata field.

The player count field is displayed on the game detail page as "Players" with a clickable filter for the value.

An additional search filter was added for player count to filter games by the selected values.

Note; the player count is defaulted to 1 when no data exists. (An existing library will need a scan to update this value)

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Screenshots (if applicable)

Detail screen:
image

Search filter:
image

image

Questions for reviewers

  • Do I need to add best effort translations for other locales or add the English value in other locales or leave them empty?

…nd added a filter under search for player counts.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @DevOldSchool, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the application's game metadata capabilities by incorporating player count information. It addresses the need to store and display player count data from the SS endpoint, making it visible on game detail pages and enabling users to filter games based on this new criterion. The changes span both backend database schema and API modifications, as well as frontend UI updates to support the new feature.

Highlights

  • Player Count Metadata: Integrated player count metadata from the SS endpoint, which was previously available but not being saved.
  • Display on Game Detail Screen: The player count is now displayed on the game detail page as 'Players', with a clickable filter for the value.
  • Search Filter: An additional search filter has been added, allowing users to filter games by selected player count values.
  • Default Value: The player count is defaulted to '1' when no data exists, ensuring a consistent value.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@DevOldSchool DevOldSchool changed the title Added player count metadata from SS with display and filter feat: Added player count metadata from SS with display and filter Jan 5, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully adds player count metadata from ScreenScraper, including display on the game detail screen and a new search filter. The changes are comprehensive, touching the database, backend API, and frontend components.

My review has identified a few areas for improvement:

  • In the backend, there's a logical inconsistency with the player_counts filter implementation which includes an unused match_all parameter.
  • The database model for RomMetadata has a minor type mismatch for the player_count default value.
  • In the frontend, the new player count filter has a bug where clearing the filter incorrectly applies a default filter. There's also a minor issue in how filter options are populated.

I've provided specific comments and suggestions for each of these points. Overall, this is a great addition to the application's filtering capabilities.

@gantoine gantoine self-requested a review January 5, 2026 02:53
@DevOldSchool DevOldSchool marked this pull request as draft January 5, 2026 03:24
Copy link
Member

@gantoine gantoine left a comment

Choose a reason for hiding this comment

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

good start! can you also integrate IGDB's multiplayer API (https://api-docs.igdb.com/#multiplayer-mode)? es-de also supports a <players> tag with an integer and should be included in gamelist_handler.py

@DevOldSchool
Copy link
Author

good start! can you also integrate IGDB's multiplayer API (https://api-docs.igdb.com/#multiplayer-mode)? es-de also supports a <players> tag with an integer and should be included in gamelist_handler.py

Looks like the gamelist_handler already correctly handles the tag from gamelist.xml.

IGDB data doesn't seem very good.
Here is an example for GTA V where there is no player count for PC listed.

[
  {
    "id": 134709,
    "name": "Grand Theft Auto V"
  },
  {
    "id": 1020,
    "multiplayer_modes": [
      {
        "id": 1045,
        "offlinecoop": false,
        "offlinemax": 0,
        "onlinecoop": true,
        "onlinemax": 0,
        "platform": {
          "id": 9,
          "name": "PlayStation 3"
        }
      },
      {
        "id": 12794,
        "offlinecoop": false,
        "offlinemax": 0,
        "onlinecoop": true,
        "onlinemax": 30,
        "platform": {
          "id": 49,
          "name": "Xbox One"
        }
      },
      {
        "id": 12795,
        "offlinecoop": false,
        "onlinecoop": true,
        "platform": {
          "id": 6,
          "name": "PC (Microsoft Windows)"
        }
      }
    ],
    "name": "Grand Theft Auto V"
  },
  {
    "id": 239064,
    "multiplayer_modes": [
      {
        "id": 24400,
        "offlinecoop": false,
        "onlinecoop": true,
        "onlinemax": 30,
        "platform": {
          "id": 49,
          "name": "Xbox One"
        }
      },
      {
        "id": 24401,
        "offlinecoop": false,
        "onlinecoop": true,
        "onlinemax": 30,
        "platform": {
          "id": 169,
          "name": "Xbox Series X|S"
        }
      }
    ],
    "name": "Grand Theft Auto V"
  }
]

It also introduces online/offline multiplayer concepts which I had not considered as my library is retro consoles.

How should we handle this?

@gantoine
Copy link
Member

gantoine commented Jan 5, 2026

How should we handle this?

Map offlinecoop: true and onlinecoop: true to "2 players", offlinemax of 3 to 3 players, and offlinemax > 4 to 4 player. does that make sense? it's not perfect but should be close enough for our needs.

On that topic, seems mobygames supports "Number of Players Supported" via the API, but we've more or less deprecated it so don't worry about supporting it at the moment.

@DevOldSchool DevOldSchool marked this pull request as ready for review January 7, 2026 03:00
@DevOldSchool
Copy link
Author

How should we handle this?

Map offlinecoop: true and onlinecoop: true to "2 players", offlinemax of 3 to 3 players, and offlinemax > 4 to 4 player. does that make sense? it's not perfect but should be close enough for our needs.

On that topic, seems mobygames supports "Number of Players Supported" via the API, but we've more or less deprecated it so don't worry about supporting it at the moment.

Ended up doing this except for the > 4 logic. I just let it use the max value.

@DevOldSchool
Copy link
Author

@gantoine, can you review again?

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.

2 participants