Plex-Meta-Manager/docs/files/builders/smart.md
2024-04-22 10:20:12 -04:00

48 KiB

Smart Builders

Smart Builders allow Kometa to create Smart Collections in two different ways.

The results of these builders are dynamic and do not require Kometa to re-run in order to update, instead they will update automatically as the data within your Plex Library updates (i.e. if new media is added)

???+ note

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 be added to the collection definition. It functions in two different ways:

  1. 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
    
  2. Provide a whole smart_filter to determine exactly how the smart collection should be built, ensuring to include label: <<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 Kometa 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 Setting 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
limit Description: The max number of item for the filter.
Default: all
Values: all or a number greater than 0
sort_by Description: This will control how the filter is sorted in your library. You can do a multi-level sort using a list.
Default: random
Values: Any sort options for your filter type in the Sorts Options Table
validate Description: Determines if a collection will fail on a validation error
Default: true
Values: true or false

Sort Options

Sort Option Description Movies Shows Seasons Episodes Artists Albums Tracks
title.asc
title.desc
Sort by Title :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green }
season.asc
season.desc
Sort by Season :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
show.asc
show.desc
Sort by Show :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
album_artist.asc
album_artist.desc
Sort by Album Artist :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green }
artist.asc
artist.desc
Sort by Artist :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album.asc
album.desc
Sort by Album :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
year.asc
year.desc
Sort by Year :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
release.asc
release.desc
Sort by Release Date (Originally Available) :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_release.asc
episode_release.desc
Sort by Episode Release Date (Originally Available) :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
critic_rating.asc
critic_rating.desc
Sort by Critic Rating :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
audience_rating.asc
audience_rating.desc
Sort by Audience Rating :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
user_rating.asc
user_rating.desc
Sort by User Rating :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green }
content_rating.asc
content_rating.desc
Sort by Content Rating :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
duration.asc
duration.desc
Sort by Duration :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
progress.asc
progress.desc
Sort by Progress :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
played.asc
played.desc
Sort by Date Last Played :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green }
plays.asc
plays.desc
Sort by Number of Plays :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green }
unplayed.asc
unplayed.desc
Sort by Unplayed :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
episode_added.asc
episode_added.desc
Sort by Last Episode Date Added :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
added.asc
added.desc
Sort by Date Added :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green }
viewed.asc
viewed.desc
Sort by Date Last Viewed :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
rated.asc
rated.desc
Sort by Date Last Rated :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
popularity.asc
popularity.desc
Sort by Popularity :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
resolution.asc
resolution.desc
Sort by Resolution :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
bitrate.asc
bitrate.desc
Sort by Bitrate :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
random Sort by Random :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green }

Filters

There are three fields per filter option when using Plex's Advanced Filters in the Web UI.

  1. Attribute: What attribute you wish to filter.
  2. Modifier: Which modifier to use.
  3. 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 contains
.not Matches every item where the attribute does not contain the given string does not contain
.is Matches every item where the attribute exactly matches the given string is
.isnot Matches every item where the attribute does not exactly match the given string is not
.begins Matches every item where the attribute begins with the given string begins with
.ends Matches every item where the attribute ends with the given string ends with

String Attributes

String Search Description Movie
Libraries
Show
Libraries
Music
Libraries
title Uses the title attribute to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_title Uses the title attribute of the show's episodes to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
studio Uses the studio attribute to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
edition Uses the edition attribute to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
artist_title Uses the Artist's Title attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_title Uses the Album's Title attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
track_title Uses the Track's Title attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_record_label Uses the Album's Record Label attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }

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 is
.not Matches every item where the attribute does not match the given string is not

Tag Attributes

Tag Search Description Movie
Libraries
Show
Libraries
Music
Libraries
actor Uses the actor tags to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_actor Uses the episode actor tags to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
audio_language Uses the audio language tags to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
collection Uses the collection tags to match for top level collections :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
season_collection Uses the collection tags to match for season collections :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_collection Uses the collection tags to match for episode collections :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
content_rating Uses the content rating tags to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
country Uses the country tags to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
decade1 Uses the year tag to match the decade :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
director Uses the director tags to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
genre Uses the genre tags to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
label Uses the label tags to match for top level collections :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
season_label Uses the label tags to match for season collections :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_label Uses the label tags to match for episode collections :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
network Uses the network tags to match
Only works with the New Plex TV Agent
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
producer Uses the actor tags to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
resolution Uses the resolution tags to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
subtitle_language Uses the subtitle language tags to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
writer Uses the writer tags to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
year1 Uses the year tag to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_year1 Uses the year tag to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
artist_genre Uses the Artist's Genre attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
artist_collection Uses the Artist's Collection attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
artist_country Uses the Artist's Country attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
artist_mood Uses the Artist's Mood attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
artist_style Uses the Artist's Style attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
artist_label Uses the Artist's Label attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_genre Uses the Album's Genre attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_mood Uses the Album's Mood attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_style Uses the Album's Style attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_format Uses the Album's Format attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_type Uses the Album's Type attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_collection Uses the Album's Collection attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_source Uses the Album's Source attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_label Uses the Album's Label attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
track_mood Uses the Track's Mood attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
track_source Uses the Track's Source attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
track_label Uses the Track's Label attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }

