LidarrAPI

class pyarr.lidarr.LidarrAPI(host_url: str, api_key: str)[source]

API wrapper for Lidarr endpoints.

Parameters:

RequestAPI (str) – provides connection to API endpoint

add_root_folder(name: str, path: str, default_quality_profile_id: int, default_metadata_profile_id: int, default_tags: list[int] | None = None) dict[str, JsonDataType][source]

Add a new location to store files

Parameters:
  • name (str) – Name for this root folder

  • path (str) – Location the files should be stored

  • default_quality_profile_id (int) – Default quality profile ID

  • default_metadata_profile_id (int) – Default metadata profile ID

  • default_tags (list[int]) – List of default tag IDs

Returns:

Dictonary with added record

Return type:

JsonObject

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

Search for an artist / album / song

Parameters:

term (str) –

Search term, can also use MusicBrainz IDs:

lidarr.lookup(term="lidarr:cc197bad-dc9c-440d-a5b5-d52ba2e14234")

Returns:

List of dictionaries with items

Return type:

JsonArray

lookup_artist(term: str) list[dict[str, JsonDataType]][source]

Search for an Artist to add to the database

Parameters:

term (str) –

Search term, can also use MusicBrainz IDs:

lidarr.lookup(term="lidarr:cc197bad-dc9c-440d-a5b5-d52ba2e14234")

Returns:

List of dictionaries with items

Return type:

JsonArray

lookup_album(term: str) list[dict[str, JsonDataType]][source]

Search for an Album to add to the database

Parameters:

term (str) –

Search term, can also use MusicBrainz IDs:

lidarr.lookup(term="lidarr:1dc4c347-a1db-32aa-b14f-bc9cc507b843")

Returns:

List of dictionaries with items

Return type:

JsonArray

get_artist(id_: str | int | None = None) list[dict[str, JsonDataType]][source]

Get an artist by ID or get all artists

Parameters:

id (Optional[Union[str, int]], optional) – Artist ID. Defaults to None.

Note

Include a string to search by MusicBrainz id.

Returns:

List of dictionaries with items

Return type:

JsonArray

add_artist(artist: dict[str, JsonDataType], root_dir: str, quality_profile_id: int | None = None, metadata_profile_id: int | None = None, monitored: bool = True, artist_monitor: Literal['all', 'future', 'missing', 'existing', 'first', 'latest'] = 'all', artist_search_for_missing_albums: bool = False) dict[str, JsonDataType][source]

Adds an artist from the lookup result

Parameters:
  • artist (JsonObject) – Artist record from lookup()

  • root_dir (str) – Directory for music to be stored

  • quality_profile_id (Optional[int], optional) – Quality profile ID. Defaults to None.

  • metadata_profile_id (Optional[int], optional) – Metadata profile ID. Defaults to None.

  • monitored (bool, optional) – Monitor the artist. Defaults to True.

  • artist_monitor (LidarrArtistMonitor, optional) – Monitor the artist. Defaults to β€œall”.

  • artist_search_for_missing_albums (bool, optional) – Search for missing albums by this artist. Defaults to False.

Returns:

Dictonary with added record

Return type:

JsonObject

upd_artist(data: dict[str, JsonDataType]) dict[str, JsonDataType][source]

Update an existing artist

note:

Parameters:

data (JsonObject) – Dictionary containing an object obtained from get_artist()

Returns:

Dictionary of updated record

Return type:

JsonObject

delete_artist(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any][source]

Delete an artist with the provided ID

Parameters:

id (int) – Artist ID to be deleted

Returns:

HTTP Response

Return type:

Response

get_album(albumIds: int | list[int] | None = None, artistId: int | None = None, foreignAlbumId: int | None = None, allArtistAlbums: bool = False) list[dict[str, JsonDataType]][source]

Get a specific album by ID, or get all albums

Parameters:
  • albumIds (Union[int, list[int], None], optional) – Database album IDs. Defaults to None.

  • artistId (Optional[int], optional) – Database artist IDs. Defaults to None.

  • foreignAlbumId (Optional[int], optional) – Foreign album id. Defaults to None.

  • allArtistAlbums (bool, optional) – Get all artists albums. Defaults to False.

Returns:

List of dictionaries with items

Return type:

JsonArray

