Plex-Meta-Manager/docs/metadata/overlay.md

278 lines
14 KiB
Markdown
Raw Normal View History

2022-04-18 18:16:39 +00:00
# Overlay Files
Overlay files are used to create and maintain overlays within the Plex libraries on the server.
Overlays and templates are defined within one or more Overlay files, which are linked to libraries in the [Libraries Attribute](../config/libraries.md#overlay-path) within the [Configuration File](../config/configuration.md).
2022-05-23 18:42:27 +00:00
All overlay coordinates assume 1000 x 1500 for Posters and 1920 x 1080 for Backgrounds and Title Cards.
2022-04-20 04:06:42 +00:00
**To remove all overlays add `remove_overlays: true` to the `overlay_path` [Libraries Attribute](../config/libraries.md#remove-overlays).**
2022-04-18 18:16:39 +00:00
2022-05-23 18:42:27 +00:00
**To change a single overlay original image either remove the `Overlay` shared label and update the Image in Plex or replace the image in the assets folder and then PMM will overlay the new image**
2022-04-18 18:16:39 +00:00
These are the attributes which can be used within the Overlay File:
| Attribute | Description |
|:--------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
| [`templates`](templates) | contains definitions of templates that can be leveraged by multiple overlays |
| [`external_templates`](templates.md#external-templates) | contains [path types](../config/paths) that point to external templates that can be leveraged by multiple overlays |
2022-05-15 04:26:34 +00:00
| [`overlays`](#overlays-attributes) | contains definitions of overlays you wish to add |
2022-04-18 18:16:39 +00:00
* `overlays` is required in order to run the Overlay File.
* Example Overlay Files can be found in the [Plex Meta Manager Configs Repository](https://github.com/meisnate12/Plex-Meta-Manager-Configs/tree/master/PMM)
2022-05-15 04:26:34 +00:00
## Overlays Attributes
2022-04-18 18:16:39 +00:00
2022-05-15 04:26:34 +00:00
Each overlay definition requires its own section within the `overlays` attribute.
2022-04-18 18:16:39 +00:00
```yaml
overlays:
IMDb Top 250:
# ... builders, details, and filters for this overlay
4K:
# ... builders, details, and filters for this overlay
etc:
# ... builders, details, and filters for this overlay
```
2022-05-15 04:26:34 +00:00
## Overlay
2022-04-18 18:16:39 +00:00
2022-05-15 04:26:34 +00:00
Each overlay definition needs to specify what overlay to use. This can happen in 3 ways.
2022-05-15 04:26:34 +00:00
1. If there is no `overlay` attribute PMM will look in your `config/overlays` folder for a `.png` file named the same as the mapping name of the overlay definition. This example below would look for `IMDb Top 250.png`.
```yaml
overlays:
IMDb Top 250:
imdb_chart: top_movies
```
2022-05-15 04:26:34 +00:00
2. If the `overlay` attribute is given a string PMM will look in your `config/overlays` folder for a `.png` file named the same as the string given. This example below would look for `IMDbTop.png`.
```yaml
overlays:
2022-05-15 04:26:34 +00:00
overlay: IMDbTop
IMDb Top 250:
imdb_chart: top_movies
```
3. Using a dictionary for more overlay location options.
2022-04-18 18:16:39 +00:00
2022-05-23 21:31:08 +00:00
```yaml
overlays:
IMDb Top 250:
overlay:
name: IMDb Top 250
imdb_chart: top_movies
```
There are many attributes available when using overlays to edit how they work.
| Attribute | Description | Required |
|:--------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------:|
| `name` | Name of the overlay. Each overlay name should be unique. | ✅ |
| `file` | Local location of the Overlay Image. | ❌ |
| `url` | URL of Overlay Image Online. | ❌ |
| `git` | Location in the [Configs Repo](https://github.com/meisnate12/Plex-Meta-Manager-Configs) of the Overlay Image. | ❌ |
| `repo` | Location in the [Custom Repo](../config/settings.md#custom-repo) of the Overlay Image. | ❌ |
| `group` | Name of the Grouping for this overlay. Only one overlay with the highest weight per group will be applied.<br>**`weight` is required when using `group`**<br>**Values:** group name | &#10060; |
| `weight` | Weight of this overlay in its group.<br>**`group` is required when using `weight`**<br>**Values:** Integer | &#10060; |
2022-05-25 16:12:01 +00:00
| `horizontal_offset` | Horizontal Offset of this overlay. Can be a %.<br>**`vertical_offset` is required when using `horizontal_offset`**<br>**Value:** Integer 0 or greater or 0%-100% | &#10060; |
| `horizontal_align` | Horizontal Alignment of the overlay.<br>**Values:** `left`, `center`, `right` | &#10060; |
2022-05-25 16:12:01 +00:00
| `vertical_offset` | Vertical Offset of this overlay. Can be a %.<br>**`horizontal_offset` is required when using `vertical_offset`**<br>**Value:** Integer 0 or greater or 0%-100% | &#10060; |
| `vertical_align` | Vertical Alignment of the overlay.<br>**Values:** `top`, `center`, `bottom` | &#10060; |
| `font` | System Font Filename or path to font file for the Text Overlay.<br>**Value:** System Font Filename or path to font file | &#10060; |
| `font_size` | Font Size for the Text Overlay.<br>**Value:** Integer greater than 0 | &#10060; |
| `font_color` | Font Color for the Text Overlay.<br>**Value:** Color Hex Code in format `#RGB`, `#RGBA`, `#RRGGBB` or `#RRGGBBAA`. | &#10060; |
| `back_color` | Backdrop Color for the Text Overlay.<br>**Value:** Color Hex Code in format `#RGB`, `#RGBA`, `#RRGGBB` or `#RRGGBBAA`. | &#10060; |
| `back_width` | Backdrop Width for the Text Overlay. If `back_width` is not specified the Backdrop Sizes to the text<br>**`back_height` is required when using `back_width`**<br>**Value:** Integer greater than 0 | &#10060; |
| `back_height` | Backdrop Height for the Text Overlay. If `back_height` is not specified the Backdrop Sizes to the text<br>**`back_width` is required when using `back_height`**<br>**Value:** Integer greater than 0 | &#10060; |
| `back_padding` | Backdrop Padding for the Text Overlay.<br>**Value:** Integer greater than 0 | &#10060; |
| `back_radius` | Backdrop Radius for the Text Overlay.<br>**Value:** Integer greater than 0 | &#10060; |
| `back_line_color` | Backdrop Line Color for the Text Overlay.<br>**Value:** Color Hex Code in format `#RGB`, `#RGBA`, `#RRGGBB` or `#RRGGBBAA`. | &#10060; |
| `back_line_width` | Backdrop Line Width for the Text Overlay.<br>**Value:** Integer greater than 0 | &#10060; |
2022-04-18 18:16:39 +00:00
* If `url`, `git`, and `repo` are all not defined then PMM will look in your `config/overlays` folder for a `.png` file named the same as the `name` attribute.
2022-05-23 18:42:27 +00:00
### Non-Positional Image Overlay
Non-Positional overlays are images that are either 1000 x 1500 for Posters or 1920 x 1080 for Backgrounds and Title Cards.
These Overlays should be mostly transparent and will just be completely merged with the base image.
### Positional Image Overlay
Positional overlays can be of any size and use `horizontal_offset`, `horizontal_align`, `vertical_offset`, and `vertical_align` to position the overlay on the image.
```yaml
overlays:
IMDB-Top-250:
imdb_chart: top_movies
overlay:
name: IMDB-Top-250
repo: PMM/overlays/images/IMDB-Top-250
horizontal_offset: 0
horizontal_align: right
vertical_offset: 0
vertical_align: bottom
```
2022-05-15 04:26:34 +00:00
### Blurring Overlay
2022-04-20 05:27:00 +00:00
There is a special overlay named `blur` that when given as the overlay name will instead of finding the image will just blur the image instead.
2022-04-20 23:23:21 +00:00
You can control the level of the blur by providing a number with the attribute like so `blur(##)`.
2022-04-20 05:27:00 +00:00
```yaml
overlays:
blur:
overlay:
2022-04-20 23:23:21 +00:00
name: blur(50)
2022-04-20 05:27:00 +00:00
plex_search:
2022-05-23 21:31:08 +00:00
type: episodes
2022-04-20 05:27:00 +00:00
all:
resolution: 4K
```
2022-05-23 21:31:08 +00:00
![](blur.png)
2022-05-15 04:26:34 +00:00
### Text Overlay
You can add text as an overlay using the special `text()` overlay name. Anything inside the parentheses will be added as an overlay onto the image. Ex `text(4K)` adds `4K` to the image.
You can control the font, font size and font color using the `font`, `font_size`, and `font_color` overlay attributes.
2022-05-23 18:42:27 +00:00
You can control the backdrop of the text using the various `back_*` attributes.
2022-05-16 01:25:35 +00:00
The `horizontal_offset` and `vertical_offset` overlay attributes are required when using Text Overlays.
2022-05-15 04:26:34 +00:00
2022-05-26 16:16:04 +00:00
You can add an items rating number (`8.7`, `9.0`) to the image by using `text(audience_rating)`, `text(critic_rating)`, or `text(user_rating)`
2022-05-15 20:55:27 +00:00
2022-05-26 16:16:04 +00:00
You can add an items rating number removing `.0` as needed (`8.7`, `9`) to the image by using `text(audience_rating#)`, `text(critic_rating#)`, or `text(user_rating#)`
You can add an items rating percentage (`87%`, `90%`) to the image by using `text(audience_rating%)`, `text(critic_rating%)`, or `text(user_rating%)`
2022-05-15 04:26:34 +00:00
2022-05-23 21:31:08 +00:00
You can use the `mass_audience_rating_update` or `mass_critic_rating_update` [Library Operation](../config/operations) to update your plex ratings to various services like `tmdb`, `imdb`, `mdb`, `metacritic`, `letterboxd` and many more.
2022-05-16 03:59:00 +00:00
PMM includes multiple fonts in the [`fonts` folder](https://github.com/meisnate12/Plex-Meta-Manager/tree/master/fonts) which can be called using `fonts/fontname.ttf`
2022-05-15 20:29:54 +00:00
2022-05-15 04:26:34 +00:00
```yaml
overlays:
audience_rating:
overlay:
name: text(audience_rating)
2022-05-23 18:42:27 +00:00
horizontal_offset: 225
horizontal_align: center
2022-05-16 01:25:35 +00:00
vertical_offset: 15
2022-05-23 18:42:27 +00:00
vertical_align: top
font: fonts/Inter-Medium.ttf
font_size: 63
font_color: "#FFFFFF"
back_color: "#00000099"
back_radius: 30
back_width: 150
back_height: 105
2022-05-15 04:26:34 +00:00
```
## Suppress Overlays
2022-04-20 12:56:07 +00:00
You can add `suppress_overlays` to an overlay definition and give it a list or comma separated string of overlay names you want suppressed from this item if this overlay is attached to the item.
2022-04-20 04:06:42 +00:00
2022-04-20 12:56:07 +00:00
So in this example if the `4K-HDR` overlay matches an item then the `4K` and `HDR` overlays will also match. The `suppress_overlays` attribute on `4K-HDR` will stop the overlays specified (`4K` and `HDR`) from also being applied.
```yaml
overlays:
4K:
plex_search:
all:
resolution: 4K
HDR:
plex_search:
all:
hdr: true
4K-HDR:
2022-04-20 12:56:07 +00:00
suppress_overlays:
- 4K
- HDR
plex_search:
all:
resolution: 4K
hdr: true
```
2022-04-18 18:16:39 +00:00
2022-05-15 04:26:34 +00:00
## Builders
2022-04-18 18:16:39 +00:00
Builders use third-party services to source items for overlays. Multiple builders can be used in the same overlay from a variety of sources listed below.
* [Plex Builders](builders/plex)
* [TMDb Builders](builders/tmdb)
* [TVDb Builders](builders/tvdb)
* [IMDb Builders](builders/imdb)
* [Trakt Builders](builders/trakt)
* [Tautulli Builders](builders/tautulli)
* [Radarr Builders](builders/radarr)
* [Sonarr Builders](builders/sonarr)
* [MdbList Builders](builders/mdblist)
2022-04-18 18:16:39 +00:00
* [Letterboxd Builders](builders/letterboxd)
* [ICheckMovies Builders](builders/icheckmovies)
* [FlixPatrol Builders](builders/flixpatrol)
* [Reciperr Builders](builders/reciperr)
2022-04-18 18:16:39 +00:00
* [StevenLu Builders](builders/stevenlu)
* [AniDB Builders](builders/anidb)
* [AniList Builders](builders/anilist)
* [MyAnimeList Builders](builders/myanimelist)
## Details
Only a few details can be used with overlays: `limit`, `show_missing`, `save_missing`, `missing_only_released`, `minimum_items`, `cache_builders`, `tmdb_region`
* [Setting Details](details/setting)
* [Metadata Details](details/metadata)
## Filters
2022-05-25 16:12:01 +00:00
These filter media items that would have an overlay applied by any of the Builders.
2022-04-18 18:16:39 +00:00
* [Filters](filters)
2022-05-23 21:31:08 +00:00
## Examples
2022-04-20 04:06:42 +00:00
### Example Overlay File
2022-04-18 18:16:39 +00:00
```yaml
overlays:
4K:
overlay:
name: 4K # This will look for a local overlays/4K.png in your config folder
2022-04-18 18:16:39 +00:00
plex_search:
all:
resolution: 4K
HDR:
overlay:
name: HDR
git: PMM/overlays/HDR
plex_search:
all:
hdr: true
Dolby:
overlay:
name: Dolby
2022-04-18 19:35:48 +00:00
url: https://somewebsite.com/dolby_overlay.png
2022-04-18 18:16:39 +00:00
plex_all: true
filters:
has_dolby_vision: true
2022-04-20 04:06:42 +00:00
```
### Example Folder Structure
```
config
├── config.yml
├── Movies.yml
├── TV Shows.yml
├── Overlays.yml
├── overlays
│ ├── 4K.png
│ ├── Dolby.png
│ ├── HDR.png
```