flexget.components.trakt.trakt_lookup module#

class flexget.components.trakt.trakt_lookup.PluginTraktLookup[source]#

Bases: object

Retrieve trakt information for entries.

Use series_name, eries_season, series_episode from series plugin.

Example: trakt_lookup: yes

Primarily used for passing trakt information to other plugins. Among these is the IMDB url for the series.

This information is provided (via entry): series info: trakt_series_name trakt_series_runtime trakt_series_first_aired_epoch trakt_series_first_aired_iso trakt_series_air_time trakt_series_content_ratingi trakt_series_genres trakt_series_imdb_url trakt_series_trakt_url imdb_id tvdb_id trakt_series_actors trakt_series_country trakt_series_year trakt_series_tvrage_id trakt_series_status trakt_series_overview

trakt_ep_name trakt_ep_season trakt_ep_number trakt_ep_overview trakt_ep_first_aired_epoch trakt_ep_first_aired_iso trakt_ep_id trakt_ep_tvdb_id

on_task_metainfo(task, config)[source]#
on_task_start(task, config)[source]#
property movie_identifier#

Return the plugin main identifier type.

schema = {'oneOf': [{'additionalProperties': False, 'anyOf': [{'required': ['username']}, {'required': ['account']}], 'error_anyOf': 'At least one of `username` or `account` options are needed.', 'properties': {'account': {'type': 'string'}, 'username': {'type': 'string'}}, 'type': 'object'}, {'type': 'boolean'}]}#
property series_identifier#

Return the plugin main identifier type.

flexget.components.trakt.trakt_lookup._get_lookup_args(entry)[source]#
Parameters:

entry (Entry)

Return type:

dict

flexget.components.trakt.trakt_lookup.add_lazy_fields(entry, lazy_lookup_name, media_type)[source]#

Add lazy fields for one of the lookups in our lazy_lookup_types dict.

Parameters:
  • entry (Entry) – The entry to add lazy fields to.

  • lazy_lookup_name (str) – One of the keys in lazy_lookup_types dict.

  • media_type (str) – show/season/episode/movie (the type of db data needed for this lazy lookup)

Return type:

None

flexget.components.trakt.trakt_lookup.add_lazy_user_fields(entry, data_type, media_type, username, account)[source]#

Add one of the user field lazy lookups to an entry.

Parameters:
  • entry (Entry) – Entry to add lazy fields to

  • data_type (str) – ratings/collected/watched (one of the keys in user_data_fields dict.)

  • media_type (str) – show/season/episode/movie

  • username (str) – Either this or account is required, the other can be None

  • account (str) – Either this or username is required, the other can be None

Return type:

None

flexget.components.trakt.trakt_lookup.get_db_data_for(data_type, entry, session)[source]#
Parameters:
flexget.components.trakt.trakt_lookup.get_media_type_for_entry(entry)[source]#
Parameters:

entry (Entry)

Return type:

str | None

flexget.components.trakt.trakt_lookup.is_episode(entry)[source]#
Parameters:

entry (Entry)

Return type:

bool

flexget.components.trakt.trakt_lookup.is_movie(entry)[source]#
Parameters:

entry (Entry)

Return type:

bool

flexget.components.trakt.trakt_lookup.is_season(entry)[source]#
Parameters:

entry (Entry)

Return type:

bool

flexget.components.trakt.trakt_lookup.is_show(entry)[source]#
Parameters:

entry (Entry)

Return type:

bool

flexget.components.trakt.trakt_lookup.lazy_lookup(entry, lazy_lookup_name, media_type)[source]#
Parameters:
  • entry (Entry)

  • lazy_lookup_name (str)

  • media_type (str)

flexget.components.trakt.trakt_lookup.register_plugin()[source]#
flexget.components.trakt.trakt_lookup.trakt_user_data_lookup(entry, field_name, data_type, media_type, username, account)[source]#