Smart Builders¶
Smart Builders allow Plex Meta Manager to create Smart Collections in two different ways.
** Smart Builders do not currently work with Playlists **
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.
To make a collection a Smart Label Collection, the smart_label
attribute must added to the collection definition. It functions in two different ways:
Define the sort using the Movies/Shows column of the Sorts Table below along with any other builder to make that collection a Smart Label Collection.
collections: Marvel Cinematic Universe: trakt_list: https://trakt.tv/users/jawann2002/lists/marvel-cinematic-universe-movies?sort=rank,asc smart_label: release.desc
Provide a whole
smart_filter
to determine exactly how the smart collection should be built, ensuring to includelabel: <<smart_label>>
, which will link it to the collection labels.collections: Unplayed Marvel Cinematic Universe: trakt_list: https://trakt.tv/users/jawann2002/lists/marvel-cinematic-universe-movies?sort=rank,asc smart_label: sort_by: release.desc all: label: <<smart_label>> unplayed: true
This is extremely useful because smart collections don’t follow normal show/hide rules and can eliminate the need to have Plex Collectionless when used correctly. To fix the issue described in 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 or in the GitHub Discussions for help if you’re having any issues getting this to work properly.
Smart Filter¶
Uses Plex’s Advanced Filters to create a smart collection based on the filter parameters provided.
Any Advanced 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 Advanced Filters and take a screenshot of the parameters in the Plex UI and post it in either the Discussions or on Discord, and I’ll do my best to help you.
like Plex’s Advanced Filters 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 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 builder_level
Detail to change the type of items the collection holds.
There are a couple other attributes you can have at the top level only along with the base attribute are:
Special Attributes¶
Attribute |
Description & Values |
---|---|
|
Description: The max number of item for the filter. |
|
Description: This will control how the filter is sorted in your library. You can do a multi-level sort using a list. |
|
Description: Determines if a collection will fail on a validation error |
Sort Options¶
Sort Option |
Description |
Movies |
Shows |
Seasons |
Episodes |
Artists |
Albums |
Tracks |
---|---|---|---|---|---|---|---|---|
|
Sort by Title |
✅ |
✅ |
❌ |
✅ |
✅ |
✅ |
✅ |
|
Sort by Season |
❌ |
❌ |
✅ |
❌ |
❌ |
❌ |
❌ |
|
Sort by Show |
❌ |
❌ |
✅ |
✅ |
❌ |
❌ |
❌ |
|
Sort by Album Artist |
❌ |
❌ |
❌ |
❌ |
❌ |
✅ |
✅ |
|
Sort by Artist |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
✅ |
|
Sort by Album |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
✅ |
|
Sort by Year |
✅ |
✅ |
❌ |
✅ |
❌ |
✅ |
❌ |
|
Sort by Release Date (Originally Available) |
✅ |
✅ |
❌ |
✅ |
❌ |
✅ |
❌ |
|
Sort by Episode Release Date (Originally Available) |
❌ |
✅ |
✅ |
✅ |
❌ |
❌ |
❌ |
|
Sort by Critic Rating |
✅ |
✅ |
❌ |
✅ |
❌ |
✅ |
❌ |
|
Sort by Audience Rating |
✅ |
✅ |
❌ |
✅ |
❌ |
❌ |
❌ |
|
Sort by User Rating |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
|
Sort by Content Rating |
✅ |
✅ |
❌ |
❌ |
❌ |
❌ |
❌ |
|
Sort by Duration |
✅ |
❌ |
❌ |
✅ |
❌ |
❌ |
✅ |
|
Sort by Progress |
❌ |
❌ |
❌ |
✅ |
❌ |
❌ |
❌ |
|
Sort by Date Last Played |
❌ |
❌ |
❌ |
❌ |
✅ |
✅ |
✅ |
|
Sort by Number of Plays |
✅ |
❌ |
❌ |
✅ |
✅ |
✅ |
✅ |
|
Sort by Unplayed |
❌ |
✅ |
❌ |
❌ |
❌ |
❌ |
❌ |
|
Sort by Last Episode Date Added |
❌ |
✅ |
❌ |
❌ |
❌ |
❌ |
❌ |
|
Sort by Date Added |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
|
Sort by Date Last Viewed |
✅ |
✅ |
❌ |
✅ |
❌ |
❌ |
❌ |
|
Sort by Date Last Rated |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
✅ |
|
Sort by Popularity |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
✅ |
|
Sort by Resolution |
✅ |
❌ |
❌ |
✅ |
❌ |
❌ |
❌ |
|
Sort by Bitrate |
✅ |
❌ |
❌ |
✅ |
❌ |
❌ |
✅ |
|
Sort by Random |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
Filters¶
There are three fields per filter option when using Plex’s Advanced Filters in the Web UI.
Attribute: What attribute you wish to filter.
Modifier: Which modifier to use.
Value: Actual value to filter.
Example: Attribute.Modifier: Value
String Filters¶
String filters can be used with either no modifier or with .not
, .is
, .isnot
, .begins
, or .ends
.
String filter can take multiple values only as a list.
String Modifiers¶
String Modifier |
Description |
Plex Web UI Display |
---|---|---|
No Modifier |
Matches every item where the attribute contains the given string |
|
|
Matches every item where the attribute does not contain the given string |
|
|
Matches every item where the attribute exactly matches the given string |
|
|
Matches every item where the attribute does not exactly match the given string |
|
|
Matches every item where the attribute begins with the given string |
|
|
Matches every item where the attribute ends with the given string |
|
String Attributes¶
String Search |
Description |
Movie |
Show |
Music |
---|---|---|---|---|
|
Uses the title attribute to match |
✅ |
✅ |
❌ |
|
Uses the title attribute of the show’s episodes to match |
❌ |
✅ |
❌ |
|
Uses the studio attribute to match |
✅ |
✅ |
❌ |
|
Uses the edition attribute to match |
✅ |
❌ |
❌ |
|
Uses the Artist’s Title attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s Title attribute to match |
❌ |
❌ |
✅ |
|
Uses the Track’s Title attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s Record Label attribute to match |
❌ |
❌ |
✅ |
Tag Filters¶
Tag filters can be used with either no modifier or with .not
except for decade
and resolution
which can only be used with no modifier.
Tag filter can take multiple values as a list or a comma-separated string.
Tag Modifiers¶
Tag Modifier |
Description |
Plex Web UI Display |
---|---|---|
No Modifier |
Matches every item where the attribute matches the given string |
|
|
Matches every item where the attribute does not match the given string |
|
Tag Attributes¶
Tag Search |
Description |
Movie |
Show |
Music |
---|---|---|---|---|
|
Uses the actor tags to match |
✅ |
✅ |
❌ |
|
Uses the audio language tags to match |
✅ |
✅ |
❌ |
|
Uses the collection tags to match for top level collections |
✅ |
✅ |
❌ |
|
Uses the collection tags to match for season collections |
❌ |
✅ |
❌ |
|
Uses the collection tags to match for episode collections |
❌ |
✅ |
❌ |
|
Uses the content rating tags to match |
✅ |
✅ |
❌ |
|
Uses the country tags to match |
✅ |
✅ |
❌ |
|
Uses the year tag to match the decade |
✅ |
❌ |
❌ |
|
Uses the director tags to match |
✅ |
❌ |
❌ |
|
Uses the genre tags to match |
✅ |
✅ |
❌ |
|
Uses the label tags to match for top level collections |
✅ |
✅ |
❌ |
|
Uses the label tags to match for season collections |
❌ |
✅ |
❌ |
|
Uses the label tags to match for episode collections |
❌ |
✅ |
❌ |
|
Uses the network tags to match |
❌ |
✅ |
❌ |
|
Uses the actor tags to match |
✅ |
❌ |
❌ |
|
Uses the resolution tags to match |
✅ |
✅ |
❌ |
|
Uses the subtitle language tags to match |
✅ |
✅ |
❌ |
|
Uses the writer tags to match |
✅ |
❌ |
❌ |
|
Uses the year tag to match |
✅ |
✅ |
❌ |
|
Uses the year tag to match |
❌ |
✅ |
❌ |
|
Uses the Artist’s Genre attribute to match |
❌ |
❌ |
✅ |
|
Uses the Artist’s Collection attribute to match |
❌ |
❌ |
✅ |
|
Uses the Artist’s Country attribute to match |
❌ |
❌ |
✅ |
|
Uses the Artist’s Mood attribute to match |
❌ |
❌ |
✅ |
|
Uses the Artist’s Style attribute to match |
❌ |
❌ |
✅ |
|
Uses the Artist’s Label attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s Genre attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s Mood attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s Style attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s Format attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s Type attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s Collection attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s Source attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s Label attribute to match |
❌ |
❌ |
✅ |
|
Uses the Track’s Mood attribute to match |
❌ |
❌ |
✅ |
|
Uses the Track’s Source attribute to match |
❌ |
❌ |
✅ |
|
Uses the Track’s Label attribute to match |
❌ |
❌ |
✅ |
1 You can use current_year
to have PMM use the current years value. This can be combined with a -#
at the end to subtract that number of years. i.e. current-2
Date Filters¶
Date filters can be used with either no modifier or with .not
, .before
, or .after
.
No date filter can take multiple values.
Date Modifiers¶
Date Modifier |
Description |
Plex Web UI Display |
---|---|---|
No Modifier |
Matches every item where the date attribute is in the last X days |
|
|
Matches every item where the date attribute is not in the last X days |
|
|
Matches every item where the date attribute is before the given date |
|
|
Matches every item where the date attribute is after the given date |
|
Date Attributes¶
Date Search |
Description |
Movie |
Show |
Music |
---|---|---|---|---|
|
Uses the date added attribute to match |
✅ |
✅ |
❌ |
|
Uses the date added attribute of the show’s episodes to match |
❌ |
✅ |
❌ |
|
Uses the release date attribute (originally available) to match |
✅ |
✅ |
❌ |
|
Uses the air date attribute (originally available) of the show’s episodes to match |
❌ |
✅ |
❌ |
|
Uses the date last played attribute to match |
✅ |
✅ |
❌ |
|
Uses the date last played attribute of the show’s episodes to match |
❌ |
✅ |
❌ |
|
Uses the Artist’s date added attribute to match |
❌ |
❌ |
✅ |
|
Uses the Artist’s last played attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s last played attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s date added attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s release date attribute to match |
❌ |
❌ |
✅ |
|
Uses the Track’s date last played attribute to match |
❌ |
❌ |
✅ |
|
Uses the Track’s date last skipped attribute to match |
❌ |
❌ |
✅ |
|
Uses the Track’s date last rated attribute to match |
❌ |
❌ |
✅ |
|
Uses the Track’s date added attribute to match |
❌ |
❌ |
✅ |
Number Filters¶
Number filters must use .gt
, .gte
, .lt
, or .lte
as a modifier only the rating filters can use .rated
.
No number filter can take multiple values.
Number Modifiers¶
Number Modifier |
Description |
Plex Web UI Display |
---|---|---|
|
Matches every item where the number attribute is greater than the given number |
|
|
Matches every item where the number attribute is greater than or equal to the given number |
N/A |
|
Matches every item where the number attribute is less than the given number |
|
|
Matches every item where the number attribute is less than or equal to the given number |
N/A |
|
Matches every item either rated or not rated |
N/A |
.rated
only works for rating filters
Number Attributes¶
Number Search |
Description |
Movie |
Show |
Music |
---|---|---|---|---|
|
Uses the duration attribute to match using minutes |
✅ |
❌ |
❌ |
|
Uses the plays attribute to match |
✅ |
✅ |
❌ |
|
Uses the Episode’s plays attribute to match |
❌ |
✅ |
❌ |
|
Uses the critic rating attribute to match |
✅ |
✅ |
❌ |
|
Uses the audience rating attribute to match |
✅ |
✅ |
❌ |
|
Uses the user rating attribute to match |
✅ |
✅ |
❌ |
|
Uses the user rating attribute of the show’s episodes to match |
❌ |
✅ |
❌ |
|
Uses the year attribute to match |
✅ |
✅ |
❌ |
|
Uses the Episode’s year attribute to match |
❌ |
✅ |
❌ |
|
Uses the Album’s year attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s decade attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s plays attribute to match |
❌ |
❌ |
✅ |
|
Uses the Track’s plays attribute to match |
❌ |
❌ |
✅ |
|
Uses the Track’s skips attribute to match |
❌ |
❌ |
✅ |
|
Uses the Artist’s user rating attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s user rating attribute to match |
❌ |
❌ |
✅ |
|
Uses the Album’s critic rating attribute to match |
❌ |
❌ |
✅ |
|
Uses the Track’s user rating attribute to match |
❌ |
❌ |
✅ |
1 You can use current_year
to have PMM use the current years value. This can be combined with a -#
at the end to subtract that number of years. i.e. current-2
Boolean Filters¶
Boolean Filters take no modifier and can only be either true
or false
.
Boolean Attributes¶
Boolean Search |
Description |
Movie |
Show |
Music |
---|---|---|---|---|
|
Is HDR |
✅ |
✅ |
❌ |
|
Is Unmatched |
✅ |
❌ |
❌ |
|
Is Duplicate |
✅ |
❌ |
❌ |
|
Is Unplayed |
✅ |
❌ |
❌ |
|
Is In Progress |
✅ |
❌ |
❌ |
|
Is Trashed |
✅ |
✅ |
❌ |
|
Has Unplayed Episodes |
❌ |
✅ |
❌ |
|
Has Episodes Unplayed |
❌ |
✅ |
❌ |
|
Has Duplicate Episodes |
❌ |
✅ |
❌ |
|
Has Episode Progress |
❌ |
✅ |
❌ |
|
Has Episodes Unmatched |
❌ |
✅ |
❌ |
|
Has Shows Unmatched |
❌ |
✅ |
❌ |
|
Is Artist’s Unmatched |
❌ |
❌ |
✅ |
|
Is Album’s Unmatched |
❌ |
❌ |
✅ |
|
Is Track Trashed |
❌ |
❌ |
✅ |
Smart Filter Examples¶
A few examples are listed below:
collections:
Documentaries:
smart_filter:
all:
genre: Documentary
collections:
Dave Chappelle Comedy:
smart_filter:
all:
actor: Dave Chappelle
genre: Comedy
collections:
Top Action Movies:
smart_filter:
all:
genre: Action
sort_by: audience_rating.desc
limit: 20
collections:
90s Movies:
smart_filter:
any:
year:
- 1990
- 1991
- 1992
- 1993
- 1994
- 1995
- 1996
- 1997
- 1998
- 1999
collections:
90s Movies:
smart_filter:
any:
decade: 1990
collections:
Best 2010+ Movies:
smart_filter:
all:
year.gte: 2010
sort_by: audience_rating.desc
limit: 20
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 filter on those names.
collections:
Robin Williams:
smart_filter:
all:
actor: tmdb
tmdb_person: 2157
collections:
Steven Spielberg:
smart_filter:
all:
director: tmdb
tmdb_person: https://www.themoviedb.org/person/488-steven-spielberg
collections:
Quentin Tarantino:
smart_filter:
any:
actor: tmdb
director: tmdb
producer: tmdb
writer: tmdb
tmdb_person: 138