add_album(album: dict[str, JsonDataType], root_dir: str, quality_profile_id: int | None = None, metadata_profile_id: int | None = None, monitored: bool = True, artist_monitored: bool = True, artist_monitor: Literal['all', 'future', 'missing', 'existing', 'first', 'latest'] = 'all', artist_search_for_missing_albums: bool = False, search_for_new_album: bool = False) dict[str, JsonDataType][source]

Adds an album to Lidarr

Parameters:
  • album (JsonObject) – Album record from lookup()

  • root_dir (str) – Location to store music

  • quality_profile_id (Optional[int], optional) – Quality profile ID. Defaults to None.

  • metadata_profile_id (Optional[int], optional) – Metadata profile ID. Defaults to None.

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

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

  • artist_monitor (LidarrArtistMonitor, optional) – What level to monitor the artist. Defaults to β€œall”.

  • artist_search_for_missing_albums (bool, optional) – Search for any missing albums by this artist. Defaults to False.

  • search_for_new_album (bool, optional) – Search for new albums by this artist. Defaults to False.

Returns:

Dictionary with added record

Return type:

JsonObject

upd_album(data: dict[str, JsonDataType]) dict[str, JsonDataType][source]

Update an album

Parameters:

data (JsonObject) – data to update albums

Note

To be used in conjunction with get_album()

Returns:

Dictionary of updated record

Return type:

JsonObject

delete_album(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any][source]

Delete an album with the provided ID

Parameters:

id (int) – Album ID to be deleted

Returns:

200 / 401

Return type:

Response

post_command(name: Literal['AlbumSearch', 'ApplicationUpdateCheck', 'ArtistSearch', 'DownloadedAlbumsScan', 'MissingAlbumSearch', 'RefreshAlbum', 'RefreshArtist'], **kwargs: dict[str, Union[int, list[int]]] | None) dict[str, JsonDataType][source]

Send a command to Lidarr

Parameters:
  • name (LidarrCommand) – Command to be run against Lidarr

  • **kwargs – Additional parameters for specific commands.

Note

For available commands and required **kwargs see the LidarrCommands model

Returns:

dictionary of executed command information

Return type:

JsonObject

get_wanted(id_: int | None = None, page: int | None = None, page_size: int | None = None, sort_key: Literal['albums.title', 'artistId', 'date', 'downloadClient', 'id', 'indexer', 'message', 'path', 'progress', 'protocol', 'quality', 'ratings', 'albums.releaseDate', 'sourcetitle', 'status', 'timeleft', 'title'] | None = None, sort_dir: Literal['ascending', 'default', 'descending'] | None = None, missing: bool = True) dict[str, JsonDataType][source]

Get wanted albums that are missing or not meeting cutoff

Parameters:
  • id (int | None, optional) – Specific album ID to return. Defaults to None.

  • page (Optional[int], optional) – Page number to return. Defaults to None.

  • page_size (Optional[int], optional) – Number of items per page. Defaults to None.

  • sort_key (Optional[LidarrSortKey], optional) – Column to sort by. Defaults to None.

  • sort_dir (Optional[PyarrSortDirection], optional) – Direction to sort the items. Defaults to None.

  • missing (bool, optional) – Search for missing (True) or cutoff not met (False). Defaults to True.

Returns:

List of dictionaries with items

Return type:

JsonObject

get_parse(title: str) list[dict[str, JsonDataType]][source]

Return the music / artist with a matching filename

Parameters:

title (str) – file

Returns:

List of dictionaries with items

Return type:

JsonArray

get_tracks(artistId: int | None = None, albumId: int | None = None, albumReleaseId: int | None = None, trackIds: int | list[int] | None = None) list[dict[str, JsonDataType]][source]

Get tracks based on provided IDs

Parameters:
  • artistId (Optional[int], optional) – Artist ID. Defaults to None.

  • albumId (Optional[int], optional) – Album ID. Defaults to None.

  • albumReleaseId (Optional[int], optional) – Album Release ID. Defaults to None.

  • trackIds (Optional[Union[int, list[int]]], optional) – Track IDs. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_track_file(artistId: int | None = None, albumId: int | None = None, trackFileIds: int | list[int] | None = None, unmapped: bool | None = None) list[dict[str, JsonDataType]][source]

Get track files based on IDs, or get all unmapped files

