You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
299 lines
14 KiB
299 lines
14 KiB
11 months ago
|
# Files & Paths
|
||
3 years ago
|
|
||
11 months ago
|
When using Plex Meta Manager, the structure of each library is made up of Files and Paths
|
||
|
|
||
|
???+ example "Example Library Structure"
|
||
|
|
||
|
```yaml
|
||
|
libraries:
|
||
|
Movies:
|
||
|
collection_files:
|
||
|
- pmm: imdb
|
||
|
```
|
||
|
|
||
|
In the above example, `collection_files` is the type of File, which tells PMM that the entries that follow will create/update collections and `- pmm:` is the type of Path, which PMM that the file it is looking for is a PMM Defaults file.
|
||
|
|
||
|
These ideas will be further outlined on this page.
|
||
|
|
||
|
## Files
|
||
|
|
||
|
Files define the structure and format for creating Collections, Overlays, Playlists, and Metadata Edits within your libraries.
|
||
|
|
||
|
Files are modular and when properly leveraged, they not only facilitate the management of your library's collections and metadata but also serve as a crucial backup resource in case a restore is necessary.
|
||
|
|
||
|
There are four main File types that can be utilized against Plex servers:
|
||
|
|
||
|
| File Type | Description |
|
||
|
|:-----------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------|
|
||
|
| [Collection Files](data/collections.md) | Defines the data for building collections, allowing you to group and showcase your library in unique ways |
|
||
|
| [Overlay Files](data/overlays.md) | Defines the data for building overlays, allowing you to place information such as resolutions and ratings onto your posters. |
|
||
|
| Metadata Files ([Movies](data/metadata/movie.md)/[Shows](data/metadata/show.md)/[Music](data/metadata/music.md)) | Defines the data for editing metadata, allowing you to find and manipulate the metadata on individual items within your library. |
|
||
|
| [Playlist Files](data/playlists.md) | Defines the data for building playlists, allowing you to combine media from multiple libraries and share them with users on your server |
|
||
|
|
||
|
Collection, Overlay and Metadata Files can be linked to libraries in the [Libraries Attribute](../config/libraries.md#metadata-path) within the [Configuration File](../config/configuration.md).
|
||
|
|
||
|
## Example Files
|
||
|
|
||
|
This is a basic Files structure showing the use of all four File types.
|
||
|
|
||
|
???+ example "Example Files"
|
||
|
|
||
|
Unlike the other three, Playlist Files are not defined per-library.
|
||
|
|
||
|
Theis examples utilizes the [PMM Defaults](../defaults/files.md)
|
||
|
|
||
|
```yaml
|
||
|
libraries:
|
||
|
Movies:
|
||
|
collection_files:
|
||
|
- pmm: imdb
|
||
|
overlay_files:
|
||
|
- pmm: resolution
|
||
|
metadata_files:
|
||
|
- file: config/metadata.yml
|
||
|
playlist_files:
|
||
|
- pmm: playlists
|
||
|
```
|
||
|
|
||
|
# Paths
|
||
|
|
||
|
YAML Files are defined by their path type and path location for the [`collection_files`](libraries.md#metadata-path), [`overlay_files`](libraries.md#overlay-path), [`playlist_files`](libraries.md#metadata-path), and [`external_templates`](#external-templates).
|
||
3 years ago
|
|
||
|
They can either be on the local system, online at an url, directly from the [Plex Meta Manager Configs](https://github.com/meisnate12/Plex-Meta-Manager-Configs) repository, or from another [`Custom Repository`](settings.md#custom-repo).
|
||
|
|
||
|
The path types are outlined as follows:
|
||
|
|
||
11 months ago
|
* `- file:` refers to a collection file which is located within the system that PMM is being run from.
|
||
11 months ago
|
|
||
11 months ago
|
* `- folder:` refers to a directory containing collection files which is located within the system that PMM is being run from.
|
||
11 months ago
|
|
||
11 months ago
|
* `- pmm:` refers to a [PMM Defaults](../defaults/files.md) builders/overlay/playlist file.
|
||
11 months ago
|
|
||
11 months ago
|
* `- url:` refers to a collection file which is hosted publicly on the internet.
|
||
11 months ago
|
|
||
11 months ago
|
* `- git:` refers to a collection file which is hosted on the [Configs Repo](https://github.com/meisnate12/Plex-Meta-Manager-Configs).
|
||
11 months ago
|
|
||
11 months ago
|
* `- repo:` refers to a collection file which is hosted on a custom repository specified by the user with the [`custom_repo` Setting Attribute](settings.md#custom-repo).
|
||
1 year ago
|
|
||
11 months ago
|
## Example Paths
|
||
1 year ago
|
|
||
|
```yaml
|
||
|
libraries:
|
||
|
Movies:
|
||
11 months ago
|
collection_files:
|
||
1 year ago
|
- file: config/path/to/file.yml
|
||
|
- folder: config/path/to/folder
|
||
|
```
|
||
|
File and folder paths need to be accessible to PMM at those paths; this is typically only something you need to consider when using Docker.
|
||
|
```
|
||
|
- url: https://example.com/path/to/file.yml
|
||
|
```
|
||
|
This needs to point directly to the YAML file. A common error is using a github link that points to the *page displaying the YAML*. In github, for instance, click on the "Raw" button and use *that* link.
|
||
|
```
|
||
|
- git: meisnate12/People # this links to https://github.com/meisnate12/Plex-Meta-Manager-Configs/blob/master/meisnate12/People.yml
|
||
|
```
|
||
|
Note that you enter the bits of the items path relative to the top level of the repo [`meisnate12/People`] and you don't need the `.yml` extension.
|
||
|
```
|
||
|
- repo: People
|
||
|
```
|
||
|
This is assuming the `custom_repo` setting is `https://github.com/meisnate12/Plex-Meta-Manager-Configs/tree/master/meisnate12`
|
||
|
Note that as with `- git:` you enter the bits of the items path relative to repo [`meisnate12/People`] and you don't need the `.yml` extension.
|
||
11 months ago
|
Note that as with `- git:` you enter the bits of the items path relative to repo [`meisnate12/People`] and you don't need the `.yml` extension.
|
||
1 year ago
|
```
|
||
|
- pmm: oscars
|
||
|
```
|
||
|
The values you'd enter here are listed in the [default metadata guide](../defaults/guide.md).
|
||
3 years ago
|
|
||
3 years ago
|
## YAML Controls
|
||
3 years ago
|
|
||
3 years ago
|
You can have some control of yaml files from inside your Configuration file by using YAML Controls.
|
||
3 years ago
|
|
||
3 years ago
|
### Template Variables
|
||
|
|
||
1 year ago
|
You can define [Template Variables](../builders/templates.md#template-variables) that will be added to every template in the associated YAML file by adding the `template_variables` attribute to the dictionary defining the file.
|
||
3 years ago
|
|
||
|
#### Example
|
||
3 years ago
|
|
||
|
```yaml
|
||
|
libraries:
|
||
|
TV Shows:
|
||
11 months ago
|
collection_files:
|
||
2 years ago
|
- pmm: genre
|
||
3 years ago
|
template_variables:
|
||
|
schedule_separator: never
|
||
|
collection_mode: hide
|
||
2 years ago
|
- pmm: actor # Notice how the `-` starts this "section"
|
||
3 years ago
|
template_variables:
|
||
|
schedule_separator: never
|
||
|
collection_mode: hide
|
||
3 years ago
|
```
|
||
|
|
||
2 years ago
|
In this example there will be two template variables added to every template in the git file pmm: genre.
|
||
3 years ago
|
|
||
|
`schedule_separator` is set to `never` to not show a separator in this section and `collection_mode` is set to `hide`.
|
||
|
|
||
11 months ago
|
What these variables will do depends on how they're defined in the Collection File.
|
||
3 years ago
|
|
||
3 years ago
|
### Schedule
|
||
|
|
||
11 months ago
|
Each [`collection_files`](libraries.md#metadata-path), [`overlay_files`](libraries.md#overlay-path), or [`playlist_files`](libraries.md#metadata-path) can be scheduled by adding the `schedule` attribute to the dictionary defining the file.
|
||
3 years ago
|
|
||
11 months ago
|
Below is an example of a scheduled Collection File and Playlist File:
|
||
3 years ago
|
|
||
|
```yaml
|
||
|
libraries:
|
||
|
Movies:
|
||
11 months ago
|
collection_files:
|
||
3 years ago
|
- file: config/Movies.yml
|
||
|
schedule: weekly(friday)
|
||
2 years ago
|
- pmm: actors
|
||
3 years ago
|
schedule: weekly(saturday)
|
||
3 years ago
|
playlist_files:
|
||
|
- file: config/Playlists.yml
|
||
|
schedule: weekly(sunday)
|
||
|
```
|
||
|
|
||
3 years ago
|
### Asset Directory
|
||
|
|
||
|
You can define custom Asset Directories per file by adding `asset_directory` to the file call.
|
||
|
|
||
11 months ago
|
???+ important
|
||
|
|
||
|
Assets can be stored anywhere on the host system that PMM has visibility of (i.e. if using docker, the directory must be mounted/visible to the docker container).
|
||
|
|
||
3 years ago
|
```yaml
|
||
|
libraries:
|
||
|
Movies:
|
||
11 months ago
|
collection_files:
|
||
3 years ago
|
- file: config/Movies.yml
|
||
11 months ago
|
asset_directory: <path_to_assets>/Movies
|
||
2 years ago
|
- pmm: actors
|
||
11 months ago
|
asset_directory: <path_to_assets>/people
|
||
11 months ago
|
overlay_files:
|
||
2 years ago
|
- pmm: imdb
|
||
3 years ago
|
playlist_files:
|
||
|
- file: config/Playlists.yml
|
||
|
asset_directory:
|
||
11 months ago
|
- <path_to_assets>/playlists1
|
||
|
- <path_to_assets>/playlists2
|
||
3 years ago
|
```
|
||
|
|
||
11 months ago
|
## Collection File
|
||
3 years ago
|
|
||
11 months ago
|
The [`collection_files`](libraries.md#metadata-path) attribute is defined under the [`libraries`](libraries.md) attribute in your [Configuration File](configuration.md).
|
||
3 years ago
|
|
||
1 year ago
|
??? example
|
||
|
|
||
11 months ago
|
In this example, multiple collection file path types are defined for the `"TV Shows"` library:
|
||
1 year ago
|
|
||
|
```yaml
|
||
|
libraries:
|
||
|
TV Shows:
|
||
11 months ago
|
collection_files:
|
||
1 year ago
|
- file: config/TVShows.yml
|
||
|
- folder: config/TV Shows/
|
||
|
- pmm: tmdb
|
||
|
- repo: charts
|
||
|
- url: https://somewhere.com/PopularTV.yml
|
||
|
```
|
||
|
|
||
|
Within the above example, PMM will:
|
||
3 years ago
|
|
||
11 months ago
|
* First, look within the root of the PMM directory (also known as `config/`) for a collection file named `TVShows.yml`. If this file does not exist, PMM will skip the entry and move to the next one in the list.
|
||
3 years ago
|
|
||
11 months ago
|
* Then, look within the root of the PMM directory (also known as `config/`) for a directory called `TV Shows`, and then load any collection files within that directory.
|
||
3 years ago
|
|
||
1 year ago
|
* Then, look in the [defaults folder](https://github.com/meisnate12/Plex-Meta-Manager/tree/master/defaults) within the local PMM folder [or docker container] for a file called `tmdb.yml` which it finds [here](https://github.com/meisnate12/Plex-Meta-Manager/blob/master/defaults/chart/tmdb.yml).
|
||
3 years ago
|
|
||
1 year ago
|
* Then, look within the Custom Defined Repo for a file called `charts.yml`.
|
||
3 years ago
|
|
||
11 months ago
|
* Finally, load the collection file located at `https://somewhere.com/PopularTV.yml`
|
||
3 years ago
|
|
||
11 months ago
|
## Overlay File
|
||
3 years ago
|
|
||
11 months ago
|
The [`overlay_files`](libraries.md#overlay-path) attribute is defined under the [`libraries`](libraries.md) attribute in your [Configuration File](configuration.md).
|
||
3 years ago
|
|
||
1 year ago
|
??? example
|
||
3 years ago
|
|
||
1 year ago
|
In this example, multiple overlay file path types are defined for the `"TV Shows"` library:
|
||
|
|
||
|
```yaml
|
||
|
libraries:
|
||
|
TV Shows:
|
||
11 months ago
|
overlay_files:
|
||
1 year ago
|
- file: config/overlays.yml
|
||
|
- folder: config/overlay configs/
|
||
|
- pmm: imdb
|
||
|
- repo: overlays
|
||
|
- url: https://somewhere.com/Overlays.yml
|
||
|
```
|
||
3 years ago
|
|
||
1 year ago
|
Within the above example, PMM will:
|
||
|
|
||
11 months ago
|
* First, look within the root of the PMM directory (also known as `config/`) for a collection file named `overlays.yml`. If this file does not exist, PMM will skip the entry and move to the next one in the list.
|
||
3 years ago
|
|
||
11 months ago
|
* Then, look within the root of the PMM directory (also known as `config/`) for a directory called `overlay configs`, and then load any collection files within that directory.
|
||
3 years ago
|
|
||
1 year ago
|
* Then, look in the [defaults folder](https://github.com/meisnate12/Plex-Meta-Manager/tree/master/defaults) within the local PMM folder [or docker container] for a file called `imdb.yml`.
|
||
3 years ago
|
|
||
1 year ago
|
* Then, look within the Custom Defined Repo for a file called `overlays.yml`.
|
||
|
|
||
11 months ago
|
* Finally, load the collection file located at `https://somewhere.com/Overlays.yml`
|
||
3 years ago
|
|
||
3 years ago
|
## Playlist Files
|
||
|
|
||
11 months ago
|
The [`playlist_files`](data/playlists.md) at the top level in your [Configuration File](configuration.md).
|
||
3 years ago
|
|
||
1 year ago
|
??? example
|
||
3 years ago
|
|
||
1 year ago
|
In this example, multiple `playlist_files` attribute path types are defined:
|
||
|
|
||
|
```yaml
|
||
|
playlist_files:
|
||
|
- file: config/playlists.yml
|
||
|
- folder: config/Playlists/
|
||
|
- pmm: playlist
|
||
|
- repo: playlists
|
||
|
- url: https://somewhere.com/Playlists.yml
|
||
|
```
|
||
|
|
||
|
Within the above example, PMM will:
|
||
3 years ago
|
|
||
1 year ago
|
* First, look within the root of the PMM directory (also known as `config/`) for a playlist file named `Playlists.yml`. If this file does not exist, PMM will skip the entry and move to the next one in the list.
|
||
3 years ago
|
|
||
1 year ago
|
* Then, look within the root of the PMM directory (also known as `config/`) for a directory called `Playlists`, and then load any playlist files within that directory.
|
||
3 years ago
|
|
||
1 year ago
|
* Then, look in the [defaults folder](https://github.com/meisnate12/Plex-Meta-Manager/tree/master/defaults) within the local PMM folder [or docker container] for a file called `playlist.yml` which it finds [here](https://github.com/meisnate12/Plex-Meta-Manager/blob/master/defaults/playlist.yml).
|
||
3 years ago
|
|
||
1 year ago
|
* Then, look within the Custom Defined Repo for a file called `playlists.yml`.
|
||
3 years ago
|
|
||
1 year ago
|
* Finally, load the playlist file located at `https://somewhere.com/Playlists.yml`
|
||
3 years ago
|
|
||
1 year ago
|
## External Templates
|
||
3 years ago
|
|
||
11 months ago
|
The [`external_templates`](../builders/templates.md#external-templates) attribute is defined at the top level in your [Collection File](data/collections.md).
|
||
11 months ago
|
|
||
1 year ago
|
??? example
|
||
|
|
||
|
In this example, multiple external template file path types are defined:
|
||
|
|
||
|
```yaml
|
||
|
external_templates:
|
||
|
- file: config/templates.yml
|
||
|
- folder: config/templates/
|
||
|
- url: https://somewhere.com/templates.yml
|
||
|
- pmm: templates
|
||
|
- repo: templates
|
||
|
```
|
||
|
|
||
|
Within the above example, PMM will:
|
||
3 years ago
|
|
||
11 months ago
|
* First, look within the root of the PMM directory (also known as `config/`) for a collection file named `templates.yml`. If this file does not exist, PMM will skip the entry and move to the next one in the list.
|
||
3 years ago
|
|
||
11 months ago
|
* Then, look within the root of the PMM directory (also known as `config/`) for a directory called `templates`, and then load any collection files within that directory.
|
||
3 years ago
|
|
||
11 months ago
|
* Then, load the collection file located at `https://somewhere.com/templates.yml`.
|
||
3 years ago
|
|
||
1 year ago
|
* Then, look in the [defaults folder](https://github.com/meisnate12/Plex-Meta-Manager/tree/master/defaults) within the local PMM folder [or docker container] for a file called `templates.yml` which it finds [here](https://github.com/meisnate12/Plex-Meta-Manager/blob/master/defaults/templates.yml).
|
||
3 years ago
|
|
||
11 months ago
|
* Finally, look at the within the Custom Defined Repo for a file called `templates.yml`.
|