Wiki update v1.9.0

master
meisnate12 3 years ago
parent 874e251176
commit dd3209e22b

@ -4,7 +4,7 @@ No configuration is required for these builders.
| Name | Attribute | Description | Works with Movies | Works with Shows |
| :--- | :--- | :--- | :---: | :---: |
| [AniList Top Rated Anime](#anilist-top-rated-anime) | `anilist_popular` | Gets every anime in AniList's [Top Rated Anime](https://anilist.co/search/anime?sort=SCORE_DESC) list | :heavy_check_mark: | :heavy_check_mark: |
| [AniList Top Rated Anime](#anilist-top-rated-anime) | `anilist_top_rated` | Gets every anime in AniList's [Top Rated Anime](https://anilist.co/search/anime?sort=SCORE_DESC) list | :heavy_check_mark: | :heavy_check_mark: |
| [AniList Popular Anime](#anilist-popular-anime) | `anilist_popular` | Gets every anime in AniList's [Popular Anime](https://anilist.co/search/anime?sort=POPULARITY_DESC) list | :heavy_check_mark: | :heavy_check_mark: |
| [AniList Seasonal Anime](#anilist-seasonal-anime) | `anilist_season` | Gets anime in AniList's Seasonal Anime list the options are detailed below | :heavy_check_mark: | :heavy_check_mark: |
| [AniList Relations](#anilist-relations) | `anilist_relations` | Gets the anime specified by the AniList ID and every relation in its relation tree except Character and Other relations | :heavy_check_mark: | :heavy_check_mark: |
@ -25,7 +25,7 @@ The `sync_mode: sync` option is also recommended since the Trakt Watched lists a
```yaml
collections:
Top Rated Anime:
anilist_popular: 30
anilist_top_rated: 30
sync_mode: sync
```

@ -19,6 +19,7 @@ All collection filter options are listed below. To display collections filtered
| `studio` | Matches every movie/show with the specified studio | :heavy_check_mark: | :heavy_check_mark: |
| `year` | Matches every movie/show with the specified year | :heavy_check_mark: | :heavy_check_mark: |
| `writer` | Matches every movie with the specified writer | :heavy_check_mark: | :x: |
| `filepath` | Matches every movie/show whose filepath contains the given text | :heavy_check_mark: | :heavy_check_mark: |
| `original_language` | Matches every movie with the specified original language [ISO 639-1 codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)<br>Example: `original_language: en, ko` | :heavy_check_mark: | :x: |
| `video_resolution` | Matches every movie with the specified video resolution | :heavy_check_mark: | :x: |
| `audio_language` | Matches every movie with the specified audio language | :heavy_check_mark: | :x: |

@ -6,8 +6,21 @@ A simple example of multiple libraries all using the global values is below:
```yaml
libraries:
Movies:
metadata_path:
- file: config/Movies.yml
- git: meisnate12/MovieCharts
- git: meisnate12/Studios
- git: meisnate12/IMDBGenres
- git: meisnate12/People
TV Shows:
metadata_path:
- file: config/TV Shows.yml
- git: meisnate12/ShowCharts
- git: meisnate12/Networks
Anime:
metadata_path:
- file: config/Anime.yml
- git: meisnate12/AnimeCharts
plex:
url: http://192.168.1.12:32400
token: ####################
@ -17,8 +30,9 @@ The available attributes for each library are as follows
| Name | Attribute | Allowed Values | Default | Required |
| :--- | :--- | :--- | :---: | :---: |
| Library Name | `library_name` | Library name (Only needed when trying to use multiple libraries with the same name) | Base Attribute Name | :x: |
| Metadata Path | `metadata_path` | System Location for the Metadata YAML file | Same directory as config YAML file | :x: |
| [Library Name](#library-name) | `library_name` | Library name (Only needed when trying to use multiple libraries with the same name) | Base Attribute Name | :x: |
| [Metadata Path](#metadata-path) | `metadata_path` | Location for your Metadata YAML files | Same directory as config YAML file | :x: |
| Mass Genre Update | `mass_genre_update` | Updates every movie/show in the library to the chosen site's genres<br>`tmdb`: Use TMDb for Genres<br>`omdb`: Use IMDb through OMDb for Genres | No Update | :x: |
| Mass Genre Update | `mass_genre_update` | Updates every movie/show in the library to the chosen site's genres<br>`tmdb`: Use TMDb for Genres<br>`omdb`: Use IMDb through OMDb for Genres | No Update | :x: |
| Settings Mapping | `settings` | [`settings` mapping details](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Settings-Attributes) | global | :x: |
| Plex Mapping | `plex` | [`plex` mapping details](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Plex-Attributes) | global | :heavy_check_mark: Either here or globally |
@ -26,23 +40,66 @@ The available attributes for each library are as follows
| Sonarr Mapping | `sonarr` | [`sonarr` mapping details](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Sonarr-Attributes) | global | :x: |
| Tautulli Mapping | `tautulli` | [`tautulli` mapping details](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Tautulli-Attributes) | global | :x: |
* Library mappings must have a colon (:) placed after them
* Each library must have a different name. If you want to use multiple libraries with the same name you can use the `library_name` attribute to specify the real Library Name and just have a placeholder as the library mapping name. A simple example is below:
```yaml
libraries:
Movies01:
library_name: Movies
Movies02:
library_name: Movies
plex:
url: http://192.168.1.35:32400
token: ####################
TV Shows:
Anime:
* Library mappings must have a colon `:` placed after them
## Library Name
Each library must have a different name. If you want to use multiple libraries with the same name you can use the `library_name` attribute to specify the real Library Name and just have a placeholder as the library mapping name. A simple example is below:
```yaml
libraries:
Movies01:
library_name: Movies
Movies02:
library_name: Movies
plex:
url: http://192.168.1.12:32400
url: http://192.168.1.35:32400
token: ####################
```
TV Shows:
Anime:
plex:
url: http://192.168.1.12:32400
token: ####################
```
* Movies01, TV Shows, and Anime will all use the global plex server http://192.168.1.12:32400, defined using the global `plex` mapping. While the library, Movies02, will use the plex server http://192.168.1.35:32400 which is defined under its `plex` mapping over the global mapping.
Movies01, TV Shows, and Anime will all use the global plex server http://192.168.1.12:32400, defined using the global `plex` mapping. While the library, Movies02, will use the plex server http://192.168.1.35:32400 which is defined under its `plex` mapping over the global mapping.
## Metadata Path
You can define Metadata Files by using `metadata_path`. They can either be on the local system, online at an url, or directly from the [Plex Meta Manager Configs](https://github.com/meisnate12/Plex-Meta-Manager-Configs) repository.
By default, when `metadata_path` is missing the script will look in your config directory for `<MAPPING_NAME>.yml` so `Movies.yml` in the example below.
```yaml
libraries:
Movies:
```
To use a Metadata File online add `file` under metadata set to the system path of the yaml file.
```yaml
libraries:
Movies:
metadata_path:
file: /config/My Movies.yml
```
To use a Metadata File online add `url` under metadata set to the url of the yaml file.
```yaml
libraries:
Movies:
metadata_path:
url: http://somesite.com/metadata_file.yml
```
To use a Metadata File from the [Plex Meta Manager Configs](https://github.com/meisnate12/Plex-Meta-Manager-Configs) repository add `git` under metadata set to the oath in the repository.
```yaml
libraries:
Movies:
metadata_path:
git: meisnate12/Charts
```
You can specify multiple paths of any type using a list like below.
```yaml
libraries:
Movies:
metadata_path:
- file: /config/My Movies.yml
- url: http://somesite.com/people_collections.yml
- git: meisnate12/Charts
- git: meisnate12/Studios
```

@ -8,6 +8,9 @@ plex:
url: http://192.168.1.12:32400
token: ####################
timeout: 60
clean_bundles: true
empty_trash: true
optimize: false
```
| Name | Attribute | Allowed Values | Default | Required |
@ -15,6 +18,9 @@ plex:
| Server URL | `url` | Plex Server URL<br><strong>Example:</strong> http://192.168.1.12:32400 | N/A | :heavy_check_mark: |
| Authentication Token | `token` | Plex Server Authentication Token | N/A | :heavy_check_mark: |
| Plex Timeout | `timeout` | Plex Server Timeout | 60 | :x: |
| Clean Bundles | `clean_bundles` | Runs Clean Bundles on the Server after all Metadata Files are run | false | :x: |
| Empty Trash | `empty_trash` | Runs Empty Trash on the Server after all Metadata Files are run | false | :x: |
| Optimize | `optimize` | Runs Optimize on the Server after all Metadata Files are run | false | :x: |
* This script can be run on a remote Plex server, but be sure that the `url` provided is publicly addressable and it's recommended to use `HTTPS`.

@ -5,7 +5,6 @@ No configuration is required for these builders.
| Name | Attribute | Description | Works with Movies | Works with Shows |
| :--- | :--- | :--- | :---: | :---: |
| [Plex All](#plex-all) | `plex_all` | Gets every movie/show in your library. Useful with [collection filters](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Collection-Filters) | :heavy_check_mark: | :heavy_check_mark: |
| [Plex Collection](#plex-collection) | `plex_collection` | Gets every movie/show in another Plex Collection | :heavy_check_mark: | :heavy_check_mark: |
| [Plex Collectionless](#plex-collectionless) | `plex_collectionless` | Gets every movie/show that is not in a collection | :heavy_check_mark: | :heavy_check_mark: |
| [Plex Search](#plex-search) | `plex_search` | Gets every movie/show based on the search parameters provided | :heavy_check_mark: | :heavy_check_mark: |
@ -22,28 +21,9 @@ collections:
rating.gte: 9
```
## Plex Collection
Gets every movie/show in another Plex Collection.
The expected input is the exact name of a Collection in Plex
```yaml
collections:
Dinosaurs:
plex_collection: Jurassic Park
```
You can add multiple collections by using a list. Comma-separated values will not work.
```yaml
collections:
Dinosaurs:
plex_collection:
- Jurassic Park
- The Land Before Time
```
## Plex Collectionless
**This is not needed if you're using [Smart Label Collections](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Smart-Builders#smart-label).**
Gets every movie/show that is not in a collection unless the collection is in the exclusion list. This is a special collection type to help keep your library looking correct. When items in your library are in multiple collections it can mess up how they're displayed in your library.
For Example, if you have a `Marvel Cinematic Universe` Collection set to `Show this collection and its items` and an `Iron Man` Collection set to `Hide items in this collection` what happens is the show overrides the hide and you end up with both the collections and the 3 Iron Man movies all displaying.
@ -110,10 +90,11 @@ There are three fields per search option when using Plex's Custom Filters in the
### Special Fields
| Special Options | Description | Allowed Values | Default |
| Special Option | Attribute | Description | Default |
| :--- | :--- | :--- | :---: |
| Limit | `limit` | The number of movies/shows to search for | all |
| Sort By | `sort_by` | The way movies/shows are sorted for limit searches.<br>`title.asc`/`title.desc` (Sort by Title)<br>`originally_available.asc`/`originally_available.desc` (Sort by Originally Available)<br>`critic_rating.asc`/`critic_rating.desc` (Sort by Critic Rating)<br>`audience_rating.asc`/`audience_rating.desc` (Sort by Audience Rating)<br>`duration.asc`/`duration.desc` (Sort by Duration)<br>`added.asc`/`added.desc` (Sort by Date Added) | `title.asc` |
| Validate | `validate` | Determines if a collection will fail on a validation error<br>**Options**: `true` or `false` | `true` |
### Search Modifiers
@ -128,10 +109,12 @@ Each modifier translates directly from a modifier in the Web UI's modifier drop
| `.ends` | Matches every item that ends with at least one search term | `ends with` |
| `.before` | Matches every item that is before the specified date | `is before` |
| `.after` | Matches every item that is after the specified date | `is after` |
| `.greater` | Matches every item that is greater than specified number | `is greater than` |
| `.less` | Matches every item that is less than specified number | `is less than` |
| `.gt` | Matches every item that is greater than specified number | `is greater than` |
| `.gte` | Matches every item that is greater than or equal to the specified number | N/A |
| `.lt` | Matches every item that is less than specified number | `is less than` |
| `.lte` | Matches every item that is less than or equal to the specified number | N/A |
| Search Field | No Modifier | `.and` | `.not` | `.begins`/<br>`.ends` | `.before`/<br>`.after` | `.greater`/<br>`.less` |
| Search Field | No Modifier | `.and` | `.not` | `.begins`/<br>`.ends` | `.before`/<br>`.after` | `.gt`/`.gte`/<br>`.lt`/`.lte` |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: |
| `title` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
| `studio` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
@ -157,7 +140,7 @@ Each modifier translates directly from a modifier in the Web UI's modifier drop
| `user_rating` | :x: | :x: | :x: | :x: | :x: | :heavy_check_mark: |
| `year` | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: |
* Multiple values are supported as either a list or a comma-separated string for all modifiers except `.before`, `.after`, `.greator`, and `.less`.
* Multiple values are supported as either a list or a comma-separated string for all modifiers except `.before`, `.after`, `.gt`, `.gte`, `.lt`, and `.lte`.
* If you want to restrict the search even further try using [Collection Filters](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Collection-Filters).
```yaml
@ -196,16 +179,10 @@ collections:
- 1999
```
```yaml
collections:
90s Movies:
plex_search:
year: 1990-1999
```
```yaml
collections:
2010+ Movies:
plex_search:
year.greater: 2009
year.gte: 2010
```
```yaml
collections:
@ -219,7 +196,7 @@ If you only want to search using a single attribute you can do so without `plex_
```yaml
collections:
90s Movies:
year: 1990-1999
decade: 1990
```
If you specify TMDb Person ID's using the [Collection Detail](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Collection-Details) `tmdb_person` and then tell either `actor`, `director`, `producer`, or `writer` to add `tmdb`, the script will translate the TMDb Person IDs into their names and run the search on those names.

@ -24,7 +24,7 @@ settings:
| Cache Expiration | `cache_expiration` | Number of days before each cache mapping expires and has to be reloaded | 60 | :heavy_check_mark: | :x: | :x: |
| [Image Asset Directory](#image-asset-directory) | `asset_directory` | System Locations For Image Assets | [Directory containing YAML config]/assets | :heavy_check_mark: | :heavy_check_mark: | :x: |
| Image Asset Folders | `asset_folders` | Search in assets for named folders vs named files<br>i.e. `assets/Star Wars.png` vs `assets/Star Wars/poster.png` | true | :heavy_check_mark: | :heavy_check_mark: | :x: |
| Image Asset For All* | `assets_for_all` | Search in assets for images for every item in your library | false | :heavy_check_mark: | :heavy_check_mark: | :x: |
| Image Assets For All* | `assets_for_all` | Search in assets for images for every item in your library | false | :heavy_check_mark: | :heavy_check_mark: | :x: |
| Sync Mode | `sync_mode` | `append`: Only Add Items to the Collection<br>`sync`: Add & Remove Items from the Collection | append | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| [Run Again Delay](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Collection-Details#setting-attributes) | `run_again_delay` | Number of minutes to run `run_again` collections after daily run is finished<br>**number:** 0 or greater | 0 | :heavy_check_mark: | :x: | :x: |
| Show Unmanaged Collections | `show_unmanaged` | Show collections not managed by Plex Meta Manager at the end of each run<br>**boolean:** true or false | true | :heavy_check_mark: | :heavy_check_mark: | :x: |
@ -35,23 +35,88 @@ settings:
\* The file/folder name in your assets directory must match the folder name the media is stored in. i.e. if you have `Movies/Star Wars (1977)/Star Wars (1977) [1080p].mp4` then your asset directory would look at `assets/Star Wars (1977)/poster.png` for the poster
## Image Asset Directory
The Image Asset Directory can be used to update the posters and backgrounds of collections and the movies and shows inside them. If you want to add multiple Image Asset Directories you have to use a list. Comma-separated values will not work.
The Image Asset Directories can be used to update the posters and backgrounds of collections, movies, shows, seasons, and episodes.
By default, the program will look in the same folder as you config.yml for a folder called assets.
To use multiple Image Asset Directories you have to use a list. Comma-separated values will not work. By default, the program will look in the same folder as you config.yml for a folder called assets.
To specify a poster or background of a collection create a folder inside an assets folder called the same as the mapping name used with the collection unless `system_name` is specified, which you would then name the folder the same as specified in `system_name`.
There are two different options when it comes to how the program looks at the files inside you Asset Directories. These can be toggled between by using `asset_folders`.
After the folder has been created you can add a `poster.ext` or `background.ext` file to update the poster or background of a collection (replacing `.ext` with the image extension).
| Image Type | Image Path With Folders<br>`asset_folders: true` | Image Path Without Folder<br>`asset_folders: false` |
| :--- | :--- | :--- |
| Collection/Movie/Show poster | `assets/ASSET_NAME/poster.ext` | `assets/ASSET_NAME.ext` |
| Collection/Movie/Show background | `assets/ASSET_NAME/background.ext` | `assets/ASSET_NAME_background.ext` |
| Season poster | `assets/ASSET_NAME/Season##.ext` | `assets/ASSET_NAME_Season##.ext` |
| Episode poster | `assets/ASSET_NAME/S##E##.ext` | `assets/ASSET_NAME_S##E##.ext` |
To edit the posters and backgrounds of the movies or shows inside a collection, you have to create a folder inside the collection asset folder called the same name as the folder the actual video file is stored in.
* For **Collections** replace `ASSET_NAME` with the mapping name used with the collection unless `system_name` is specified, which you would then use what's specified in `system_name`.
After the folder has been created you can add a `poster.ext` or `background.ext` file to update the poster or background of a movie or show (replacing `.ext` with the image extension).
* For **Movies** replace `ASSET_NAME` with the exact name of the folder the video file is stored in.
If you want to update the posters of a show's seasons, inside the shows' assets folder you can add a `Season##.ext` file to update the poster of the specified season (replacing `##` with the zero padded season number and `.ext` with the image extension).
* For **Shows**, **Seasons**, and **Episodes** replace `ASSET_NAME` with the exact name of the folder for the show as a whole.
If you want to update the posters of a show's episodes, inside the shows' assets folder you can add a `S##E##.ext` file to update the poster of the specified episode (replacing the first `##` with the zero padded season number, the second `##` with the zero padded episode number, and `.ext` with the image extension).
* For **Seasons** replace `##` with the zero padded season number (00 for specials)
Here's an example config folder structure with an assets directory.
* For **Episodes** replacing the first `##` with the zero padded season number (00 for specials), the second `##` with the zero padded episode number
* Replace `.ext` with the image extension
By default, the program will only look inside the Image Asset Directories for Images when it runs a collection from a Metadata File. When it does this it will look not only for the collection images, but it will also look for images of every item in the collection.
If you're using `asset_folders` set to true you can also nest movie/show folders inside an Image Assets Collection Folder that contains that movie/show.
You can set `assets_for_all` to true to have the program, after your run, check the Image Asset Directories for Images of every item in your library.
Here's an example config folder structure with an assets directory with `asset_folders` set to true and false.
### `asset_folders: true` without nesting
```
config
├── config.yml
├── Movies.yml
├── TV Shows.yml
├── assets
│ ├── The Lord of the Rings
│ ├── poster.png
│ ├── background.png
│ ├── The Lord of the Rings The Fellowship of the Ring (2001)
│ ├── poster.png
│ ├── background.png
│ ├── The Lord of the Rings The Two Towers (2002)
│ ├── poster.png
│ ├── background.png
│ ├── The Lord of the Rings The Return of the King (2003)
│ ├── poster.png
│ ├── background.png
│ ├── Star Wars (Animated)
│ ├── poster.png
│ ├── background.png
│ ├── Star Wars The Clone Wars
│ ├── poster.png
│ ├── background.png
│ ├── Season00.png
│ ├── Season01.png
│ ├── Season02.png
│ ├── Season03.png
│ ├── Season04.png
│ ├── Season05.png
│ ├── Season06.png
│ ├── Season07.png
│ ├── S07E01.png
│ ├── S07E02.png
│ ├── S07E03.png
│ ├── S07E04.png
│ ├── S07E05.png
│ ├── Star Wars Rebels
│ ├── poster.png
│ ├── background.png
│ ├── Season01.png
│ ├── Season02.png
│ ├── Season03.png
│ ├── Season04.png
```
### `asset_folders: true` with nesting
```
config
@ -97,4 +162,45 @@ config
│ ├── Season02.png
│ ├── Season03.png
│ ├── Season04.png
```
### `asset_folders: false`
```
config
├── config.yml
├── Movies.yml
├── TV Shows.yml
├── assets
│ ├── The Lord of the Rings.png
│ ├── The Lord of the Rings_background.png
│ ├── The Lord of the Rings The Fellowship of the Ring (2001).png
│ ├── The Lord of the Rings The Fellowship of the Ring (2001)_background.png
│ ├── The Lord of the Rings The Two Towers (2002).png
│ ├── The Lord of the Rings The Two Towers (2002)_background.png
│ ├── The Lord of the Rings The Return of the King (2003).png
│ ├── The Lord of the Rings The Return of the King (2003)_background.png
│ ├── Star Wars (Animated).png
│ ├── Star Wars (Animated)_background.png
│ ├── Star Wars The Clone Wars.png
│ ├── Star Wars The Clone Wars_background.png
│ ├── Star Wars The Clone Wars_Season00.png
│ ├── Star Wars The Clone Wars_Season01.png
│ ├── Star Wars The Clone Wars_Season02.png
│ ├── Star Wars The Clone Wars_Season03.png
│ ├── Star Wars The Clone Wars_Season04.png
│ ├── Star Wars The Clone Wars_Season05.png
│ ├── Star Wars The Clone Wars_Season06.png
│ ├── Star Wars The Clone Wars_Season07.png
│ ├── Star Wars The Clone Wars_S07E01.png
│ ├── Star Wars The Clone Wars_S07E02.png
│ ├── Star Wars The Clone Wars_S07E03.png
│ ├── Star Wars The Clone Wars_S07E04.png
│ ├── Star Wars The Clone Wars_S07E05.png
│ ├── Star Wars Rebels.png
│ ├── Star Wars Rebels_background.png
│ ├── Star Wars Rebels_Season01.png
│ ├── Star Wars Rebels_Season02.png
│ ├── Star Wars Rebels_Season03.png
│ ├── Star Wars Rebels_Season04.png
```

@ -0,0 +1,228 @@
Using Plex Meta Manager you can create Smart Collections in two different ways.
## Smart Label
A Smart Label Collection is a smart collection that grabs every item with a specific label generated by the program. That label is added to all the items the Collection Builders find instead of being added to a normal collection.
You can add `smart_label` giving it one of the sorts from the Movies/Shows column of the [Sorts Table](#sorts-table) below along with any other builder to make that collection a Smart Label Collection.
This is extremely useful because smart collections don't follow normal show/hide rules and can eliminate the need to have [Plex Collectionless](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Plex-Builders#plex-collectionless) when used correctly. To fix the issue described in [Plex Collectionless](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Plex-Builders#plex-collectionless) you would make `Marvel Cinematic Universe` a Smart Label Collection and all other Marvel collection just normal collections and they will show/hide all the movie properly.
To have the Smart Label Collections to eliminate Plex Collectionless you have to go all in on using them. A good rule of thumb to make sure this works correctly is that every item in your library should have a max of one non-smart collection.
Reach out on the [Plex Meta Manager Discord](https://discord.gg/NfH6mGFuAB) or in the [Github Discussions](https://github.com/meisnate12/Plex-Meta-Manager/discussions) for help if you're having any issues getting this to work properly.
## Smart Filter
Uses Plex's [Advance Filters](https://support.plex.tv/articles/201273953-collections/) to create a smart collection based on the filter parameters provided.
Any Advance Filter made using the Plex UI should be able to be recreated using `smart_filter`. If you're having trouble getting `smart_filter` to work correctly, build the collection you want inside of Plex's Advance Filters and take a screenshot of the parameters in the Plex UI and post it in either the [Discussions](https://github.com/meisnate12/Plex-Meta-Manager/discussions) or on [Discord](https://discord.gg/NfH6mGFuAB) and I'll do my best to help you.
like Plex's [Advance Filters](https://support.plex.tv/articles/201273953-collections/) you have to start each filter with either `any` or `all` as a base. You can only have one base attribute and all filter attributes must be under the base.
Inside the base attribute you can use any filter below or nest more `any` or `and`. You can have as many nested `any` or `and` next to each other as you want. If using multiple `any` or `and` you will have to do so in the form of a list.
There are a couple other attributes you can have at the top level only along with the base attribute are:
| Special Option | Attribute | Description | Default |
| :--- | :--- | :--- | :---: |
| Type | `type` | The Type of items inside this collection<br>**Options**: `movies`, `shows`, `seasons`, and `episodes` | `movies` for Movies Libraries and `shows` for Show Libraries |
| Limit | `limit` | The max number of item for the filter | all |
| Sort By | `sort_by` | This will control how the filter is sorted in your library. You can use any sort options for your search type in the [Sorts Table](#sorts-table) | `random` |
| Validate | `validate` | Determines if a collection will fail on a validation error<br>**Options**: `true` or `false` | `true` |
### Sorts Table
| Sorts | Description | Movies | Shows | Seasons | Episodes |
| :--- | :--- | :---: | :---: | :---: | :---: |
| `title.asc`/`title.desc` | Sort by Title | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: |
| `season.asc`/`season.desc` | Sort by Season | :x: | :x: | :heavy_check_mark: | :x: |
| `show.asc`/`show.desc` | Sort by Show | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: |
| `year.asc`/`year.desc` | Sort by Year | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: |
| `originally_available.asc`/`originally_available.desc` | Sort by Originally Available | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: |
| `critic_rating.asc`/`critic_rating.desc` | Sort by Critic Rating | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: |
| `audience_rating.asc`/`audience_rating.desc` | Sort by Audience Rating | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: |
| `user_rating.asc`/`user_rating.desc` | Sort by User Rating | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| `content_rating.asc`/`content_rating.desc` | Sort by Content Rating | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
| `duration.asc`/`duration.desc` | Sort by Duration | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: |
| `plays.asc`/`plays.desc` | Sort by Number of Plays | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: |
| `added.asc`/`added.desc` | Sort by Date Added | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| `episode_added.asc`/`episode_added.desc` | Sort by Last Episode Date Added | :x: | :heavy_check_mark: | :x: | :x: |
| `random` | Sort by Random | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
### Filters
There are three fields per filter option when using Plex's Advance Filters in the Web UI. The first is the **Filter Field** (what field you wish to filter), the second is the **Filter Modifier** (which modifier to use), and the third is the **Filter Term** (actual term to filter).
### Filter Fields
| Filter Field | Description | Movie<br>Libraries | Show<br>Libraries |
| :--- | :--- | :---: | :---: |
| `title` | Gets every item with the specified text contained in the title | :heavy_check_mark: | :heavy_check_mark: |
| `episode_title` | Gets every item which has an episode with the specified text contained in the title | :x: | :heavy_check_mark: |
| `studio` | Gets every item with the specified text contained in the studio | :heavy_check_mark: | :heavy_check_mark: |
| `network` | Gets every item with the specified network<br>**Only works with the New Plex TV Agent** | :x: | :heavy_check_mark: |
| `actor` | Gets every item with the specified actor | :heavy_check_mark: | :heavy_check_mark: |
| `audio_language` | Gets every item with the specified audio language | :heavy_check_mark: | :heavy_check_mark: |
| `collection` | Gets item with the specified collection | :heavy_check_mark: | :heavy_check_mark: |
| `content_rating` | Gets item with the specified content rating | :heavy_check_mark: | :heavy_check_mark: |
| `country` | Gets every item with the specified country | :heavy_check_mark: | :x: |
| `director` | Gets every item with the specified director | :heavy_check_mark: | :heavy_check_mark: |
| `genre` | Gets every item with the specified genre | :heavy_check_mark: | :heavy_check_mark: |
| `label` | Gets every item with the specified label | :heavy_check_mark: | :heavy_check_mark: |
| `producer` | Gets every item with the specified producer | :heavy_check_mark: | :heavy_check_mark: |
| `subtitle_language` | Gets every item with the specified subtitle language | :heavy_check_mark: | :heavy_check_mark: |
| `writer` | Gets every item with the specified writer | :heavy_check_mark: | :heavy_check_mark: |
| `decade` | Gets every item from the specified year + the 9 that follow i.e. 1990 will get you 1990-1999 | :heavy_check_mark: | :heavy_check_mark: |
| `resolution` | Gets every item with the specified resolution | :heavy_check_mark: | :heavy_check_mark: |
| `added` | Gets every item added to plex before/after the specified date or in the last <br>**Format:** YYYY-MM-DD | :heavy_check_mark: | :heavy_check_mark: |
| `episode_added` | Gets every item which has an episode added to plex before/after the specified date or in the last <br>**Format:** YYYY-MM-DD | :heavy_check_mark: | :heavy_check_mark: |
| `originally_available` | Gets every item originally available before/after the specified date<br>**Format:** YYYY-MM-DD | :heavy_check_mark: | :x: |
| `episode_originally_available` | Gets every item which has an episode originally available before/after the specified date<br>**Format:** YYYY-MM-DD | :x: | :heavy_check_mark: |
| `duration` | Gets every item with a duration greater/less then the specified number of minutes | :heavy_check_mark: | :x: |
| `plays` | Gets every item where the number of plays is greater/less then the specified number of plays | :heavy_check_mark: | :x: |
| `episode_plays` | Gets every item which has an episode where the number of plays is greater/less then the specified number of plays | :x: | :heavy_check_mark: |
| `audience_rating` | Gets every item with an audience rating greater/less then the specified number | :heavy_check_mark: | :heavy_check_mark: |
| `critic_rating` | Gets every item with a critic rating greater/less then the specified number | :heavy_check_mark: | :heavy_check_mark: |
| `user_rating` | Gets every item with a user rating greater/less then the specified number | :heavy_check_mark: | :heavy_check_mark: |
| `episode_user_rating` | Gets every item which has an episode with a user rating greater/less then the specified number | :heavy_check_mark: | :heavy_check_mark: |
| `year` | Gets every item with the specified year or greater/less then the specified year | :heavy_check_mark: | :heavy_check_mark: |
| `episode_year` | Gets every item which has an episode with the specified year or greater/less then the specified year | :x: | :heavy_check_mark: |
### Filter Modifiers
Each modifier translates directly from a modifier in the Web UI's modifier drop-down.
| Modifier | Description | Plex Web UI Option |
| :--- | :--- | :---: |
| No Modifier | Matches the search term at least one search term exactly for every field except:<br>`title` & `studio` only need to contain the search term<br>`added` & `originally_available` takes an integer and matches every item in that past many days. | `is` for most<br>`contains` for `title` & `studio`<br>`in the last` for `added` & `originally_available` |
| `.not` | Matches every item that does not have any of the exact search terms for every field except:<br>`title` & `studio` only need to contain the search term<br>`added` & `originally_available` takes an integer and matches every item not in that past many days. | `is not` for most<br>`does not contain` for `title` & `studio`<br>`in not the last` for `added` & `originally_available` |
| `.begins` | Matches every item that starts with at least one search term | `begins with` |
| `.ends` | Matches every item that ends with at least one search term | `ends with` |
| `.before` | Matches every item that is before the specified date | `is before` |
| `.after` | Matches every item that is after the specified date | `is after` |
| `.gt` | Matches every item that is greater than specified number | `is greater than` |
| `.gte` | Matches every item that is greater than or equal to the specified number | N/A |
| `.lt` | Matches every item that is less than specified number | `is less than` |
| `.lte` | Matches every item that is less than or equal to the specified number | N/A |
| Search Field | No Modifier | `.not` | `.begins`/<br>`.ends` | `.before`/<br>`.after` | `.gt`/`.gte`/<br>`.lt`/`.lte` |
| :--- | :---: | :---: | :---: | :---: | :---: |
| `title` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
| `episode_title` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
| `studio` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
| `actor` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: |
| `audio_language` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: |
| `collection` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: |
| `content_rating` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: |
| `country` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: |
| `director` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: |
| `genre` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: |
| `label` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: |
| `network` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: |
| `producer` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: |
| `subtitle_language` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: |
| `writer` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: |
| `decade` | :heavy_check_mark: | :x: | :x: | :x: | :x: |
| `resolution` | :heavy_check_mark: | :x: | :x: | :x: | :x: |
| `added` | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: |
| `episode_added` | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: |
| `originally_available` | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: |
| `episode_originally_available` | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: |
| `plays` | :x: | :x: | :x: | :x: | :heavy_check_mark: |
| `episode_plays` | :x: | :x: | :x: | :x: | :heavy_check_mark: |
| `duration` | :x: | :x: | :x: | :x: | :heavy_check_mark: |
| `audience_rating` | :x: | :x: | :x: | :x: | :heavy_check_mark: |
| `critic_rating` | :x: | :x: | :x: | :x: | :heavy_check_mark: |
| `user_rating` | :x: | :x: | :x: | :x: | :heavy_check_mark: |
| `episode_user_rating` | :x: | :x: | :x: | :x: | :heavy_check_mark: |
| `year` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: |
| `episode_year` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: |
* Multiple values are supported as either a list or a comma-separated string for all modifiers except `.before`, `.after`, `.gt`, `.gte`, `.lt`, and `.lte`.
```yaml
collections:
Documentaries:
smart_filter:
all:
genre: Documentary
```
```yaml
collections:
Dave Chappelle Comedy:
smart_filter:
all:
actor: Dave Chappelle
genre: Comedy
```
```yaml
collections:
Top Action Movies:
smart_filter:
all:
genre: Action
sort_by: audience_rating.desc
limit: 20
```
```yaml
collections:
90s Movies:
smart_filter:
any:
year:
- 1990
- 1991
- 1992
- 1993
- 1994
- 1995
- 1996
- 1997
- 1998
- 1999
```
```yaml
collections:
90s Movies:
smart_filter:
any:
decade: 1990
```
```yaml
collections:
Best 2010+ Movies:
smart_search:
all:
year.gte: 2010
sort_by: audience_rating.desc
limit: 20
```
If you specify TMDb Person ID's using the [Collection Detail](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Collection-Details) `tmdb_person` and then tell either `actor`, `director`, `producer`, or `writer` to add `tmdb`, the script will translate the TMDb Person IDs into their names and run the search on those names.
```yaml
collections:
Robin Williams:
smart_search:
all:
actor: tmdb
tmdb_person: 2157
```
```yaml
collections:
Steven Spielberg:
smart_search:
all:
director: tmdb
tmdb_person: https://www.themoviedb.org/person/488-steven-spielberg
```
```yaml
collections:
Quentin Tarantino:
smart_search:
any:
actor: tmdb
director: tmdb
producer: tmdb
writer: tmdb
tmdb_person: 138
```
Loading…
Cancel
Save