punktfunk-plugin-play-history

A punktfunk host plugin that records how long each game is played and on which device. Each game's page in the console gets a Play history tab:

  • Playing now on Living room TV, for 20 min so far.
  • Played 14 h 20 min over 9 sessions.
  • Last played yesterday on Steam Deck, for 1 h 5 min.
  • Living room TV: 10 h 2 min

Use

Install Play history from the console's plugin store. There's nothing to set up: the tab appears on a game once it has been played through punktfunk. Untick Record play time on a game's tab to stop counting it; what was recorded stays.

What counts

  • A play starts when the host sees a launched game's process running and ends when it exits.
  • A launch that ends within a minute is not counted.
  • Only games launched from the library count, not a game started on the host by hand.
  • If the plugin misses an exit, it closes the play at the last minute the host still listed the game.

The history lives in plugin-state/play-history/history.json in the host's config directory. It never leaves the host.

Develop

bun install
bun test
bunx tsc --noEmit
bunx biome check

Licensed MIT OR Apache-2.0.

Use of AI

This project uses AI for writing code.

S
Description
Punktfunk plugin: records how long each game is played and on which device, and shows it on the game's page in the console.
Readme
57 KiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 100%