devopsarr.sonarr.sonarr_naming module – Manages Sonarr naming.

Note

This module is part of the devopsarr.sonarr collection (version 1.3.1).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install devopsarr.sonarr.

To use it in a playbook, specify: devopsarr.sonarr.sonarr_naming.

New in devopsarr.sonarr 0.0.6

Synopsis

  • Manages Sonarr naming.

Parameters

Parameter

Comments

anime_episode_format

string / required

Anime episode format.

colon_replacement_format

integer / required

Colon replacement format. 0 - ‘Delete’ 1 - ‘Replace with Dash’ 2 - ‘Replace with Space Dash’ 3 - ‘Replace with Space Dash Space’ 4 - ‘Smart Replace’, 5 - ‘Custom Replace’.

Choices:

  • 0

  • 1

  • 2

  • 3

  • 4

  • 5

custom_colon_replacement_format

string

Custom colon folder format.

Default: ""

daily_episode_format

string / required

Daily episode format.

multi_episode_style

integer / required

Multi episode style. 0 - ‘Extend’ 1 - ‘Duplicate’ 2 - ‘Repeat’ 3 - ‘Scene’ 4 - ‘Range’ 5 - ‘Prefixed Range’.

Choices:

  • 0

  • 1

  • 2

  • 3

  • 4

  • 5

rename_episodes

boolean / required

Rename episodes.

Choices:

  • false

  • true

replace_illegal_characters

boolean / required

Replace illegal characters.

Choices:

  • false

  • true

season_folder_format

string / required

Series folder format.

series_folder_format

string / required

Series folder format.

sonarr_api_key

string / required

API key for Sonarr authentication.

sonarr_url

string / required

Full Sonarr URL with protocol and port (e.g. `https://test.sonarr.tv:8989`)

specials_folder_format

string / required

Series folder format.

standard_episode_format

string / required

Standard episode format.

Notes

Note

  • for authentication, you can set service_account_file using the c(SONARR_URL) env variable.

  • for authentication, you can set service_account_contents using the c(SONARR_API_KEY) env variable.

Examples

---
# update naming
- name: Update naming
  devopsarr.sonarr.sonarr_naming:
    rename_episodes: true
    replace_illegal_characters: true
    multi_episode_style: 0
    colon_replacement_format: 0
    daily_episode_format: '{Series Title} - {Air-Date} - {Episode Title} {Quality Full}'
    anime_episode_format: '{Series Title} - S{season:00}E{episode:00} - {Episode Title} {Quality Full}'
    series_folder_format: '{Series Title}'
    season_folder_format: 'Season {season}'
    specials_folder_format: 'S0'
    standard_episode_format: '{Series Title} - S{season:00}E{episode:00} - {Episode Title} {Quality Full}'

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

anime_episode_format

string

Anime episode format.

Returned: always

Sample: "{Series Title} - S{season:00}E{episode:00} - {Episode Title} {Quality Full}"

colon_replacement_format

integer

Colon replacement format. 0 - ‘Delete’ 1 - ‘Replace with Dash’ 2 - ‘Replace with Space Dash’ 3 - ‘Replace with Space Dash Space’ 4 - ‘Smart Replace’.

Returned: always

Sample: 2

custom_colon_replacement_format

string

Custom colon replacement format.

Returned: always

Sample: ":"

daily_episode_format

string

Daily episode format.

Returned: always

Sample: "{Series Title} - {Air-Date} - {Episode Title} {Quality Full}"

id

integer

Naming ID.

Returned: always

Sample: 1

multi_episode_style

integer

Multi episode style. 0 - ‘Extend’ 1 - ‘Duplicate’ 2 - ‘Repeat’ 3 - ‘Scene’ 4 - ‘Range’ 5 - ‘Prefixed Range’.

Returned: always

Sample: 2

rename_episodes

boolean

Rename episodes.

Returned: always

Sample: true

replace_illegal_characters

boolean

Replace illegal characters.

Returned: always

Sample: true

season_folder_format

string

Series folder format.

Returned: always

Sample: "Season {season}"

series_folder_format

string

Series folder format.

Returned: always

Sample: "{Series Title}"

specials_folder_format

string

Series folder format.

Returned: always

Sample: "S0"

standard_episode_format

string

Standard episode format.

Returned: always

Sample: "{Series Title} - S{season:00}E{episode:00} - {Episode Title} {Quality Full}"

Authors

  • Fuochi (@Fuochi)