Parameters:
  • artistId (Optional[int], optional) – Artist database ID. Defaults to None.

  • albumId (Optional[int], optional) – Album database ID. Defaults to None.

  • trackFileIds (Union[int, list[int], None], optional) – Specific file IDs. Defaults to None.

  • unmapped (Optional[bool], optional) – Get all unmapped filterExistingFiles. Defaults to None.

Raises:

PyarrError – Where no IDs or unmapped params provided

Returns:

List of dictionaries with items

Return type:

JsonArray

upd_track_file(data: dict[str, JsonDataType]) dict[str, JsonDataType][source]

Update an existing track file

Note

To be used in conjunction with get_track_file()

Parameters:

data (JsonObject) – Updated data for track files

Returns:

Dictionary of updated record

Return type:

JsonObject

delete_track_file(ids_: int | list[int]) Response | dict[str, JsonDataType] | dict[Any, Any][source]

Delete track files. Use integer for one file or list for mass deletion.

Parameters:

ids (Union[int, list[int]]) – Single ID or list of IDs for files to delete

Returns:

200 / 401

Return type:

Response

get_metadata_profile(id_: int | None = None) list[dict[str, JsonDataType]][source]

Gets all metadata profiles or specific one with id

Parameters:

id (Optional[int], optional) – Metadata profile id from database. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

upd_metadata_profile(data: dict[str, JsonDataType]) dict[str, JsonDataType][source]

Update a metadata profile

Parameters:

data (JsonObject) – Data containing metadata profile and changes

Returns:

Dictionary of updated record

Return type:

JsonObject

get_metadata_provider() dict[str, JsonDataType][source]

Get metadata provider config (settings/metadata)

Returns:

Dictionary with data

Return type:

JsonObject

upd_metadata_provider(data: dict[str, JsonDataType]) dict[str, JsonDataType][source]

Update metadata provider by providing json data update

Note

To be used in conjunction with get_metadata_provider()

Parameters:

data (JsonObject) – Configuration data

Returns:

Dictionary of updated record

Return type:

JsonObject

get_queue(page: int | None = None, page_size: int | None = None, sort_key: Literal['albums.title', 'artistId', 'date', 'downloadClient', 'id', 'indexer', 'message', 'path', 'progress', 'protocol', 'quality', 'ratings', 'albums.releaseDate', 'sourcetitle', 'status', 'timeleft', 'title'] | None = None, sort_dir: Literal['ascending', 'default', 'descending'] | None = None, unknown_artists: bool | None = None, include_artist: bool | None = None, include_album: bool | None = None) dict[str, JsonDataType][source]

Get the queue of download_release

Parameters:
  • page (Optional[int], optional) – Page number to return. Defaults to None.

  • page_size (Optional[int], optional) – Number of items per page. Defaults to None.

  • sort_key (Optional[LidarrSortKey], optional) – Column to sort by. Defaults to None.

  • sort_dir (Optional[PyarrSortDirection], optional) – Direction to sort the items. Defaults to None.

  • unknown_artists (Optional[bool], optional) – Include unknown artists. Defaults to None.

  • include_artist (Optional[bool], optional) – Include Artists. Defaults to None.

  • include_album (Optional[bool], optional) – Include albums. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonObject

get_queue_details(artistId: int | None = None, albumIds: list[int] | None = None, include_artist: bool | None = None, include_album: bool | None = None) list[dict[str, JsonDataType]][source]

Get queue details for artist or album

Parameters:
  • artistId (Optional[int], optional) – Artist database ID. Defaults to None.

  • albumIds (Union[list[int], None], optional) – Album database ID. Defaults to None.

  • include_artist (Optional[bool], optional) – Include the artist. Defaults to None.

  • include_album (Optional[bool], optional) – Include the album. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_release(artistId: int | None = None, albumId: int | None = None) list[dict[str, JsonDataType]][source]

Search indexers for specified fields.

Parameters:
  • artistId (Optional[int], optional) – Artist ID from DB. Defaults to None.

  • albumId (Optional[int], optional) – Album IT from Database. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_rename(artistId: int, albumId: int | None = None) list[dict[str, JsonDataType]][source]

Get files matching specified id that are not properly renamed yet.

