Radarr

Note

An asynchronous version of this client is available as AsyncRadarr. The API is identical, but all methods are coroutines and must be awaited.

class pyarr._sync.radarr.Radarr(host: str, api_key: str, port: int = 7878, tls: bool = True, base_path: str = '', request_timeout: int | None = None, api_ver: str | None = None)[source]

Radarr API client.

Movie

class pyarr._sync.radarr.movie.Movie(handler: RequestHandler)[source]

Movie actions for Radarr.

get(item_id: int | None = None, tmdb_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]

Returns movies by ID or TMDB ID.

Parameters:
  • item_id (int | None, optional) – Radarr ID of movie. Defaults to None.

  • tmdb_id (int | None, optional) – TMDB ID of movie. Defaults to None.

Returns:

List of dictionaries with items or a single dictionary.

Return type:

JsonArray | JsonObject

add(movie: dict[str, Any], root_dir: str, quality_profile_id: int, monitored: bool = True, search_for_movie: bool = True, monitor: str = 'movieOnly', minimum_availability: str = 'announced', tags: list[int] | None = None) dict[str, Any][source]

Adds a movie to the database.

Parameters:
  • movie (JsonObject) – Movie record from lookup().

  • root_dir (str) – Location of the root directory.

  • quality_profile_id (int) – ID of the quality profile.

  • monitored (bool, optional) – Should the movie be monitored. Defaults to True.

  • search_for_movie (bool, optional) – Should we search for the movie. Defaults to True.

  • monitor (str, optional) – Monitor movie or collection. Defaults to β€œmovieOnly”.

  • minimum_availability (str, optional) – Availability of movie. Defaults to β€œannounced”.

  • tags (list[int], optional) – List of tag IDs. Defaults to None.

Returns:

Dictionary with added record.

Return type:

JsonObject

update(data: dict[str, Any], move_files: bool | None = None) dict[str, Any][source]

Updates a movie in the database.

Parameters:
  • data (JsonObject) – Dictionary containing movie data.

  • move_files (bool | None, optional) – Have radarr move files when updating. Defaults to None.

Returns:

Dictionary with updated record.

Return type:

JsonObject

delete(item_id: int | list[int], delete_files: bool = False, add_exclusion: bool = False) None[source]

Delete a single movie or multiple movies.

Parameters:
  • item_id (int | list[int]) – Single ID or list of IDs to delete.

  • delete_files (bool, optional) – Delete movie files. Defaults to False.

  • add_exclusion (bool, optional) – Add to List Exclusions. Defaults to False.

lookup(term: str) list[dict[str, Any]][source]

Search for a movie to add to the database.

Parameters:

term (str) – Search term (can include imdb: or tmdb: prefixes).

Returns:

List of dictionaries with items.

Return type:

JsonArray

Movie File

class pyarr._sync.radarr.movie_file.MovieFile(handler: RequestHandler)[source]

Movie file actions for Radarr.

get(item_id: int | None = None, movie_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]

Returns movie file information.

Parameters:
  • item_id (int | None, optional) – Database id of movie file. Defaults to None.

  • movie_id (int | None, optional) – Database id of movie. Defaults to None.

Returns:

List of dictionaries with items or a single dictionary.

Return type:

JsonArray | JsonObject

delete(item_id: int) None[source]

Deletes the movie file with corresponding id.

Parameters:

item_id (int) – Database id for movie file.

Release

class pyarr._sync.radarr.release.Release(handler: RequestHandler)[source]

Release actions for Radarr.

get(movie_id: int | None = None) list[dict[str, Any]][source]

Query indexers for latest releases.

Parameters:

movie_id (int | None, optional) – Database id for movie to check. Defaults to None.

Returns:

List of dictionaries with items.

Return type:

JsonArray

add(guid: str, indexer_id: int) dict[str, Any][source]

Adds a previously searched release to the download client.

Parameters:
  • guid (str) – Recently searched result guid.

  • indexer_id (int) – Database id of indexer to use.

Returns:

Dictionary with download release details.

Return type:

JsonObject

push(title: str, download_url: str, protocol: str, publish_date: datetime) list[dict[str, Any]][source]

If the title is wanted, Radarr will grab it.

Parameters:
  • title (str) – Release name.

  • download_url (str) – .torrent file URL.

  • protocol (str) – β€œUsenet” or β€œTorrent”.

  • publish_date (datetime) – ISO8601 date.

Returns:

List of dictionaries with items.

Return type:

JsonArray

Manual Import

class pyarr._sync.radarr.manual_import.ManualImport(handler: RequestHandler)[source]

Manual import actions for Radarr.

get(folder: str, download_id: str | None = None, movie_id: int | None = None, filter_existing_files: bool = True, replace_existing_files: bool = True) list[dict[str, Any]][source]

Gets a manual import list.

Parameters:
  • folder (str) – Folder name.

  • download_id (str | None, optional) – Download ID. Defaults to None.

  • movie_id (int | None, optional) – Movie Database ID. Defaults to None.

  • filter_existing_files (bool, optional) – Filter files. Defaults to True.

  • replace_existing_files (bool, optional) – Replace files. Defaults to True.

Returns:

List of dictionaries with items.

Return type:

JsonArray

update(data: dict[str, Any]) dict[str, Any][source]

Update a manual import.

Parameters:

data (JsonObject) – Data containing changes.

Returns:

Dictionary of updated record.

Return type:

JsonObject

Custom Filter

class pyarr._sync.radarr.custom_filter.CustomFilter(handler: RequestHandler)[source]

Custom filter actions for Radarr.

get() list[dict[str, Any]][source]

Query Radarr for custom filters.

Returns:

List of dictionaries with items.

Return type:

JsonArray