flexget.components.managed_lists.lists.ombi_list module#

Create a Ombi managed list.

exception flexget.components.managed_lists.lists.ombi_list.ApiError(response)[source]#

Bases: Exception

Exception raised when an API call fails.

Parameters:

response (dict[str, Any])

Return type:

None

class flexget.components.managed_lists.lists.ombi_list.Config[source]#

Bases: TypedDict

The config schema for the Ombi managed list.

api_key: NotRequired[str]#
hide_available: bool#
include_ep_title: bool#
include_year: bool#
on_remove: NotRequired[Literal['unavailable', 'denied', 'deleted']]#
password: NotRequired[str]#
status: Literal['approved', 'requested', 'denied', 'all']#
type: Literal['shows', 'seasons', 'episodes', 'movies']#
url: str#
username: NotRequired[str]#
class flexget.components.managed_lists.lists.ombi_list.OmbiEntry(request, entry_type, data)[source]#

Bases: object

Represents a Generic entry returned from the Ombi API.

Parameters:
already_requested()[source]#

Check if an entry in Ombi has already been requested.

Returns:

tuple[bool, str]: A tuple containing a boolean indicating if the entry has already been requested and a string indicating the status of the entry.

Return type:

tuple[bool, str]

mark_approved()[source]#

Mark an entry in Ombi as approved.

mark_available()[source]#

Mark an entry in Ombi as available.

mark_deleted()[source]#

Mark an entry in Ombi as deleted.

mark_denied()[source]#

Mark an entry in Ombi as denied.

mark_requested(endpoint, data)[source]#

Mark an entry in Ombi as being requested.

Parameters:
mark_unavailable()[source]#

Mark an entry in Ombi as unavailable.

ombi_title: str#
property request_id: str#
class flexget.components.managed_lists.lists.ombi_list.OmbiList[source]#

Bases: object

get_list(config)[source]#
on_task_input(task, config)[source]#
schema = {'additionalProperties': False, 'oneOf': [{'required': ['username', 'password']}, {'required': ['api_key']}], 'properties': {'api_key': {'type': 'string'}, 'hide_available': {'default': True, 'type': 'boolean'}, 'include_ep_title': {'default': False, 'type': 'boolean'}, 'include_year': {'default': False, 'type': 'boolean'}, 'on_remove': {'default': 'deleted', 'enum': ['unavailable', 'denied', 'deleted'], 'type': 'string'}, 'password': {'type': 'string'}, 'status': {'default': 'approved', 'enum': ['approved', 'requested', 'denied', 'all'], 'type': 'string'}, 'type': {'enum': ['shows', 'seasons', 'episodes', 'movies'], 'type': 'string'}, 'url': {'type': 'string'}, 'username': {'type': 'string'}}, 'required': ['url', 'type'], 'type': 'object'}#
class flexget.components.managed_lists.lists.ombi_list.OmbiMovie(request, data)[source]#

Bases: OmbiEntry

Manage a Movie entry in Ombi.

Parameters:
classmethod from_id(request, entry)[source]#

Create a Ombi Entry from an OMBI ID.

Parameters:
classmethod from_imdb_id(request, imdb_id)[source]#

Create a Ombi Entry from an IMDB ID.

Parameters:
classmethod from_tmdb_id(request, tmdb_id)[source]#

Create a Ombi Entry from an TMDB ID.

Parameters:
mark_requested()[source]#

Mark an entry in Ombi as being requested.

entry_type = 'movie'#
class flexget.components.managed_lists.lists.ombi_list.OmbiRequest(config)[source]#

Bases: object

Parameters:

config (Config)

classmethod create_json_headers()[source]#
_create_auth_header()[source]#
_get_access_token()[source]#
_request(method, endpoint, **params)[source]#
delete(endpoint, **params)[source]#
get(endpoint, **params)[source]#
post(endpoint, **params)[source]#
put(endpoint, **params)[source]#
config: Config#
class flexget.components.managed_lists.lists.ombi_list.OmbiSet(config)[source]#

