Plex Meta Manager can automatically update items in Plex [Movie](metadata/movie), [Show](metadata/show), and [Music](metadata/music) Libraries based on what's defined within the `metadata` attribute.
Each metadata requires its own section within the `metadata` attribute. Each item is defined by the mapping name which must be the same as the item name in the library unless an `alt_title` is specified.
```yaml
metadata:
Godzilla vs. Mechagodzilla II:
# ... details to change for this item
Godzilla vs. Megaguirus:
# ... details to change for this item
Godzilla vs. Megalon:
# ... details to change for this item
Halloween (Rob Zombie):
# ... details to change for this item
etc:
# ... details to change for this item
```
### Title, Year, & Edition
YAML files cannot have two items with the same mapping name so if you have two movies with the same name you define each one with a name of your choosing. Then use the `title` attribute to specify the real title and the `year` and/or `edition_filter` attribute to specify which of the multiple movies is for this mapping.
```yaml
metadata:
Godzilla1:
title: Godzilla
year: 1954
content_rating: R
Godzilla2:
title: Godzilla
year: 1998
content_rating: PG-13
Godzilla3:
title: Godzilla
year: 1954
edition_filter: Extended
content_rating: R
```
**Note: `edition_filter` only works with Movies**
### Alt Title
To define an alternative title that the item may be called when searching use `alt_title`. When a title is found matching `alt_title` then the name of the item will be changed to match the mapping name or `title` if specified.
For Example, the 2007 movie Halloween shares a name with another movie in the Halloween franchise so this changes the title to `Halloween (Rob Zombie)` if the title is currently Halloween.
```yaml
metadata:
Halloween (Rob Zombie):
alt_title: Halloween
year: 2007
```
### Example
```yaml
metadata:
Godzilla1:
title: Godzilla
year: 1954
content_rating: R
Godzilla2:
title: Godzilla
year: 1998
content_rating: PG-13
Godzilla vs. Mechagodzilla II:
content_rating: PG
Godzilla vs. Megaguirus:
content_rating: PG
originally_available: 2000-08-31
Godzilla vs. Megalon:
content_rating: G
originally_available: 1973-03-17
Halloween (Rob Zombie):
alt_title: Halloween
year: 2007
```
Each metadata requires its own section within the `metadata` attribute.
Each item is defined by the mapping name. Rules for how to match are on the Respective Library Metadata Pages.
@ -6,10 +6,12 @@ An example of multiple metadata edits in a movie library is below:
```yaml
metadata:
Godzilla (1954):
match:
title: Godzilla
year: 1954
content_rating: R
Godzilla (1998):
match:
title: Godzilla
year: 1998
sort_title: Godzilla 03
@ -68,32 +70,124 @@ metadata:
"Godzilla: Tokyo S.O.S.":
originally_available: 2003-12-14
Halloween (Rob Zombie):
alt_title: Halloween
match:
title:
- Halloween (Rob Zombie)
- Halloween
year: 2007
"Halo 4: Forward Unto Dawn":
alt_title: Halo 4 Forward Unto Dawn
match:
title:
- Halo 4: Forward Unto Dawn
- Halo 4 Forward Unto Dawn
tmdb_show: 56295
content_rating: R
```
## Movies
## Matching Movies
Each metadata definition is defined by the mapping name which can link to a movie in multiple ways.
The `match` attribute is used to match movies within Plex to that definition within the Metadata file. One definition can match and edit multiple movies. The available matching options are outlined below.
* Mapping name must match the movie name in Plex exactly unless an `alt_title` is specified.
* Mapping name must match the TMDb ID or IMDb ID mapped to the movie.
| `title`<sup>1</sup> | Only matches movies that exactly match the movie's Title. Can be a list (only one needs to match). |
| `year` | Only matches movies that were released in the given year. |
| `mapping_id`<sup>2</sup> | Only matches movies that have the given TMDb or IMDb ID. |
| `edition`<sup>3</sup> | Only matches movies that exactly match the movie's Edition. Can be a list (only one needs to match). |
| `edition_contains`<sup>3</sup> | Only matches movies where the movie's Edition contains the given string. Can be a list (only one needs to match). |
| `blank_edition`<sup>3</sup> | Only matches movies that have no Edition.<br>**Default:** `false`<br>**Values:** `true` or `false` |
**Note:** to search for a movie titled with a number surround the number in quotes like in the example below.
1. When `title` is not provided and the mapping name was not specified as an ID, the default behaviour is to use the mapping name as `title` for matching.
2. When `mapping_id` is not provided and the mapping name was specified as an ID, the default behaviour is to use the mapping name as `mapping_id` for matching.
3. When the server does not have a Plex Pass then the Edition Field is not accessible. In this scenario, PMM will check the movie's filepath for `{edition-...}` to determine what the edition is.
### Examples
Below are some examples on how movies can be matched.
#### Example 1 - `title` and `mapping_id`
The below example shows how `title` and `mapping_id` can be used to match movies.
```yaml
metadata:
movie1: # Matches via the title "Star Wars"
match:
title: Star Wars
edits...
movie2: # Matches via TMDb ID: 299534
match:
mapping_id: 299534
edits...
movie3: # Matches via IMDb ID: tt4154756
match:
mapping_id: tt4154756
edits...
movie4: # Matches via the title "9"
match:
title: 9
edits...
```
The Mapping Name can also be used to reduce line-count, as shown here:
```yaml
metadata:
Star Wars: # Matches via the Name "Star Wars"
Star Wars: # Matches via the title "Star Wars"
edits...
299534: # Matches via TMDb ID: 299534
edits...
tt4154756: # Matches via IMDb ID: tt4154756
edits...
"9": # Matches via the Name "9"
"9": # Matches via the title "9"
edits...
```
**Note:** to search for a movie titled with a number from the mapping name you must surround the number in quotes like in the example below. Otherwise, it will look for the movie associated with that TMDb ID.
#### Example 2 - `title` and `year`
The below example shows how `title` and `year` can be used to match movies.
In this example, there are two movies in the library called "Godzilla", so the `year` attribute is used to identify which movie is being matched.
```yaml
metadata:
Godzilla (1954): # Matches via the title "Godzilla" released in 1954
match:
title: Godzilla
year: 1954
edits...
Godzilla (1998): # Matches via the title "Godzilla" released in 1998
match:
title: Godzilla
year: 1998
edits...
```
#### Example 3 - using `editions`
The edition attributes can be used to further specify which version of a movie should be matched within Plex.
This can be combined with Example 1 as follows
```yaml
metadata:
movie1: # Matches via the title "Star Wars" and edition containing "4K77"
match:
title: Star Wars
edition_contains: 4K77
edits...
```
If you wanted to specify the version of Star Wars which does not have an edition, then the `blank_edition` attribute can be used as shown below:
```yaml
metadata:
movie1: # Matches via the title "Star Wars" and checks for no edition version
match:
title: Star Wars
blank_edition: true
edits...
```
@ -103,16 +197,9 @@ The available attributes for editing movies are as follows
| `title` | Title if different from the mapping value useful when you have multiple movies with the same name. See the [Metadata Page](../metadata.md#metadata-attributes) for how searching for files works. |
| `alt_title` | Alternative title to look for and then change to the mapping name. See the [Metadata Page](../metadata.md#metadata-attributes) for how searching for files works. |
| `year` | Year of movie for better identification. See the [Metadata Page](../metadata.md#metadata-attributes) for how searching for files works. |
| `blank_edition`<sup>1</sup> | Movie has no Edition. See the [Metadata Page](../metadata.md#metadata-attributes) for how searching for files works. |
| `edition_filter`<sup>1</sup> | Edition of movie for better identification. Can be a list (only one needs to match). See the [Metadata Page](../metadata.md#metadata-attributes) for how searching for files works. |
| `edition_contains`<sup>1</sup> | Edition of movie must contain the given string for better identification. Can be a list (only one needs to match). See the [Metadata Page](../metadata.md#metadata-attributes) for how searching for files works. |
| `tmdb_show` | TMDb Show ID to use for metadata useful for miniseries that have been compiled into a movie. **This is not used to say this show is the given ID.** |
| `tmdb_movie` | TMDb Movie ID to use for metadata useful for movies that have been split into segments **This is not used to say this show is the given ID.** |
| `tmdb_show` | TMDb Show ID to use for metadata. Used when the Movie in your library is actually a miniseries on TMDb. (Example: [Halo 4: Forward Unto Dawn](https://www.themoviedb.org/tv/56295) or [IT](https://www.themoviedb.org/tv/19614)) **This is not used to say this movie is the given ID.** |
| `run_definition` | Used to specify if this definition runs.<br>Multiple can be used for one definition as a list or comma separated string. One `false` or unmatched library type will cause it to fail.<br>**Values:** `movie`, `show`, `artist`, `true`, `false` |
1. If the server does not have a Plex Pass then the Edition Field is not accessible. In this case PMM will check the movies filepath for `{edition-MOVIES EDITION}` to determine what the edition is.
@ -120,18 +207,19 @@ The available attributes for editing movies are as follows
Each artist is defined by the mapping name which must be the same as the artist name in the library unless an `alt_title` is specified.
The `match` attribute is used to match artists within Plex to that definition within the Metadata file. One definition can match and edit multiple artists. The available matching options are outlined below.
| `title`<sup>1</sup> | Only matches artists that exactly match the artist's Title. Can be a list (only one needs to match). |
To edit the metadata of a particular Album for an Artist use the `albums` attribute on its artist.
1. When `title` is not provided and the mapping name was not specified as an ID, the default behaviour is to use the mapping name as `title` for matching.
The mapping name is the album name.
### Examples
### Tracks
Below are some examples on how artists can be matched.
To edit the metadata of a particular Track on an Album use the `tracks` attribute on its album.
#### Example 1 - `title`
The mapping name is the track number on that Album, or the title of the Track.
The below example shows how `title` can be used to match artists.
```yaml
metadata:
artist1: # Matches via the title "Game of Thrones"
match:
title: Game of Thrones
edits...
artist2: # Matches via the title "24"
match:
title: 24
edits...
```
The Mapping Name can also be used to reduce line-count, as shown here:
```yaml
metadata:
Ke$ha: # Matches via the Name "Game of Thrones"
edits...
"311": # Matches via the Name "311"
edits...
```
**Note:** to search for an artist titled with a number from the mapping name you must surround the number in quotes like in the example below. Otherwise, it will look for the artist associated with that TVDb ID.
## Metadata Edits
@ -52,10 +78,9 @@ The available attributes for editing artists, albums, and tracks are as follows
| `albums` | Attribute used to edit album metadata. The mapping name is the album name. | ✅ | ❌ | ❌ |
| `tracks` | Attribute used to edit track metadata. The mapping name is the track number on that Album, or the title of the Track. | ❌ | ✅ | ❌ |
* If you know of another Title your item might exist under, but you want it titled differently you can use `alt_title` to specify another title to look under and then be changed to the mapping name. For Example the Artist `Kesha` used to be stylized as `Ke$ha`, and might still be found that way in Metadata results.
```yaml
@ -69,16 +94,16 @@ The available attributes for editing artists, albums, and tracks are as follows
| `title` | Text to change Title | ❌ | ❌ | ✅ |
| `sort_title` | Text to change Sort Title | ✅ | ✅ | ✅ |
| `user_rating` | Number to change User Rating | ✅ | ✅ | ✅ |
| `critic_rating` | Number to change Critic Rating | ❌ | ✅ | ❌ |
| `originally_available` | Date to change Originally Available<br>**Format:** YYYY-MM-DD | ❌ | ✅ | ❌ |
| `record_label` | Text to change Record Label | ❌ | ✅ | ❌ |
| `summary` | Text to change Summary | ✅ | ✅ | ✅ |
| `track` | Text to change Track | ❌ | ❌ | ✅ |
| `disc` | Text to change Disc | ❌ | ❌ | ✅ |
| `original_artist` | Text to change Original Artist | ❌ | ❌ | ✅ |
| `title` | Text to change Title. | ❌ | ❌ | ✅ |
| `sort_title` | Text to change Sort Title. | ✅ | ✅ | ✅ |
| `user_rating` | Number to change User Rating. | ✅ | ✅ | ✅ |
| `critic_rating` | Number to change Critic Rating. | ❌ | ✅ | ❌ |
| `originally_available` | Date to change Originally Available.<br>**Format:** YYYY-MM-DD | ❌ | ✅ | ❌ |
| `record_label` | Text to change Record Label. | ❌ | ✅ | ❌ |
| `summary` | Text to change Summary. | ✅ | ✅ | ✅ |
| `track` | Text to change Track. | ❌ | ❌ | ✅ |
| `disc` | Text to change Disc. | ❌ | ❌ | ✅ |
| `original_artist` | Text to change Original Artist. | ❌ | ❌ | ✅ |
| `run_definition` | Used to specify if this definition runs.<br>Multiple can be used for one definition as a list or comma separated string. One `false` or unmatched library type will cause it to fail.<br>**Values:** `movie`, `show`, `artist`, `true`, `false` | ✅ | ❌ | ❌ |
### Tag Attributes
@ -88,23 +113,23 @@ You can add `.remove` to any tag attribute to only remove those tags i.e. `genre
You can add `.sync` to any tag attribute to sync all tags vs just appending the new ones i.e. `genre.sync`.
summary: The Epic Series Final of Avatar The Last Airbender
"Avatar: The Legend of Korra":
match:
title:
- "Avatar: The Legend of Korra"
- The Legend of Korra
sort_title: Avatar 02
alt_title: The Legend of Korra
original_title: The Legend of Korra
seasons:
1:
@ -57,14 +60,48 @@ metadata:
title: "Book Four: Balance"
```
## Shows
## Matching Shows
Each metadata definition is defined by the mapping name which can link to a show in multiple ways.
The `match` attribute is used to match shows within Plex to that definition within the Metadata file. One definition can match and edit multiple shows. The available matching options are outlined below.
* Mapping name must match the show name in Plex exactly unless an `alt_title` is specified.
* Mapping name must match the TVDb ID or IMDb ID mapped to the show.
| `title`<sup>1</sup> | Only matches shows that exactly match the show's Title. Can be a list (only one needs to match). |
| `year` | Only matches shows that were released in the given year. |
| `mapping_id`<sup>2</sup> | Only matches shows that have the given TVDb or IMDb ID. |
**Note:** to search for a show titled with a number surround the number in quotes like in the example below.
1. When `title` is not provided and the mapping name was not specified as an ID, the default behaviour is to use the mapping name as `title` for matching.
2. When `mapping_id` is not provided and the mapping name was specified as an ID, the default behaviour is to use the mapping name as `mapping_id` for matching.
### Examples
Below are some examples on how shows can be matched.
#### Example 1 - `title` and `mapping_id`
The below example shows how `title` and `mapping_id` can be used to match shows.
```yaml
metadata:
show1: # Matches via the title "Game of Thrones"
match:
title: Game of Thrones
edits...
show2: # Matches via TVDb ID: 366524
match:
mapping_id: 366524
edits...
show3: # Matches via IMDb ID: tt10234724
match:
mapping_id: tt10234724
edits...
show4: # Matches via the title "24"
match:
title: 24
edits...
```
The Mapping Name can also be used to reduce line-count, as shown here:
```yaml
metadata:
@ -78,17 +115,27 @@ metadata:
edits...
```
### Seasons
**Note:** to search for a show titled with a number from the mapping name you must surround the number in quotes like in the example below. Otherwise, it will look for the show associated with that TVDb ID.
To edit the metadata of a particular Season in a Show use the `seasons` attribute on its show.
#### Example 2 - `title` and `year`
The mapping name is the season number (use 0 for specials) or the season name.
The below example shows how `title` and `year` can be used to match shows.
### Episodes
In this example, there are two shows in the library called "Vikings", so the `year` attribute is used to identify which show is being matched.
To edit the metadata of a particular Episode in a Season use the `episodes` attribute on its season.
The mapping name is the episode number in that season, the title of the episode, or the Originally Available date in the format `MM/DD`.
```yaml
metadata:
Vikings (2012): # Matches via the title "Vikings" released in 2012
match:
title: Vikings
year: 2012
edits...
Vikings (2013): # Matches via the title "Vikings" released in 2013
match:
title: Vikings
year: 2013
edits...
```
## Metadata Edits
@ -96,37 +143,32 @@ The available attributes for editing shows, seasons, and episodes are as follows
| `title` | Title if different from the mapping value useful when you have multiple shows with the same name. See the [Metadata Page](../metadata.md#metadata-attributes) for how searching for files works. | ✅ | ✅ | ✅ |
| `alt_title` | Alternative title to look for and then change to the mapping name. See the [Metadata Page](../metadata.md#metadata-attributes) for how searching for files works. | ✅ | ❌ | ❌ |
| `year` | Year of show for better identification. See the [Metadata Page](../metadata.md#metadata-attributes) for how searching for files works. | ✅ | ❌ | ❌ |
| `tmdb_show` | TMDb Show ID to use for metadata useful for miniseries that have been compiled into a movie | ✅ | ❌ | ❌ |
| `tmdb_movie` | TMDb Movie ID to use for metadata useful for movies that have been split into segments | ✅ | ❌ | ❌ |
| `f1_season` | F1 Season Year to make the Show represent a Season of F1 Races. See [Formula 1 Metadata Guide](../../home/guides/formula) for more information. | ✅ | ❌ | ❌ |
| `round_prefix` | Used only with `f1_season` to add the round as a prefix to the Season (Race) Titles i.e. `Australian Grand Prix` --> `01 - Australian Grand Prix` | ✅ | ❌ | ❌ |
| `shorten_gp` | Used only with `f1_season` to shorten `Grand Prix` to `GP` in the Season (Race) Titles i.e. `Australian Grand Prix` --> `Australian GP` | ✅ | ❌ | ❌ |
| `round_prefix` | Used only with `f1_season` to add the round as a prefix to the Season (Race) Titles i.e. `Australian Grand Prix` --> `01 - Australian Grand Prix`. | ✅ | ❌ | ❌ |
| `shorten_gp` | Used only with `f1_season` to shorten `Grand Prix` to `GP` in the Season (Race) Titles i.e. `Australian Grand Prix` --> `Australian GP`. | ✅ | ❌ | ❌ |
| `seasons` | Attribute used to edit season metadata. The mapping name is the season number (use 0 for specials) or the season name. | ✅ | ❌ | ❌ |
| `episodes` | Attribute used to edit episode metadata. The mapping name is the episode number in that season, the title of the episode, or the Originally Available date in the format `MM/DD`. | ❌ | ✅ | ❌ |
| `run_definition` | Used to specify if this definition runs.<br>Multiple can be used for one definition as a list or comma separated string. One `false` or unmatched library type will cause it to fail.<br>**Values:** `movie`, `show`, `artist`, `true`, `false` | ✅ | ❌ | ❌ |
| `update_seasons` | Used to specify if this definition's seasons metadata will update.<br>Multiple can be used for one definition as a list or comma separated string. One `false` will cause it to fail.<br>**Values:** `true`, `false` | ✅ | ❌ | ❌ |
| `update_episodes` | Used to specify if this definition's episodes metadata will update.<br>Multiple can be used for one definition as a list or comma separated string. One `false` will cause it to fail.<br>**Values:** `true`, `false` | ✅ | ❌ | ❌ |
| `keep_episodes` | <tableclass="clearTable"><tbody><tr><td>`all`</td><td>All episodes</td></tr><tr><td>`5_latest`</td><td>5 latest episodes</td></tr><tr><td>`3_latest`</td><td>3 latest episodes</td></tr><tr><td>`latest`</td><td>Latest episodes</td></tr><tr><td>`past_3`</td><td>Episodes added in the past 3 days</td></tr><tr><td>`past_7`</td><td>Episodes added in the past 7 days</td></tr><tr><td>`past_30`</td><td>Episodes added in the past 30 days</td></tr></tbody></table> |
@ -165,4 +207,4 @@ All these attributes only work with Shows.