flexget.components.imdb.from_imdb module#
- class flexget.components.imdb.from_imdb.FromIMDB[source]#
Bases:
objectEnable generating entries based on an entity, an entity being a person, character or company.
It’s based on IMDBpy which is required (pip install imdbpy). The basic config required just an IMDB ID of the required entity.
For example:
from_imdb: ch0001354
Schema description: Other than ID, all other properties are meant to filter the full list that the entity generates.
Option
Description
id
string that relates to a supported entity type. For example: ‘nm0000375’. Required.
job_types
a string or list with job types from job_types. Default is ‘actor’.
content_types
A string or list with content types from content_types. Default is ‘movie’.
max_entries
The maximum number of entries that can return. This value’s purpose is basically flood protection against unruly configurations that will return too many results. Default is 200.
Advanced config example:
dynamic_movie_queue: from_imdb: id: co0051941 job_types: - actor - director content_types: tv series accept_all: yes movie_queue: add
- get_entity_type_and_object(imdb_id)[source]#
Return a tuple of entity type and entity object.
- Parameters:
imdb_id – string which contains IMDB id
- Returns:
entity type, entity object (person, company, etc.)
- get_items_by_entity(entity_type, entity_object, content_types, job_types, match_type)[source]#
Get entity object and return movie list using relevant method.
- items_by_character(character, content_types, match_type)[source]#
Return items list for a character object.
- Parameters:
character – character object
content_types – content types as defined in config
- Returns:
- items_by_company(company)[source]#
Return items list for a company object.
- Parameters:
company – company object
- Returns:
company items list
- items_by_person(person, job_types, content_types, match_type)[source]#
Return item list for a person object.
- on_task_input(**kwargs)#
- character_content_type_conversion = {'episode': 'tv', 'movie': 'feature', 'tv mini series': 'tv', 'tv movie': 'tv', 'tv series': 'tv', 'video game': 'video-game', 'video movie': 'video'}#
- content_type_conversion = {'episode': 'tv', 'movie': 'movie', 'tv mini series': 'tv', 'tv movie': 'tv', 'tv series': 'tv', 'video game': 'video game', 'video movie': 'video'}#
- content_types = ['movie', 'tv series', 'tv mini series', 'video game', 'video movie', 'tv movie', 'episode']#
- imdb_pattern = {'oneOf': [{'items': {'error_pattern': 'Get the id from the url of the person/company you want to use, e.g. http://imdb.com/text/<id here>/blah', 'pattern': '(nm|co|ch)\\d{7,8}', 'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': True}, {'error_pattern': 'Get the id from the url of the person/company you want to use, e.g. http://imdb.com/text/<id here>/blah', 'pattern': '(nm|co|ch)\\d{7,8}', 'title': 'single value', 'type': 'string'}]}#
- job_types = ['actor', 'actress', 'director', 'producer', 'writer', 'self', 'editor', 'miscellaneous', 'editorial department', 'cinematographer', 'visual effects', 'thanks', 'music department', 'in development', 'archive footage', 'soundtrack']#
- jobs_without_content_type = ['actor', 'actress', 'self', 'in development', 'archive footage']#
- schema = {'oneOf': [{'oneOf': [{'items': {'error_pattern': 'Get the id from the url of the person/company you want to use, e.g. http://imdb.com/text/<id here>/blah', 'pattern': '(nm|co|ch)\\d{7,8}', 'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': True}, {'error_pattern': 'Get the id from the url of the person/company you want to use, e.g. http://imdb.com/text/<id here>/blah', 'pattern': '(nm|co|ch)\\d{7,8}', 'title': 'single value', 'type': 'string'}]}, {'additionalProperties': False, 'properties': {'content_types': {'oneOf': [{'items': {'enum': ['movie', 'tv series', 'tv mini series', 'video game', 'video movie', 'tv movie', 'episode'], 'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': True}, {'enum': ['movie', 'tv series', 'tv mini series', 'video game', 'video movie', 'tv movie', 'episode'], 'title': 'single value', 'type': 'string'}]}, 'id': {'oneOf': [{'items': {'error_pattern': 'Get the id from the url of the person/company you want to use, e.g. http://imdb.com/text/<id here>/blah', 'pattern': '(nm|co|ch)\\d{7,8}', 'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': True}, {'error_pattern': 'Get the id from the url of the person/company you want to use, e.g. http://imdb.com/text/<id here>/blah', 'pattern': '(nm|co|ch)\\d{7,8}', 'title': 'single value', 'type': 'string'}]}, 'job_types': {'oneOf': [{'items': {'enum': ['actor', 'actress', 'director', 'producer', 'writer', 'self', 'editor', 'miscellaneous', 'editorial department', 'cinematographer', 'visual effects', 'thanks', 'music department', 'in development', 'archive footage', 'soundtrack'], 'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': True}, {'enum': ['actor', 'actress', 'director', 'producer', 'writer', 'self', 'editor', 'miscellaneous', 'editorial department', 'cinematographer', 'visual effects', 'thanks', 'music department', 'in development', 'archive footage', 'soundtrack'], 'title': 'single value', 'type': 'string'}]}, 'match_type': {'enum': ['strict', 'loose'], 'type': 'string'}, 'max_entries': {'type': 'integer'}}, 'required': ['id'], 'type': 'object'}]}#