Parameters:
  • artistId (int) – Database ID for Artists

  • albumId (Optional[int], optional) – Album ID. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_manual_import(folder: str, downloadId: str | None = None, artistId: int | None = None, filterExistingFiles: bool | None = None, replaceExistingFiles: bool | None = None) list[dict[str, JsonDataType]][source]

Gets a manual import list

Parameters:
  • downloadId (str) – Download IDs

  • artistId (int, optional) – Artist Database ID. Defaults to 0.

  • folder (Optional[str], optional) – folder name. Defaults to None.

  • filterExistingFiles (bool, optional) – filter files. Defaults to True.

  • replaceExistingFiles (bool, optional) – replace files. Defaults to True.

Returns:

List of dictionaries with items

Return type:

JsonArray

upd_manual_import(data: dict[str, JsonDataType]) dict[str, JsonDataType][source]

Update a manual import

Note

To be used in conjunction with get_manual_import()

Parameters:

data (JsonObject) – Data containing changes

Returns:

Dictionary of updated record

Return type:

JsonObject

get_retag(artistId: int | None = None, albumId: int | None = None) list[dict[str, JsonDataType]][source]

Get Retag

Parameters:
  • artistId (int) – ID for the artist

  • Optional[int] (albumId) – ID foir the album. Defaults to None.

  • optional) – ID foir the album. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

add_quality_profile(name: str, upgrade_allowed: bool, cutoff: int, schema: dict[str, Any], language: dict, min_format_score: int = 0, cutoff_format_score: int = 0, format_items: list | None = None) dict[str, JsonDataType][source]

Add new quality profile.

Parameters:
  • name (str) – Name of the profile

  • upgrade_allowed (bool) – Are upgrades in quality allowed?

  • cutoff (int) – ID of quality definition to cutoff at. Must be an allowed definition ID.

  • schema (dict[str, Any]) – Add the profile schema (from get_quality_profile_schema())

  • language (dict) – Language profile (from get_language())

  • min_format_score (int, optional) – Minimum format score. Defaults to 0.

  • cutoff_format_score (int, optional) – Cutoff format score. Defaults to 0.

  • format_items (list, optional) – Format items. Defaults to [].

Note

Update the result from get_quality_profile_schema() set the items you need from β€œallowed”: false to β€œallowed”: true. See tests for more details.

Returns:

An object containing the profile

Return type:

JsonObject

