Plex-Meta-Manager/docs/builders/trakt.md

45 KiB

Trakt Builders

You can find items using the features of Trakt.tv (Trakt).

Configuring Trakt in the config is required for any of these builders.

Attribute Description Works with Movies Works with Shows Works with Playlists and Custom Sort
trakt_list Finds every movie/show in the Trakt List
trakt_list_details Finds every movie/show in the Trakt List and updates the collection summary with the list description
trakt_chart Finds the movies/shows in the Trakt Chart
trakt_userlist Finds every movie/show in the Trakt Userlist
trakt_recommendations Finds the movies/shows in Trakt's Personal Recommendations for your User Movies/Shows
trakt_boxoffice Finds the 10 movies in Trakt's Top Box Office Movies list

Trakt List

Finds every item in the Trakt List.

The expected input is a Trakt List URL. Multiple values are supported only as a list.

The sync_mode: sync and collection_order: custom Details are recommended since the lists are continuously updated and in a specific order.

Trakt Lists cannot be sorted through the API, but the list is always returned to the default list order if you own the list.

???+ tip

If you have [authorized Trakt](../config/trakt.md) then you can use private Trakt Lists, this is not possible if you have not authorized Trakt.
collections:
  Christmas:
    trakt_list:
      - https://trakt.tv/users/movistapp/lists/christmas-movies
      - https://trakt.tv/users/2borno2b/lists/christmas-movies-extravanganza
    sync_mode: sync
collections:
  Reddit Top 250:
    trakt_list: https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition
    collection_order: custom
    sync_mode: sync
  • You can update the collection details with the Trakt List's description by using trakt_list_details.
  • You can specify multiple collections in trakt_list_details but it will only use the first one to update the collection summary.
collections:
  Reddit Top 250:
    trakt_list_details: https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition
    collection_order: custom
    sync_mode: sync

Trakt Chart

Finds the movies/shows in the Trakt Chart. The options are detailed below.

The sync_mode: sync and collection_order: custom Details are recommended since the lists are continuously updated and in a specific order.

