Skip to content

add game slugs and playtime support for them - #1186

Open
itzTheMeow wants to merge 1 commit into
mmatyas:masterfrom
itzTheMeow:game-slug-pr
Open

add game slugs and playtime support for them#1186
itzTheMeow wants to merge 1 commit into
mmatyas:masterfrom
itzTheMeow:game-slug-pr

Conversation

@itzTheMeow

@itzTheMeow itzTheMeow commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

followup to #1182 without the architectural changes

adds a "slug" property to metadata files which is attached to a game
the slug is not unique, multiple games can have the same slug and they will simply share playtime
slugs are normalized to lowercase and spaces removed
if a slug is set on a game, it will be used to store plays in the database for all of the files of the game, overriding any paths/uris
existing plays using uri/path are NOT migrated to the slug pattern, they are just aggregated
also did a quick test for read/write of playtime using slugs

games have their own play_stats_self member which contain play stats added to that specific game independent of any files
this is summed in along with the individual game file play stats for the total playtime/stats on the game

slugs stored in the database have pg-slug: prepended to them to differentiate them from paths and other URIs

will follow up with a docs PR if approved

closes #1097
closes #1182

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.

Add support for relative paths to stats.db

1 participant