add_download_client(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Add a download client based on the schema information supplied

Note

Recommended to be used in conjunction with get_download_client_schema()

Parameters:

data (JsonObject) – dictionary with download client schema and settings

Returns:

dictionary of added item

Return type:

JsonObject

add_import_list(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Add an import list based on the schema information supplied

Note

Recommended to be used in conjunction with get_import_list_schema()

Parameters:

data (JsonObject) – dictionary with import list schema and settings

Returns:

dictionary of added item

Return type:

JsonObject

add_notification(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Add an import list based on the schema information supplied

Note

Recommended to be used in conjunction with get_notification_schema()

Parameters:

data (JsonObject) – dictionary with import list schema and settings

Returns:

dictionary of added item

Return type:

JsonObject

basic_auth(username: str, password: str) HTTPBasicAuth | None

If you have basic authentication setup you will need to pass your username and passwords to the HTTPBASICAUTH() method.

Parameters:
  • username (str) – Username for basic auth.

  • password (str) – Password for basic auth.

Returns:

HTTP Auth object

Return type:

Object

create_tag(label: str) dict[str, JsonDataType]

Adds a new tag

Parameters:

label (str) – Tag name / label

Returns:

Dictionary of new record

Return type:

JsonObject

del_blocklist(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Removes a specific release (the id provided) from the blocklist

Parameters:

id (int) – Blocklist ID from database

Returns:

HTTP Response

Return type:

Response

del_blocklist_bulk(ids: list[int]) Response | dict[str, JsonDataType] | dict[Any, Any]

Delete blocked releases in bulk

Parameters:

ids (list[int]) – Blocklists ids that should be deleted

Returns:

HTTP Response

Return type:

Response

del_download_client(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Delete a download client by database id

Parameters:

id (int) – download client database id

Returns:

HTTP Response

Return type:

Response

del_import_list(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Delete an import list

Parameters:

id (int) – Import list database id

Returns:

HTTP Response

Return type:

Response

del_indexer(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Removes a specific indexer from the blocklist

Parameters:

id (int) – indexer id from database

Returns:

HTTP Response

Return type:

Response

del_notification(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Delete a notification by its database id

Parameters:

id (int) – Database id of notification.

Returns:

HTTP Response

Return type:

Response

del_quality_profile(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Removes a specific quality profile from the blocklist

Parameters:

id (int) – Quality profile ID from database

Returns:

HTTP Response

Return type:

Response

del_queue(id_: int, remove_from_client: bool | None = None, blocklist: bool | None = None) Response | dict[str, JsonDataType] | dict[Any, Any]

Remove an item from the queue and blocklist it

Parameters:
  • id (int) – ID of the item to be removed

  • remove_from_client (Optional[bool], optional) – Remove the item from the client. Defaults to None.

  • blocklist (Optional[bool], optional) – Add the item to the blocklist. Defaults to None.

Returns:

HTTP Response

Return type:

Response

del_root_folder(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Delete root folder with specified id

Parameters:

id (int) – Root folder id from database

Returns:

HTTP Response

Return type:

Response

del_tag(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Delete the tag with the given ID

Parameters:

id (int) – Database id of tag

Returns:

HTTP Response

Return type:

Response

get_backup() list[dict[str, JsonDataType]]

Returns the list of available backups

Returns:

List of dictionaries with items

Return type:

JsonArray

get_blocklist(page: int | None = None, page_size: int | None = None, sort_key: Literal['date'] | None = None, sort_dir: Literal['ascending', 'default', 'descending'] | None = None) dict[str, JsonDataType]

Returns blocked releases.

Parameters:
  • page (Optional[int], optional) – Page number to return. Defaults to None.

  • page_size (Optional[int], optional) – Number of items per page. Defaults to None.

  • sort_key (Optional[PyarrBlocklistSortKey], optional) – Field to sort by. Defaults to None.

  • sort_dir (Optional[PyarrSortDirection], optional) – Direction to sort the items. Defaults to None.

Returns:

Dictionary with items

Return type:

JsonObject

get_calendar(start_date: datetime | None = None, end_date: datetime | None = None, unmonitored: bool = True) list[dict[str, JsonDataType]]

Gets upcoming releases by monitored, if start/end are not supplied, today and tomorrow will be returned

Parameters:
  • start_date (Optional[str], optional) – ISO8601 start datetime. Defaults to None.

  • end_date (Optional[str], optional) – ISO8601 end datetime. Defaults to None.

  • unmonitored (bool, optional) – Include unmonitored movies. Defaults to True.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_command(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Queries the status of a previously started command, or all currently started commands.

Parameters:

id (Optional[int], optional) – Database ID of the command. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_config_download_client() dict[str, JsonDataType]

Gets download client page configuration

Returns:

Dictionary of configuration

Return type:

JsonObject

get_config_host() dict[str, JsonDataType]

Get General/Host settings.

Returns:

Dictionaries with items

Return type:

JsonObject

get_config_naming() dict[str, JsonDataType]

Get Settings for file and folder naming.

Returns:

Dictionary with items

Return type:

JsonObject

get_config_ui() dict[str, JsonDataType]

Query Radarr for UI configuration

Returns:

List of dictionaries with items

Return type:

JsonObject

get_disk_space() list[dict[str, JsonDataType]]
Query disk usage information

System > Status

Returns:

List of dictionaries with items

Return type:

JsonArray

get_download_client(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Get a list of all the download clients or a single client by its database id

Parameters:

id (Optional[int], optional) – Download client database id. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_download_client_schema(implementation: Literal['Aria2', 'Deluge', 'TorrentDownloadStation', 'UsenetDownloadStation', 'Flood', 'Hadouken', 'Nzbget', 'NzbVortex', 'Pneumatic', 'QBittorrent', 'RTorrent', 'Sabnzbd', 'TorrentBlackhole', 'Transmission', 'UsenetBlackhole', 'UTorrent', 'Vuze'] | None = None) list[dict[str, JsonDataType]]

Gets the schemas for the different download Clients

Parameters:

implementation (Optional[PyarrDownloadClientSchema], optional) – Client implementation name. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_health() list[dict[str, JsonDataType]]

Get health information

Returns:

List of dictionaries with items

Return type:

JsonArray

get_history(page: int | None = None, page_size: int | None = None, sort_key: Literal['id', 'date', 'eventType', 'series.title', 'episode.title', 'movieFile.relativePath', 'sourceTitle', 'status'] | None = None, sort_dir: Literal['ascending', 'default', 'descending'] | None = None) dict[str, JsonDataType]

Gets history (grabs/failures/completed)

Parameters:
  • page (Optional[int], optional) – Page number to return. Defaults to None.

  • page_size (Optional[int], optional) – Number of items per page. Defaults to None.

  • sort_key (Optional[PyarrSortKey], optional) – Field to sort by. Defaults to None.

  • sort_dir (Optional[PyarrSortDirection], optional) – Direction to sort the items. Defaults to None.

Returns:

Dictionary with items

Return type:

JsonObject

get_import_list(id_: int | None = None) list[dict[str, JsonDataType]]

Query for all lists or a single list by its database id

Parameters:

id (Optional[int], optional) – Import list database id. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_import_list_schema(implementation: Literal['PlexImport', 'SonarrImport', 'TraktListImport', 'TraktPopularImport', 'TraktUserImport'] | Literal['LidarrImport', 'HeadphonesImport', 'LastFmTag', 'LastFmUser', 'LidarrLists', 'MusicBrainzSeries', 'SpotifyFollowedArtists', 'SpotifyPlaylist', 'SpotifySavedAlbums'] | None = None) list[dict[str, JsonDataType]]

Gets the schemas for the different import list sources

Parameters:

implementation (Optional[Union[PyarrImportListSchema, LidarrImportListSchema]], optional) – Client implementation name. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_indexer(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any]

Get all indexers or specific by id

Parameters:

id (Optional[int], optional) – Database if of indexer to return. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, dict[Any, Any]]

get_indexer_schema(implementation: Literal['FileList', 'HDBits', 'IPTorrents', 'Newznab', 'Nyaa', 'Omgwtfnzbs', 'PassThePopcorn', 'Rarbg', 'TorrentRssIndexer', 'TorrentPotato', 'Torznab'] | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Get possible indexer connections

Parameters:

implementation (Optional[PyarrIndexerSchema], optional) – indexer system

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_language(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any]

Gets all language profiles or specific one with id

Note

This method is not working in Sonarr, use get_language_profile() I have raised this with the Sonarr team.

Parameters:

id (Optional[int], optional) – Language profile id from database. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, dict[Any, Any]]

get_log(page: int | None = None, page_size: int | None = None, sort_key: Literal['Id', 'level', 'time', 'logger', 'message', 'exception', 'exceptionType'] | None = None, sort_dir: Literal['ascending', 'default', 'descending'] | None = None, filter_key: Literal['level'] | None = None, filter_value: Literal['all', 'info', 'warn', 'error'] | None = None) dict[str, JsonDataType]

Gets logs from instance

Parameters:
  • page (Optional[int], optional) – Specifiy page to return. Defaults to None.

  • page_size (Optional[int], optional) – Number of items per page. Defaults to None.

  • sort_key (Optional[PyarrLogSortKey], optional) – Field to sort by. Defaults to None.

  • sort_dir (Optional[PyarrSortDirection], optional) – Direction to sort. Defaults to None.

  • filter_key (Optional[PyarrFilterKey], optional) – Key to filter by. Defaults to None.

  • filter_value (Optional[PyarrFilterValue], optional) – Value of the filter. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonObject

get_media_management() dict[str, JsonDataType]

Get media management configuration

Returns:

Dictionary with items

Return type:

JsonObject

get_metadata(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Get all metadata consumer settings

Parameters:

id (Optional[int], optional) – ID for specific metadata record

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_notification(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any]

Get a list of all notification services, or single by ID

Parameters:

id (Optional[int], optional) – Notification ID. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, dict[Any, Any]]

get_notification_schema(implementation: Literal['Boxcar', 'CustomScript', 'Discord', 'Email', 'MediaBrowser', 'Gotify', 'Join', 'Xbmc', 'MailGun', 'PlexHomeTheater', 'PlexClient', 'PlexServer', 'Prowl', 'PushBullet', 'Pushover', 'SendGrid', 'Slack', 'SynologyIndexer', 'Telegram', 'Trakt', 'Twitter', 'Webhook'] | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Get possible notification connections

Parameters:

implementation (Optional[PyarrNotificationSchema], optional) – notification system

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_quality_definition(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any]

Gets all quality definitions or specific one by ID

Parameters:

id (Optional[int], optional) – Import list database id. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, dict[Any, Any]]

get_quality_profile(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any]

Gets all quality profiles or specific one with id

Parameters:

id (Optional[int], optional) – Quality profile id from database. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_quality_profile_schema() list[dict[str, JsonDataType]]

Get the schemas for quality profiles

Returns:

List of dictionaries with items

Return type:

JsonArray

get_remote_path_mapping(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any]

Get remote path mappings for downloads Directory

Parameters:

id (Optional[int], optional) – ID for specific record. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_root_folder(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Get list of root folders, free space and any unmappedFolders

Parameters:

id (Optional[int], optional) – ID of the folder to return. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_system_status() dict[str, JsonDataType]

Gets system status

Returns:

Dictionary with items

Return type:

JsonObject

get_tag(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Returns all tags or specific tag by database id

Parameters:

id (Optional[int], optional) – Database id for tag. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_tag_detail(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Returns all tags or specific tag by database id with detailed information

Parameters:

id (Optional[int], optional) – Database id for tag. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_task(id_: int | None = None) dict[str, JsonDataType]

Return a list of tasks, or specify a task ID to return single task

Parameters:

id (Optional[int], optional) – ID for task. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonObject

get_update() list[dict[str, JsonDataType]]

Will return a list of recent updated

Returns:

List of dictionaries with items

Return type:

JsonArray

upd_config_download_client(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Update download client page configurations

Note

Recommended to be used in conjunction with get_config_download_client()

Parameters:

data (JsonObject) – data to be updated

Returns:

dictionary with updated items

Return type:

JsonObject

upd_config_host(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit General/Host settings.

Parameters:

data (JsonObject) – data to be updated

Returns:

Dictionaries with items

Return type:

JsonObject

upd_config_naming(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit Settings for file and folder naming.

Parameters:

data (JsonObject) – data to be updated

Returns:

Dictionary with items

Return type:

JsonObject

upd_config_ui(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit one or many UI settings and save to to the database

Parameters:

data (JsonObject) – Data to be Updated.

Returns:

Dictionary with items

Return type:

JsonObject

upd_download_client(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit a downloadclient by database id

Parameters:
  • id (int) – Download client database id

  • data (JsonObject) – data to be updated within download client

Returns:

dictionary of updated item

Return type:

dict[str, v]

upd_import_list(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit an importlist

Parameters:
  • id (int) – Import list database id

  • data (JsonObject) – data to be updated within the import list

Returns:

Dictionary of updated data

Return type:

JsonObject

upd_indexer(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit a Indexer by database id

Note

To be used in conjunction with get_indexer()

Parameters:
  • id (int) – Indexer database id

  • data (JsonObject) – Data to be updated within Indexer

Returns:

Dictionary of updated record

Return type:

JsonObject

upd_media_management(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Get media management configuration

Note

Recommended to use with get_media_management()

Parameters:

data (JsonObject) – data to be updated

Returns:

Dictionary with items

Return type:

JsonObject

upd_notification(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit notification by database id

Parameters:
  • id (int) – Database id of notification

  • data (JsonObject) – data that requires updating

Returns:

Dictionary of updated record

Return type:

JsonObject

upd_quality_definition(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType]

Update the quality definitions.

Note

To be used in conjunction with get_quality_definition()

Parameters:
  • id (int) – ID of definition to update

  • data (JsonObject) – All parameters to update

Returns:

Dictionary of updated record

Return type:

JsonObject

upd_quality_profile(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType]

Update the quality profile data

Note

To be used in conjunction with get_quality_profile()

Parameters:
  • id (int) – Profile ID to Update

  • data (JsonObject) – All parameters to update

Returns:

Dictionary of updated record

Return type:

JsonObject

upd_tag(id_: int, label: str) dict[str, JsonDataType]

Update an existing tag

Note

You should perform a get_tag() and submit the full body with changes

Parameters:
  • id (int) – Database id of tag

  • label (str) – tag name / label

Returns:

Dictionary of updated items

Return type:

JsonObject