Attribute Description & Values
chart Description: Which Trakt chart to query
Values:
trendingTrakt's Trending Movies/Shows list
popularTrakt's Popular Movies/Shows list
recommendedTrakt's Recommended Movies/Shows list
watchedTrakt's Watched Movies/Shows list
collectedTrakt's Collected Movies/Shows list
time_period Description: Time Period for the chart. Does not work with trending or popular chart types.
Default: weekly
Values: daily, weekly, monthly, yearly, or all
limit Description: Don't return more then this number
Default: 10
Values: Number of Items to query.
query Description: Search titles and descriptions for this
Values: Any String.
years Description: Search for the specified years only
Values: 4 digit year or range of 4 digit years. i.e. 1950 or 1950-1959
genres Description: Search for the specified genres only
Values: Comma separated string or list of genres
Movie Genres: action, adventure, animation, anime, comedy, crime, documentary, drama, family, fantasy, history, holiday, horror, music, musical, mystery, none, romance, science-fiction, short, sporting-event, superhero, suspense, thriller, war, western
Show Genres: action, adventure, animation, anime, biography, children, comedy, crime, documentary, drama, family, fantasy, game-show, history, holiday, home-and-garden, horror, mini-series, music, musical, mystery, news, none, reality, romance, science-fiction, short, soap, special-interest, sporting-event, superhero, suspense, talk-show, thriller, war, western
languages Description: Search for the specified languages only
Values: Comma separated string or list of languages
Movie Languages: ab, af, ak, sq, am, ar, an, hy, as, av, ay, az, bm, ba, eu, be, bn, bi, nb, bs, bg, my, ca, km, ch, ce, ny, zh, kw, co, cr, hr, cs, da, dv, nl, dz, en, eo, et, fo, fj, fi, fr, ff, gd, gl, lg, ka, de, el, gn, gu, ht, ha, he, hi, hu, is, ig, id, ie, iu, ik, ga, it, ja, jv, kl, kn, ks, kk, rw, ky, kg, ko, ku, lo, la, lv, li, ln, lt, lb, mk, mg, ms, ml, mt, mi, mr, mh, mn, nv, ne, se, no, nn, oc, oj, or, om, os, pi, pa, fa, pl, pt, ps, qu, ro, rm, rn, ru, sm, sg, sa, sc, sr, sn, ii, sd, si, sk, sl, so, st, es, su, sw, ss, sv, tl, ty, tg, ta, tt, te, th, bo, ti, to, ts, tn, tr, tk, tw, ug, uk, ur, uz, vi, cy, fy, wo, xh, yi, yo, za, zu
Show Languages: ab, af, sq, am, ar, hy, eu, be, bn, nb, bs, bg, ca, km, zh, hr, cs, da, dv, nl, en, et, fi, fr, gl, ka, de, el, gu, he, hi, hu, is, id, ga, it, ja, kn, ko, lo, la, lv, lt, lb, mk, ms, ml, mt, mi, mr, ne, se, no, nn, pa, fa, pl, pt, ro, ru, sr, si, sk, sl, es, sv, tl, ta, te, th, tr, tw, uk, ur, uz, vi, cy
countries Description: Search for the specified countries only
Values: Comma separated string or list of countries
Movie Countries: af, al, dz, as, ad, ao, ai, aq, ag, ar, am, aw, au, at, az, bs, bh, bd, bb, by, be, bz, bj, bm, bt, bo, ba, bw, bv, br, io, bn, bg, bf, bi, cv, kh, cm, ca, ky, cf, td, cl, cn, cx, co, km, cg, cd, ck, cr, hr, cu, cy, cz, ci, dk, dj, dm, do, ec, eg, sv, gq, er, ee, sz, et, fk, fo, fj, fi, fr, gf, pf, tf, ga, gm, ge, de, gh, gi, gr, gl, gd, gp, gu, gt, gn, gw, gy, ht, va, hn, hk, hu, is, in, id, ir, iq, ie, il, it, jm, jp, jo, kz, ke, ki, kp, kr, kw, kg, la, lv, lb, ls, lr, ly, li, lt, lu, mo, mg, mw, my, mv, ml, mt, mh, mq, mr, mu, yt, mx, md, mc, mn, me, ms, ma, mz, mm, na, nr, np, nl, nc, nz, ni, ne, ng, nf, mk, mp, no, om, pk, pw, ps, pa, pg, py, pe, ph, pn, pl, pt, pr, qa, ro, ru, rw, re, sh, kn, lc, vc, ws, sm, st, sa, sn, rs, sc, sl, sg, sk, si, sb, so, za, ss, es, lk, sd, sr, se, ch, sy, tw, tj, tz, th, tl, tg, tk, to, tt, tn, tr, tm, tc, tv, ug, ua, ae, gb, us, um, uy, uz, vu, ve, vn, vg, vi, wf, eh, ye, zm, zw
Show Countries: af, ad, ar, am, au, at, bd, by, be, bz, ba, bw, br, io, bg, kh, ca, td, cl, cn, co, hr, cu, cy, cz, dk, do, ec, eg, ee, sz, fi, fr, ge, de, gr, hn, hk, hu, is, in, id, ir, iq, ie, il, it, jp, jo, kz, kp, kr, kw, la, lv, lb, lt, lu, my, mv, mt, mx, md, mc, me, ma, np, nl, nz, ng, mk, mp, no, pk, pa, py, pe, ph, pl, pt, pr, qa, ro, ru, sa, sn, rs, sg, sk, si, za, es, lk, se, ch, sy, tw, th, tg, tn, tr, ua, ae, gb, us, uy, ve, vn
certifications Description: Search for the specified certifications only
Values: Comma separated string or list of certifications
Movie Certifications: g, pg, pg-13, r, nr
Show Certifications: tv-y, tv-y7, tv-g, tv-pg, tv-14, tv-ma, nr
runtimes Description: Search for the specified runtime range
Values: range of int i.e. 0-60
ratings Description: Search for the specified rating range
Values: range of int i.e. 80-100
networks Description: Search for the specified networks only Only works with shows
Values: Comma separated string or list of networks
status Description: Search for the specified status only Only works with shows
Values: Comma separated string or list of statuses
Status: returning, production, planned, canceled, ended

