Skip to content

Latest commit

 

History

History
175 lines (150 loc) · 6.7 KB

Plex-Builders.md

File metadata and controls

175 lines (150 loc) · 6.7 KB

You can build different collections using the features of Plex.

Name Attribute Description Works with Movies Works with Shows
Plex All plex_all Gets every movie/show in your library. Useful with collection filters ✔️ ✔️
Plex Collection plex_collection Gets every movie/show in another Plex Collection ✔️ ✔️
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

Gets every movie/show in your library. Useful with collection filters.

The expected input is either true or false.

collections:
  9.0 Movies:
    all: true
    filters:
      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

collections:
  Dinosaurs:
    plex_collection: Jurassic Park

If you want to add multiple collections you have to use a list. Comma-separated values will not work.

collections:
  Dinosaurs:
    plex_collection:
      - Jurassic Park
      - The Land Before Time

Plex Collectionless

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 collections displaying as well as the 3 Iron Man movies.

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.

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 detailing the issue more on their forms.

Plex Search

Gets every movie/show based on the search parameters provided. The search will return any movie/show that matches at least one term from each search option. You can run multiple searches.

Search Options

Search Option Description Movie
Libraries
Show
Libraries
actor Gets every movie with the specified actor ✔️
country Gets every movie with the specified country ✔️
decade Gets every movie from the specified year + the 9 that follow i.e. 1990 will get you 1990-1999 ✔️
director Gets every movie with the specified director ✔️
genre Gets every movie/show with the specified genre ✔️ ✔️
producer Gets every movie with the specified producer ✔️
studio Gets every movie/show with the specified studio ✔️ ✔️
writer Gets every movie with the specified writer ✔️
year Gets every movie/show with the specified year (Put a - between two years for a range i.e. year: 1990-1999 or end with NOW to go till current i.e. year: 2000-NOW) ✔️ ✔️
  • You can only use each search option once per plex_search but multiple values are supported as either a list or a comma-separated string.
  • If you want to restrict the search by multiples of the same attribute (i.e. You want every movie that is a Romance and Comedy) try using Collection Filters.
collections:
  Documentaries:
    plex_search:
      genre: Documentary
collections:
  Dave Chappelle Comedy:
    plex_search:
      actor: Dave Chappelle
      genre: Comedy
collections:
  Pixar:
    plex_search:
      studio: Pixar
collections:
  90s Movies:
    plex_search:
      year:
        - 1990
        - 1991
        - 1992
        - 1993
        - 1994
        - 1995
        - 1996
        - 1997
        - 1998
        - 1999
collections:
  90s Movies:
    plex_search:
      year: 1990-1999
collections:
  2010+ Movies:
    plex_search:
      year: 2010-NOW
collections:
  90s Movies:
    plex_search:
      decade: 1990

If you only want to search using a single attribute you can do so without plex_search.

collections:
  90s Movies:
    year: 1990-1999

If you specify TMDb Person ID's using the Collection 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.

collections:
  Robin Williams:
    actor: tmdb
    tmdb_person: 2157
collections:
  Steven Spielberg:
    director: tmdb
    tmdb_person: https://www.themoviedb.org/person/488-steven-spielberg
collections:
  Quentin Tarantino:
    actor: tmdb
    director: tmdb
    producer: tmdb
    writer: tmdb
    tmdb_person: 138