Station Remote Relay Helper

class AzuracastPy.models.helpers.RemoteRelayHelper(_station)

Provides a set of functions to interact with remote relays.

__call__(id: int) RemoteRelay

Retrieves a specific remote relay from the station.

Parameters:

id – The numerical ID of the remote relay to be retrieved.

Returns:

A RemoteRelay object.

Usage:

remote_relay = station.remote_relay(1)
__init__(_station)

Initializes a RemoteRelayHelper instance.

Note

This class should not be initialized directly. Instead, obtain an instance via: remote_relay.

create(station_listening_url: str, remote_type: RemoteTypes = RemoteTypes.ICECAST, display_name: str | None = None, station_listening_mount_point: str | None = None, station_admin_password: str | None = None, show_on_public_pages: bool = True, enable_autodj: bool = False, autodj_format: Formats = Formats.MP3, autodj_bitrate: Bitrates = Bitrates.BITRATE_128, station_source_port: int | None = None, station_source_mount_point: str | None = None, station_source_username: str | None = None, station_source_password: str | None = None, is_public: bool = False) RemoteRelay

Adds a remote relay to the station.

Parameters:
  • station_listening_url – If the remote radio URL is “http://station.example.com:8000/radio.mp3”, enter “http://station.example.com:8000”.

  • remote_type – The type of the remote station. Default: RemoteTypes.ICECAST.

  • display_name – The display name of this relay when viewing it on administrative or public pages. Leave as None to automatically generate one. Default: None.

  • station_listening_mount_point

  • station_admin_password – To retrieve detailed unique listeners and client details, an administrator password is often required.

  • show_on_public_pages – Determines whether listeners can select this relay on this station’s public pages. Default: True.

  • enable_autodj – Determines whether the AutoDJ on this installation will automatically play music to this mount point. Default: None.

  • autodj_format – The format of the music played by AutoDJ. Default: Formats.MP3.

  • autodj_bitrate – The bitrate of the music played by AutoDJ. Default: Bitrates.BITRATE_128.

  • station_source_port

  • station_source_mount_point

  • station_source_username – (Optional) If you are broadcasting using AutoDJ, enter the source username here. This may be blank. Default: None.

  • station_source_password – (Optional) If you are broadcasting using AutoDJ, enter the source password here. Default: None.

  • is_public – Set to True to advertise this relay on “Yellow Pages” public radio directories. Default: False.

Returns:

A RemoteRelay object for the newly created remote relay.

Usage:

from AzuracastPy.enums import Formats

remote_relay = station.remote_relay.create(
    station_listening_url="http://station.example.com:8000",
    display_name="Display name",
    autodj_format=Formats.MP3
)