These are the links to the trakt charts that is looked at by time period.

Time Period Collected Recommended Watched
Daily Movies/Shows Movies/Shows Movies/Shows
Weekly Movies/Shows Movies/Shows Movies/Shows
Monthly Movies/Shows Movies/Shows Movies/Shows
Yearly Movies/Shows Movies/Shows Movies/Shows
All-Time Movies/Shows Movies/Shows Movies/Shows
collections:
  Trakt Trending:
    trakt_chart:
      chart: trending
      limit: 30
    collection_order: custom
    sync_mode: sync

You can use multiple charts in one builder using a list.

collections:
  Trakt Trending & Popular:
    trakt_chart:
      - chart: trending
        limit: 30
      - chart: popular
        limit: 30
    sync_mode: sync

Trakt Userlist

Finds every movie/show in the Trakt Userlist.

The sync_mode: sync and collection_order: custom Details are recommended since the lists are continuously updated and in a specific order.

Attribute Description & Values
userlist Description: Which Trakt userlist to query
Values:
watchlistTrakt User's Watchlist
recommendationsTrakt User's Personal Recommendations list
watchedTrakt User's Personal Watched list
collectedTrakt User's Personal Collected list
user Description: The User who's user lists you want to query.
Default: me
Values: Username of User or me for the authenticated user.
sort_by Description: How to sort the results
Default: rank
Values: rank, added, released, title
collections:
  Trakt Watchlist:
    trakt_userlist: 
      userlist: watchlist
      user: me
      sort_by: released
    collection_order: custom
    sync_mode: sync

You can use multiple charts in one builder using a list.

collections:
  Trakt Watchlist:
    trakt_userlist:
      - userlist: watched
        user: me
      - userlist: collected
        user: me
    collection_order: custom
    sync_mode: sync

Trakt Recommendations

Finds the movies/shows in Trakt's Recommendations for Movies/Shows

The expected input is a single integer value of how many movies/shows to query.

The sync_mode: sync and collection_order: custom Details are recommended since the lists are continuously updated and in a specific order.

collections:
  Trakt Recommendations:
    trakt_recommendations: 30
    collection_order: custom
    sync_mode: sync

Trakt Box Office

Finds the 10 movies in Trakt's Top Box Office Movies list.

The expected input is true.

The sync_mode: sync and collection_order: custom Details are recommended since the lists are continuously updated and in a specific order.

collections:
  Trakt Collected:
    trakt_boxoffice: true
    collection_order: custom
    sync_mode: sync

Syncing Plex Collections to Trakt Lists

A combination of PMM settings/attributes can be utilized to create a collection via PMM and then sync them to a blank or existing Trakt List.

NOTE: You must either create an empty Trakt list or specify an existing Trakt list which you have write access to.

collections:
  My Favourite Movies:
    sync_to_trakt_list: myfilms
    # trakt_list: https://trakt.tv/users/plexmetamanager/lists/myfilms  OPTIONAL TWO-WAY SYNC
    plex_search:
      any:
        rating.gte: 8
        sort_by: user_rating.desc

In this example, PMM will generate a Plex collection with any films that I have rated 8.0 or above (using the plex_search). The sync_to_trakt_list will take those films and then sync them to my myfilms Trakt list.

I can optionally also enable the trakt_list to create a two-way sync between Plex and Trakt. This allows me to add films to the Trakt list that I want in my Plex collection, and then sync them to Plex.