> ## Documentation Index
> Fetch the complete documentation index at: https://ej3mplo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Library

> ejg.library: the profile's games, their data and their art.

```js theme={null}
ejg.library.all              // Game[], already sorted (a local copy, no calls)
ejg.library.byId(id)
ejg.library.collections      // the profile's collections
ejg.library.onChange(({ full, changed, removed }) => render())
```

Each `Game` carries: `id, title, sortTitle, source, developer, publisher,
releaseDate, genres[], tags[], rating, favorite, hidden, missing, installed,
playtime` (seconds), `lastPlayed` (Unix), `launchCount, userRating, collections[],
running`, `media` and, if the game has achievements, `achievements: { unlocked, total }`.

`source` says where it came from: `folder` (a library folder), `manual` (an `.exe`
added by hand) or `repack` (installed from Downloads). Since 0.5.0 ejGames no
longer imports games from stores, so `installed` is always `true` (it stays so
older themes do not break).

`media` contains:

| `media.` | What it is |
| - | - |
| `cover` / `coverThumb` | 2:3 cover (the thumbnail is about 40 KB) |
| `hero` / `heroThumb` | wide background |
| `logo` | logo with transparency |
| `header` | horizontal capsule, 460×215 |
| `icon` | small icon |
| `microtrailer` | short silent video (mp4) |

Use the thumbnails in lists and grids. Use the large ones only on backgrounds and game pages.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.