> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-radio/media-player/adding-your-music.md).

# Adding Your Music

Files, playlist, artwork — turning the station on.

The station is off by default and stays hidden until it has tracks, so nothing appears half-configured.

{% stepper %}
{% step %}

### Turn it on

```lua
Config.MediaPlayer.enabled = true
```

{% endstep %}

{% step %}

### Add your audio

Drop the files into **`html/music/`**. `.mp3`, `.ogg` and `.wav` all work.
{% endstep %}

{% step %}

### Add a station logo

A square PNG named exactly **`logo.png`**, in the same folder. Transparent works best — it renders on a light tile in both surfaces, like every other station's artwork.
{% endstep %}

{% step %}

### List the tracks

In **`music.lua`**:

```lua
Music.Station = {
    label = 'Mango FM',
    genre = 'Server Radio',
    logo  = 'logo.png',
}

Music.Tracks = {
    { file = 'nightdrive.mp3', title = 'Night Drive', artist = 'Mango',      duration = 214 },
    { file = 'vinewood.ogg',   title = 'Vinewood',    artist = 'Los Santos', duration = 187 },
}
```

{% endstep %}

{% step %}

### Restart

The station appears immediately after Radio Off — first in the carousel and the first row in the station browser.
{% endstep %}
{% endstepper %}

## The track fields

| Field      | Required    | Notes                         |
| ---------- | ----------- | ----------------------------- |
| `file`     | yes         | Filename inside `html/music/` |
| `title`    | yes         | Shown while it plays          |
| `artist`   | yes         | Shown while it plays          |
| `duration` | recommended | Length in **seconds**         |

`duration` is how the server knows when to move on. Accurate values mean playback is exact from the very first song; omit it and the first play of that track may cut early or run long before the server corrects itself from the real file length. A correction that would override a value you wrote needs agreement from several players first — see [durationQuorum](/mango5m-docs/resources/mango-radio/media-player/how-it-works.md) for how that works.

## Where it appears

The Media Player always sits **immediately after Radio Off** — first in the carousel, and the first row in the station browser above every GTA station. It behaves like any other station: select it, favourite it, skip past it.

Its titles come straight from `music.lua`, not the bundled track database, so whatever you type is what players see.

## If nothing appears

* `Config.MediaPlayer.enabled` is still `false`
* `Music.Tracks` is empty — the station stays hidden by design
* Check the server console; it prints a line if the station is enabled but has no tracks

{% hint style="warning" %}
Only host music you have the right to distribute. Your server serves these files to every connected player, and file size matters — every listener downloads each track.
{% endhint %}
