# Use Set YAML with Kometa

> Apply a show, movie or collection Set's artwork to your Plex library with Kometa.

Every show, movie and collection Set has a YAML document that
[Kometa](https://kometa.wiki/) reads to apply the Set's artwork. No account or
key is needed.

## Get the URL

On mediux.io, open the Set and find **YAML export**: **Open published YAML**
gives its URL, and **Copy YAML** or **Download YAML** give a snapshot. The URL
follows the Set's type and ID:

| Set            | YAML                                    | Always the original files                        |
| -------------- | --------------------------------------- | ------------------------------------------------ |
| Show Set       | `https://api.mediux.io/show-set/{id}.yaml`       | `https://api.mediux.io/show-set/{id}.original.yaml`       |
| Movie Set      | `https://api.mediux.io/movie-set/{id}.yaml`      | `https://api.mediux.io/movie-set/{id}.original.yaml`      |
| Collection Set | `https://api.mediux.io/collection-set/{id}.yaml` | `https://api.mediux.io/collection-set/{id}.original.yaml` |

The URL always reflects the Set's current artwork. A snapshot stays as you saved
it, and links to the images rather than containing them.

## Add it to Kometa

In your `config.yml`, add the URL under `metadata_files` for the matching
library:

```yaml
libraries:
  Movies:
    metadata_files:
      - url: https://api.mediux.io/movie-set/321.yaml
```

For a saved snapshot, point at the file instead:

```yaml
- file: config/metadata/mediux-movie-set-321.yaml
```

Kometa's [file-block guide](https://kometa.wiki/en/latest/config/files/) covers
both.

## How titles match

- **Movies** match by TMDB ID.
- **Shows** match by TVDB ID, falling back to IMDb. Seasons and episodes follow
  TMDB numbering, so pick the TMDB episode order in your library before applying
  titlecards.
- **Collection Sets** go in a movie library. They apply artwork to the
  collection's movies, not to a collection itself.

## What's included

Show and movie posters, backdrops, logos and square art; season posters and
backdrops; and episode titlecards. Thumbs aren't included, and game Sets have no
YAML. YAML only changes artwork, never other library metadata.

The document is cached like other Set responses: revalidate it with its `ETag`
(see [Caching](https://docs-preview.mediux.io/api/caching.md)).
