Files define the structure and format for creating Collections, Overlays, Playlists, and Metadata Edits within your libraries.
Files are modular and when properly leveraged, they not only facilitate the management of your library's collections and
metadata but also serve as a crucial backup resource in case a restore is necessary.
These are the File types that can be utilized against Plex servers:
In this example, multiple file blocks are defined for the "TV Shows" library:
Unlike the others, Playlist Files are not defined per-library.
Within the above example, Kometa will:
First, look within the root of the Kometa directory (also known as config/) for a Collection File named TVShows.yml. If this file does not exist,
Kometa will skip the entry and move to the next one in the list.
Then, look within the root of the Kometa directory (also known as config/) for a directory called TV Shows, and then load any collection files within that directory.
Then, look in the Defaults folder within the local Kometa folder
[or docker container] for a file called ribbon.yml.
Then, look within the Custom Defined Repo for a file called overlays.yml.
Finally, load the playlist file located at https://somewhere.com/Playlists.yml.
See File Blocks for more information on how to define files in the config.
Builders are attributes placed at the top level of the definition that tell Kometa what items
belong in a collection/overlay/playlist. Multiple builders can be used in one definition. These could come from a
variety of sources including but not limited to:
Your own Plex Sever using the Advance Filters.
A Tautulli instance with your most played items.
A List of media online on a site like IMDb, TMDb, or TVDb.
Builder Example
collections:My Test Collection 1:plex_search:any:genre:ActionMy Test Collection 2:imdb_chart:top_moviesMy Test Collection 3:imdb_search:type:movielimit:100genre:actionvotes.gte:1000plex_search:any:genre:Action
Filters are all put under a single attribute filters. These attributes will filter out items only after
builders find them. Filters alone do nothing, they need builders.
There are some specific filters that can filter missing items sent to Radarr/Sonarr and if needed you can use the
only_filter_missing setting to have the filter only effect the missing items.
Running filters are often slower than builders so whenever possible use only builders to build the definition.
Filter Example
This uses the plex_all Buidler to get every item currently in the plex library and then checks TMDb if they have
either aftercreditsstinger or duringcreditsstinger as a keyword.
collections:My Test Collection 1:plex_all:truefilters:tmdb_keyword:aftercreditsstinger, duringcreditsstinger
Settings are attributes placed at the top level of the definition that tells Kometa how to run the
definition. Each setting will affect how the definition is run or shown in the log.
Setting Example
This sets the colleciton to only build if the builders find at minimum 10 items and will sync items to the
collection (removing items that no longer are found by the builders).
collections:My Test Collection 1:sync_mode:syncminimum_items:10plex_search:any:genre:Action
Radarr/Sonarr Settings are attributes placed at the top level of the definition that tells Kometa how
Radarr/Sonarr is handled in this specific definition.
Setting Example
This sets the colleciton to add missing movies from the builders to Radarr.
collections:My Test Collection 1:radarr_add_missing:trueimdb_search:type:movielimit:100genre:actionvotes.gte:1000
Item Updates are attributes placed at the top level of the definition that tells Kometa Metadata Changes
for every item found in the Collection/Playlist.
Item Metadata Update Example
This will add the genre Credits to every item found after builders and filters are run.
collections:My Test Collection 1:item_genre:Creditsplex_all:truefilters:tmdb_keyword:aftercreditsstinger, duringcreditsstinger
These services do not store season or episode-level ratings, using these options will allow show ratings to be
applied at the season or episode level.
YAML Lists Explained
YAML supports different ways to define lists. Below are some common methods:
1. List Within a Mapping
fruits:
- apple
- banana
- cherry
2. Inline Style
fruits: [ apple, banana, cherry ]
Each style can be used depending on your needs. The block style is typically more readable for longer lists,
while the inline style is compact and useful for short lists.
YAML Dictionaries Explained
Dictionaries are used to associate key/value pairs that are unordered. Dictionaries can be nested by increasing
the indentation,
or new dictionaries can be created at the same level by resolving the previous one.
cache: true cache_expiration: 60
The "keys" are cache and cache_expiration and the "values" are true and
60 respectively.
You can use multiple score filters but the number will have to match every filter. All unrated items are considered
to have a 0 rating.
These filters only work if the URL is to the List View of the Letterboxd list (i.e. it should have
/detail/ in the URL) or to an account's Reviews (i.e. it should have
/USERNAME/films/reviews/ in the URL).
This filter only works if the URL is to the List View of the Letterboxd list (i.e. it should have
/detail/ in the URL).
When title is not provided and the mapping name was not specified as an ID, the default behaviour is to
use the mapping name as title for matching.
When mapping_id is not provided and the mapping name was specified as an ID, the default behaviour is
to use the mapping name as mapping_id for matching.
When the server does not have a Plex Pass then the Edition Field is not accessible. In this scenario, Kometa will
check the movie's filepath for {edition-...} to determine what the edition is.
Requires Plex Pass.
Must be using the New Plex Movie Agent or the New Plex TV Agent.
Each default has a key that when calling to effect a specific collection/overlay you must replace
<<key>> with when calling.
You can use current_year to have Kometa use the current year's value. This can be combined with a
-# at the end to subtract that number of years. i.e. current_year-2
Also filters out missing movies/shows from being added to Radarr/Sonarr. These values also cannot use the count
modifiers.
You can use current_year to have Kometa use the current year's value. This can be combined with a
-# at the end to subtract that number of years. i.e. current_year-2
Also filters out missing movies/shows from being added to Radarr/Sonarr. These values also cannot use the count
modifiers.
You can use current_year to have Kometa use the current year's value. This can be combined with a
-# at the end to subtract that number of years. i.e. current_year-2
Also filters out missing movies/shows from being added to Radarr/Sonarr. These values also cannot use the count
modifiers.
Also is a Tag Filter and can use all of those modifiers.
Requires Template Variables to function
Designed to use the TRaSH Guides filename naming scheme
Editions overlay is designed to use the Editions field within Plex (which requires Plex Pass to use) or the TRaSH Guides filename naming scheme
Designed to use the TRaSH Guides filename naming scheme
While these overlays can technically be applied at this level, they were not designed for it. For example, a show's
season cannot have a resolution since it is not a video file, and an episode cannot have a Common Sense rating since
only Movies and Shows are rated by Common Sense.