RadarrAPI
- class arrapi.apis.radarr.RadarrAPI(url: str, apikey: str, session: Session | None = None)[source]
Primary Class to use when connecting with the Radarr API
- Parameters:
url (str) – URL of Radarr application.
apikey (str) – apikey for the Radarr application.
session (Optional[Session]) – Session object to use.
- respect_list_exclusions_when_adding()[source]
Stores all List Exclusions so whenever
add()
oradd_multiple_movies()
is called the additions will be checked against the Exclusion List
- get_movie(movie_id: int | None = None, tmdb_id: int | None = None, imdb_id: str | None = None) Movie [source]
Gets a
Movie
by one of the IDs.
- all_movies() List[Movie] [source]
Gets all
Movie
in Radarr.- Returns:
List of Movies in Radarr.
- Return type:
List[
Movie
]
- search_movies(term: str) List[Movie] [source]
Gets a list of
Movie
by a search term.- Parameters:
term (str) – Term to Search for.
- Returns:
List of Movie’s found.
- Return type:
List[
Movie
]
- add_movie(root_folder: str | int | RootFolder, quality_profile: str | int | QualityProfile, movie_id: int | None = None, tmdb_id: int | None = None, imdb_id: str | None = None, monitor: bool | str = True, search: bool = True, minimum_availability: str = 'announced', tags: List[str | int | Tag] | None = None) Movie [source]
Gets a
Movie
by one of the IDs and adds it to Radarr.- Parameters:
root_folder (Union[str, int, RootFolder]) – Root Folder for the Movie.
quality_profile (Union[str, int, QualityProfile]) – Quality Profile for the Movie.
movie_id (Optional[int]) – Search by Radarr Movie ID.
tmdb_id (Optional[int]) – Search by TMDb ID.
imdb_id (Optional[int]) – Search by IMDb ID.
monitor (Union[bool, str]) – Monitor the Movie. Valid V4 Options are movieOnly, movieAndCollection, none.
search (bool) – Search for the Movie after adding.
minimum_availability (str) – Minimum Availability for the Movie. Valid options are announced, inCinemas, released, or preDB.
tags (Optional[List[Union[str, int, Tag]]]) – Tags to be added to the Movie.
- Returns:
Movie for the ID given.
- Return type:
- Raises:
- edit_movie(movie_id: int | None = None, tmdb_id: int | None = None, imdb_id: str | None = None, path: str | None = None, move_files: bool = False, quality_profile: str | int | QualityProfile | None = None, monitored: bool | str | None = None, minimum_availability: str | None = None, tags: List[str | int | Tag] | None = None, apply_tags: str = 'add') Movie [source]
Gets a
Movie
by one of the IDs and edits it in Radarr.- Parameters:
movie_id (Optional[int]) – Search by Radarr Movie ID.
tmdb_id (Optional[int]) – Search by TMDb ID.
imdb_id (Optional[int]) – Search by IMDb ID.
path (Optional[str]) – Path to change the Movie to.
move_files (bool) – When changing the path do you want to move the files to the new path.
quality_profile (Optional[Union[str, int, QualityProfile]]) – Quality Profile to change the Movie to.
monitored (Optional[Union[bool, str]]) – Monitor the Movie. Valid V4 Options are movieOnly, movieAndCollection, none.
minimum_availability (Optional[str]) – Minimum Availability to change the Movie to. Valid options are announced, inCinemas, released, or preDB.
tags (Optional[List[Union[str, int, Tag]]]) – Tags to be added, replaced, or removed from the Movie.
apply_tags (str) – How you want to edit the Tags. Valid options are add, replace, or remove.
- Raises:
- delete_movie(movie_id: int | None = None, tmdb_id: int | None = None, imdb_id: str | None = None, addImportExclusion: bool = False, deleteFiles: bool = False) Movie [source]
Gets a
Movie
by one of the IDs and deletes it from Radarr.- Parameters:
movie_id (Optional[int]) – Search by Radarr Movie ID.
tmdb_id (Optional[int]) – Search by TMDb ID.
imdb_id (Optional[int]) – Search by IMDb ID.
addImportExclusion (bool) – Add Import Exclusion for this Movie.
deleteFiles (bool) – Delete Files for this Movie.
- Returns:
Movie for the ID given.
- Return type:
- Raises:
ValueError – When no ID is given.
NotFound – When there’s no movie with that ID or when the Movie hasn’t been added to Radarr.
- add_multiple_movies(ids: List[int | str | Movie | Tuple[int | str | Movie, str]], root_folder: str | int | RootFolder, quality_profile: str | int | QualityProfile, monitor: bool = True, search: bool = True, minimum_availability: str = 'announced', tags: List[str | int | Tag] | None = None, per_request: int = None) Tuple[List[Movie], List[Movie], List[int | str | Movie], List[int]] [source]
Adds multiple Movies to Radarr in a single call by their TMDb IDs.
You can specify the path for each TMDb ID using a tuple in the list instead of just the ID ex.
(11, "/media/Star Wars (1977)/")
The path provided must begin with the root_folder specified.
- Parameters:
ids (List[Union[int, str, Movie, Tuple[Union[int, str, Movie], str]]]) – List of TMDB IDs, IMDb IDs, or Movie lookups to add.
root_folder (Union[str, int, RootFolder]) – Root Folder for the Movies.
quality_profile (Union[str, int, QualityProfile]) – Quality Profile for the Movies.
monitor (bool) – Monitor the Movies.
search (bool) – Search for the Movies after adding.
minimum_availability (str) – Minimum Availability for the Movies. Valid options are announced, inCinemas, released, or preDB.
tags (Optional[List[Union[str, int, Tag]]]) – Tags to be added to the Movies.
per_request (int) – Number of Movies to add per request.
- Returns:
List of Movies that were able to be added, List of Movies already in Radarr, List of Movies that could not be found, List of Movies that were excluded.
- Return type:
Tuple[List[
Movie
], List[Movie
], List[Union[int, str, Movie]], List[int]]- Raises:
Invalid – When one of the options given is invalid.
- edit_multiple_movies(ids: List[int | str | Movie], root_folder: str | int | RootFolder | None = None, move_files: bool = False, quality_profile: str | int | QualityProfile | None = None, monitored: bool | None = None, minimum_availability: str | None = None, tags: List[str | int | Tag] | None = None, apply_tags: str = 'add', per_request: int = None) Tuple[List[Movie], List[int | str | Movie]] [source]
Edit multiple Movies in Radarr by their TMDb IDs.
- Parameters:
ids (List[Union[int, str, Movie]]) – List of TMDb IDs, IMDb IDs, or Movie objects you want to edit.
root_folder (Union[str, int, RootFolder]) – Root Folder to change the Movie to.
move_files (bool) – When changing the root folder do you want to move the files to the new path.
quality_profile (Optional[Union[str, int, QualityProfile]]) – Quality Profile to change the Movie to.
monitored (Optional[bool]) – Monitor the Movie.
minimum_availability (Optional[str]) – Minimum Availability to change the Movie to. Valid options are announced, inCinemas, released, or preDB.
tags (Optional[List[Union[str, int, Tag]]]) – Tags to be added, replaced, or removed from the Movie.
apply_tags (str) – How you want to edit the Tags. Valid options are add, replace, or remove.
per_request (int) – Number of Movies to edit per request.
- Returns:
List of Movies that were able to be edited, List of Movies that could not be found in Radarr.
- Return type:
Tuple[List[
Movie
], List[Union[int, str, Movie]]]- Raises:
Invalid – When one of the options given is invalid.
- delete_multiple_movies(ids: List[int | str | Movie], addImportExclusion: bool = False, deleteFiles: bool = False, per_request: int = None) List[int | str | Movie] [source]
Deletes multiple Movies in Radarr by their TMDb IDs.
- Parameters:
ids (List[Union[int, str, Movie]]) – List of TMDb IDs, IMDb IDs, or Movie objects you want to delete.
addImportExclusion (bool) – Add Import Exclusion for these TMDb IDs.
deleteFiles (bool) – Delete Files for these TMDb IDs.
per_request (int) – Number of Movies to delete per request.
- Returns:
List of Movies that could not be found in Radarr.
- Return type:
List[Union[int, str, Movie]]
- add_root_folder(path)
Adds the path given as a root folder
- Parameters:
path (str) – path of new root folder
- Raises:
ArrException – When the path does not exist or is already a root folder
- all_commands() List[Command]
Gets a list of
Command
.- Returns:
List of Commands
- Return type:
List[
Command
]
- all_tags(detail: bool = False) List[Tag]
Gets every
Tag
.- Parameters:
detail (bool) – Get Tags with details.
- Returns:
List of all Tags.
- Return type:
List[
Tag
]
- create_tag(label: str) Tag
Create a new
Tag
.- Parameters:
label (str) – Label of new Tag.
- Returns:
Tag just created.
- Return type:
- delete_tag(tag_id: int) None
Delete a
Tag
by its ID.- Parameters:
tag_id (int) – ID of tag to delete.
- Raises:
NotFound – When there’s no tag with that ID.
- quality_profile() List[QualityProfile]
Gets every
QualityProfile
.- Returns:
List of all Quality Profiles
- Return type:
List[
QualityProfile
]
- remote_path_mapping() List[RemotePathMapping]
Gets every
RemotePathMapping
.- Returns:
List of all Remote Path Mappings.
- Return type:
List[
RemotePathMapping
]
- root_folder() List[RootFolder]
Gets every
RootFolder
.- Returns:
List of all Root Folders.
- Return type:
List[
RootFolder
]
- system_status() SystemStatus
Gets the
SystemStatus
.- Returns:
System Status Information.
- Return type: