Mount Point
- class AzuracastPy.models.MountPoint(name: str, display_name: str, is_visible_on_public_pages: bool, is_default: bool, is_public: bool, fallback_mount, relay_url: str, authhash: str, max_listener_duration: int, enable_autodj: bool, autodj_format: str, autodj_bitrate: int, custom_listen_url: str, intro_path: str, frontend_config: str, listeners_unique: int, listeners_total: int, id: int, links: Links, _station)
Represents a mount point on a station.
- __init__(name: str, display_name: str, is_visible_on_public_pages: bool, is_default: bool, is_public: bool, fallback_mount, relay_url: str, authhash: str, max_listener_duration: int, enable_autodj: bool, autodj_format: str, autodj_bitrate: int, custom_listen_url: str, intro_path: str, frontend_config: str, listeners_unique: int, listeners_total: int, id: int, links: Links, _station)
Initializes a
MountPointobject.Note
This class should not be initialized directly. Instead, obtain an instance via:
create(),__call__()ormount_points().
- delete()
Deletes the mount point from the station.
Sets all attributes of the current
MountPointobject toNone.Usage:
mount_point.delete()
- edit(mount_point_url: str | None = None, display_name: str | None = None, show_on_public_pages: bool | None = None, is_default: bool | None = None, is_public: bool | None = None, relay_stream_url: str | None = None, max_listener_duration: int | None = None, fallback_mount: str | None = None, enable_autodj: bool | None = None, autodj_format: Formats | None = None, autodj_bitrate: Bitrates | None = None, custom_url: str | None = None, custom_frontend_config: Dict[str, Any] | str | None = None)
Edits the mount point’s properties.
Updates all edited attributes of the current
MountPointobject.- Parameters:
mount_point_url – (Optional) The new URL assigned to the mount point. Must be a valid URL, such as
"/autodj.mp3". Default:None.display_name – (Optional) The new display name assigned to this mount point when viewing it on administrative or public pages. Default:
None.show_on_public_pages – (Optional) Determines whether listeners are allowed to select this mount point on this station’s public pages. Default:
None.is_default – (Optional) Determines whether this mount will be played on the radio preview and the public radio page in this system. Default:
None.is_public – (Optional) Determines whether this mount will be advertised on “Yellow Pages” public radio directories. Default:
None.relay_stream_url – (Optional) The new full URL of another stream to relay its broadcast through this mount point. Default:
None.max_listener_duration – (Optional) The length of time (seconds) a listener will stay connected to the stream. Set to
0to let listeners stay connected infinitely. Default:None.fallback_mount – (Optional) The new mount point users will be redirected to if this mount point is not playing audio. Default:
None.enable_autodj – (Optional) Determines whether the AutoDJ will automatically play music to this mount point. Default:
None.autodj_format – (Optional) The new format of the audio AutoDJ will play on this mount point. Default:
None.autodj_bitrate – (Optional) The new bitrate of the audio AutoDJ will play on this mount point. Default:
None.custom_url – (Optional) The new custom URL for this stream that AzuraCast will use when referring to it. Default:
None.custom_frontend_config – (Optional) New special mount point settings, in either JSON { key: ‘value’ } format or XML <key>value</key>. Default:
None.
Usage:
from AzuracastPy.enums import Formats, Bitrates mount_point.edit( display_name="New display name", enable_autodj=True, autodj_format=Formats.OPUS, autodj_bitrate=Bitrates.BITRATE_32 )