1 You can use current_year to have Kometa use the current years value. This can be combined with a -# at the end to subtract that number of years. i.e. current_year-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
Format: number of days
Example: 30
is in the last
.not Matches every item where the date attribute is not in the last X days
Format: number of days
Example: 30
is not in the last
.before Matches every item where the date attribute is before the given date
Format: MM/DD/YYYY or today for the current day
Example: 01/01/2000
is before
.after Matches every item where the date attribute is after the given date
Format: MM/DD/YYYY or today for the current day
Example: 01/01/2000
is after

Date Attributes

Date Search Description Movie
Libraries
Show
Libraries
Music
Libraries
added Uses the date added attribute to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_added Uses the date added attribute of the show's episodes to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
release Uses the release date attribute (originally available) to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_air_date Uses the air date attribute (originally available) of the show's episodes to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
last_played Uses the date last played attribute to match :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_last_played Uses the date last played attribute of the show's episodes to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
artist_added Uses the Artist's date added attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
artist_last_played Uses the Artist's last played attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_last_played Uses the Album's last played attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_added Uses the Album's date added attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_released Uses the Album's release date attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
track_last_played Uses the Track's date last played attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
track_last_skipped Uses the Track's date last skipped attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
track_last_rated Uses the Track's date last rated attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
track_added Uses the Track's date added attribute to match :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }

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
.gt Matches every item where the number attribute is greater than the given number
Format: number
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
Format: number
Example: 30, 1995, or 7.5
N/A
.lt Matches every item where the number attribute is less than the given number
Format: number
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
Format: number
Example: 30, 1995, or 7.5
N/A
.rated Matches every item either rated or not rated
Format: true or false
N/A
  • .rated only works for rating filters

Number Attributes

Number Search Description Movie
Libraries
Show
Libraries
Music
Libraries
duration Uses the duration attribute to match using minutes
Minimum: 0
:fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
plays Uses the plays attribute to match
Minimum: 0
:fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_plays Uses the Episode's plays attribute to match
Minimum: 0
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
critic_rating Uses the critic rating attribute to match
Range: 0.0 - 10.0
:fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
audience_rating Uses the audience rating attribute to match
Range: 0.0 - 10.0
:fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
user_rating Uses the user rating attribute to match
Range: 0.0 - 10.0
:fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_user_rating Uses the user rating attribute of the show's episodes to match
Range: 0.0 - 10.0
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
year1 Uses the year attribute to match
Minimum: 0
:fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_year1 Uses the Episode's year attribute to match
Minimum: 0
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
album_year1 Uses the Album's year attribute to match
Minimum: 0
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_decade1 Uses the Album's decade attribute to match
Minimum: 0
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_plays Uses the Album's plays attribute to match
Minimum: 0
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
track_plays Uses the Track's plays attribute to match
Minimum: 0
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
track_skips Uses the Track's skips attribute to match
Minimum: 0
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
artist_user_rating Uses the Artist's user rating attribute to match
Range: 0.0 - 10.0
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_user_rating Uses the Album's user rating attribute to match
Range: 0.0 - 10.0
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_critic_rating Uses the Album's critic rating attribute to match
Range: 0.0 - 10.0
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
track_user_rating Uses the Track's user rating attribute to match
Range: 0.0 - 10.0
:fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }

1 You can use current_year to have Kometa use the current years value. This can be combined with a -# at the end to subtract that number of years. i.e. current_year-2

Boolean Filters

Boolean Filters take no modifier and can only be either true or false.

Boolean Attributes

Boolean Search Description Movie
Libraries
Show
Libraries
Music
Libraries
hdr Is HDR :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
unmatched Is Unmatched :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
duplicate Is Duplicate :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
unplayed Is Unplayed :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
progress Is In Progress :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red }
trash Is Trashed :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
unplayed_episodes Has Unplayed Episodes :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_unplayed Has Episodes Unplayed :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_duplicate Has Duplicate Episodes :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_progress Has Episode Progress :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
episode_unmatched Has Episodes Unmatched :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
show_unmatched Has Shows Unmatched :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green } :fontawesome-solid-circle-xmark:{ .red }
artist_unmatched Is Artist's Unmatched :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
album_unmatched Is Album's Unmatched :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }
track_trash Is Track Trashed :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-xmark:{ .red } :fontawesome-solid-circle-check:{ .green }

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 Setting 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