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.
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
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