Bases: MutableSet

The schema for the Ombi managed list.

Parameters:

config (dict[str, Any])

_find_entry(entry)[source]#
Parameters:

entry (Entry)

_find_episodes(entry)[source]#
Parameters:

entry (Entry)

_find_movies(entry)[source]#
Parameters:

entry (Entry)

_find_seasons(entry)[source]#
Parameters:

entry (Entry)

_find_shows(entry)[source]#
Parameters:

entry (Entry)

_get_ombi_entry(entry)[source]#
Parameters:

entry (Entry)

Return type:

OmbiMovie | OmbiTv | None

add(entry)[source]#

Add an element.

Parameters:

entry (Entry)

discard(entry)[source]#

Remove an entry from OMBI by marking it as available.

Args:

entry (Entry): An item from a task.

Parameters:

entry (Entry)

generate_movie_entry(parent_request)[source]#
generate_series_id(season, episode=None)[source]#
generate_title(item, season=None, episode=None)[source]#
generate_tv_entry(parent_request, child_request=None, season=None, episode=None)[source]#
get(entry)[source]#
get_access_token()[source]#
get_requested_items()[source]#

Get a list of all the items that have been requested in Ombi.

Raises:

plugin.PluginError: If an error occurs while retrieving the list of items.

Returns:

dict[str, Any]: A dictionary containing all the items that have been requested in Ombi.

Return type:

list[OmbiEntry]

invalidate_cache()[source]#
ombi_auth()[source]#

Return a dictionary that contains authrization headers for the OMBI API.

Raises:

plugin.PluginError: If the api_key or username/password are not defined.

Returns:

dict[str, str]: Authorization headers.

Return type:

dict[str, str]

_abc_impl = <_abc._abc_data object>#
_items: list[Entry] | None#
config: Config#
property immutable#
property items: list[Entry]#
property online#

Set the online status of the plugin.

Online plugin should be treated differently in certain situations, like test mode

schema = {'additionalProperties': False, 'oneOf': [{'required': ['username', 'password']}, {'required': ['api_key']}], 'properties': {'api_key': {'type': 'string'}, 'hide_available': {'default': True, 'type': 'boolean'}, 'include_ep_title': {'default': False, 'type': 'boolean'}, 'include_year': {'default': False, 'type': 'boolean'}, 'on_remove': {'default': 'deleted', 'enum': ['unavailable', 'denied', 'deleted'], 'type': 'string'}, 'password': {'type': 'string'}, 'status': {'default': 'approved', 'enum': ['approved', 'requested', 'denied', 'all'], 'type': 'string'}, 'type': {'enum': ['shows', 'seasons', 'episodes', 'movies'], 'type': 'string'}, 'url': {'type': 'string'}, 'username': {'type': 'string'}}, 'required': ['url', 'type'], 'type': 'object'}#
supported_ids = ['ombi_id', 'tmdb_id', 'imdb_id']#
class flexget.components.managed_lists.lists.ombi_list.OmbiTv(request, data, sub_type)[source]#

Bases: OmbiEntry

Manage a TV entry in Ombi.

Parameters:
  • request (OmbiRequest)

  • data (dict[str, Any])

  • sub_type (Literal['show', 'season', 'episode'])

classmethod from_tmdb_id(request, entry, sub_type)[source]#

Create a Ombi Entry from an TVDB ID.

Parameters:
mark_requested()[source]#

Mark an entry in Ombi as being requested.

entry_type = 'tv'#
flexget.components.managed_lists.lists.ombi_list.filter_ombi_items(items, config)[source]#

Filter Ombi items based on the config.

Arguments:

items: The Items returned from the Ombi API. config: The config for the Ombi managed list.

Raises:

plugin.PluginError: If an unknown status is specified in the config.

Returns:

list[dict[str, Any]] – The filtered list of items.

Parameters:
Return type:

list[dict[str, Any]]

flexget.components.managed_lists.lists.ombi_list.register_plugin()[source]#