| [`plex_all`](#plex-all) | Gets every movie/show in your library. Useful with [Filters](../filters) | ✅ | ✅ | ❌ |
| [`plex_pilots`](#plex-pilots) | Gets the first episode of every show in your library | ❌ | ✅ | ✅ |
| [`plex_collectionless`](#plex-collectionless) | Gets every movie/show that is not in a collection | ✅ | ✅ | ❌ |
| [`plex_search`](#plex-search) | Gets every movie/show based on the search parameters provided | ✅ | ✅ | ✅ |
## Plex All
Finds every item in your library. Useful with [Filters](../filters).
The expected input is either true or false.
```yaml
collections:
9.0 Movies:
plex_all: true
filters:
rating.gte: 9
```
## Plex Pilots
Gets the first episode of every show in your library. This Only works with `collection_level: episode`
```yaml
collection:
Pilots:
collection_level: episode
plex_pilots: true
```
## Plex Collectionless
**This is not needed if you're using [Smart Label Collections](smart.md#smart-label).**
Finds every item 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.
Alternatively, if you set the `Marvel Cinematic Universe` Collection to `Hide items in this collection` then movies without a collection like `The Incredible Hulk` will be hidden from the library view.
To combat the problem above you set all collections to `Hide items in this collection` then create a collection set to `Hide collection` and put every movie that you still want to display in that collection.
With the variability of collections generated by the Plex Meta Manager maintaining a collection like this becomes very difficult, so in order to automate it, you can use `plex_collectionless`. You just have to tell it what collections to exclude or what collection prefixes to exclude.
There are two attributes for `plex_collectionless`, `exclude` (To exclude specific collections) and `exclude_prefix` (To exclude every collection whose title or sort title starts with the prefix). At least one exclusion is required.
```yaml
collections:
Collectionless:
plex_collectionless:
exclude_prefix:
- +
- ~
exclude: Marvel Cinematic Universe
sort_title: ~_Collectionless
collection_order: alpha
```
* Both `exclude` and `exclude_prefix` can take multiple values as a List.
* This is a known issue with Plex Collection and there is a [Feature Suggestion](https://forums.plex.tv/t/collection-display-issue/305406) detailing the issue more on their forms.
## Plex Search
Uses Plex's [Advanced Filters](https://support.plex.tv/articles/201273953-collections/) to find all items based on the search parameters provided.
Any Advanced Filter made using the Plex UI should be able to be recreated using `plex_search`. If you're having trouble getting `plex_search` to work correctly, build the collection you want inside of Plex's Advanced 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/TsdpsFYqqm), and I'll do my best to help you.
like Plex's [Advanced Filters](https://support.plex.tv/articles/201273953-collections/) you have to start each search with either `any` or `all` as a base. You can only have one base attribute and all search attributes must be under the base.
Inside the base attribute you can use any search below or nest more `any` or `all`. You can have as many nested `any` or `all` next to each other as you want. If using multiple `any` or `all` you will have to do so in the form of a list.
**Note: To search by `season`, `episode`, `album`, or `track` you must use the `collection_level` [Detail](../details/metadata) to change the type of items the collection holds.**
| `sort_by` | **Description:** This will control how the filter is sorted in your library.<br>**Default:** `random`<br>**Values:** Any sort options for your search type in the [Sorts Options Table](#sort-options) |
| `validate` | **Description:** Determines if a collection/playlist will fail on a validation error<br>**Default:** `true`<br>**Values**: `true` or `false` |
| No Modifier | Matches every item where the date attribute is in the last X days<br>**Format:** number of days<br>**Example:** `30` | `is in the last` |
| `.not` | Matches every item where the date attribute is not in the last X days<br>**Format:** number of days<br>**Example:** `30` | `is not in the last` |
| `.before` | Matches every item where the date attribute is before the given date<br>**Format:** MM/DD/YYYY or `today` for the current day<br>**Example:** `01/01/2000` | `is before` |
| `.after` | Matches every item where the date attribute is after the given date<br>**Format:** MM/DD/YYYY or `today` for the current day<br>**Example:** `01/01/2000` | `is after` |
| `.gt` | Matches every item where the number attribute is greater than the given number<br>**Format:** number<br>**Example:** `30`, `1995`, or `7.5` | `is greater than` |
| `.gte` | Matches every item where the number attribute is greater than or equal to the given number<br>**Format:** number<br>**Example:** `30`, `1995`, or `7.5` | N/A |
| `.lt` | Matches every item where the number attribute is less than the given number<br>**Format:** number<br>**Example:** `30`, `1995`, or `7.5` | `is less than` |
| `.lte` | Matches every item where the number attribute is less than or equal to the given number<br>**Format:** number<br>**Example:** `30`, `1995`, or `7.5` | N/A |
| `duration` | Uses the duration attribute to match using minutes<br>**Minimum:** `0` | ✅ | ❌ | ❌ |
| `plays` | Uses the plays attribute to match<br>**Minimum:** `0` | ✅ | ✅ | ❌ |
| `episode_plays` | Uses the Episode's plays attribute to match<br>**Minimum:** `0` | ❌ | ✅ | ❌ |
| `critic_rating` | Uses the critic rating attribute to match<br>**Range:** `0.0` - `10.0` | ✅ | ✅ | ❌ |
| `audience_rating` | Uses the audience rating attribute to match<br>**Range:** `0.0` - `10.0` | ✅ | ✅ | ❌ |
| `user_rating` | Uses the user rating attribute to match<br>**Range:** `0.0` - `10.0` | ✅ | ✅ | ❌ |
| `episode_user_rating` | Uses the user rating attribute of the show's episodes to match<br>**Range:** `0.0` - `10.0` | ❌ | ✅ | ❌ |
| `episode_critic_rating` | Uses the critic rating attribute of the show's episodes to match<br>**Range:** `0.0` - `10.0` | ❌ | ✅ | ❌ |
| `episode_audience_rating` | Uses the audience rating attribute of the show's episodes to match<br>**Range:** `0.0` - `10.0` | ❌ | ✅ | ❌ |
| `year` | Uses the year attribute to match<br>**Minimum:** `0` | ✅ | ✅ | ❌ |
| `episode_year` | Uses the Episode's year attribute to match<br>**Minimum:** `0` | ❌ | ✅ | ❌ |
| `album_year` | Uses the Album's year attribute to match<br>**Minimum:** `0` | ❌ | ❌ | ✅ |
| `album_decade` | Uses the Album's decade attribute to match<br>**Minimum:** `0` | ❌ | ❌ | ✅ |
| `album_plays` | Uses the Album's plays attribute to match<br>**Minimum:** `0` | ❌ | ❌ | ✅ |
| `track_plays` | Uses the Track's plays attribute to match<br>**Minimum:** `0` | ❌ | ❌ | ✅ |
| `track_skips` | Uses the Track's skips attribute to match<br>**Minimum:** `0` | ❌ | ❌ | ✅ |
| `artist_user_rating` | Uses the Artist's user rating attribute to match<br>**Range:** `0.0` - `10.0` | ❌ | ❌ | ✅ |
| `album_user_rating` | Uses the Album's user rating attribute to match<br>**Range:** `0.0` - `10.0` | ❌ | ❌ | ✅ |
Here's an example of an episode collection using `plex_search`.
```yaml
collections:
Top 100 Simpsons Episodes:
collection_order: custom
collection_level: episode
plex_search:
type: episodes
sort_by: audience_rating.desc
limit: 100
all:
title.ends: "Simpsons"
summary: A collection of the highest rated simpsons epsodes.
```
If you specify TMDb Person ID's using the Detail `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.