Settings

class AzuracastPy.models.administration.Settings(app_unique_identifier, base_url, instance_name, prefer_browser_url, use_radio_proxy, history_keep_days, always_use_ssl, api_access_control: str, enable_static_nowplaying, analytics, check_for_updates, update_results: UpdateResults, update_last_run, public_theme, hide_album_art, homepage_redirect_url, default_album_art_url, use_external_album_art_when_processing_media, use_external_album_art_in_apis, last_fm_api_key, hide_product_name, public_custom_css, public_custom_js, internal_custom_css, backup_enabled, backup_time_code, backup_exclude_media, backup_keep_copies, backup_storage_location, backup_format, backup_last_run, backup_last_output, setup_complete_time, sync_disabled, sync_last_run, external_ip, geolite_license_key, geolite_last_run, enable_advanced_features, mail_enabled, mail_sender_name, mail_sender_email, mail_smtp_host, mail_smtp_port, mail_smtp_username, mail_smtp_password, mail_smtp_secure, avatar_service, avatar_default_url, acme_email, acme_domains: str, ip_source, _admin)

Represents a radio’s settings.

__init__(app_unique_identifier, base_url, instance_name, prefer_browser_url, use_radio_proxy, history_keep_days, always_use_ssl, api_access_control: str, enable_static_nowplaying, analytics, check_for_updates, update_results: UpdateResults, update_last_run, public_theme, hide_album_art, homepage_redirect_url, default_album_art_url, use_external_album_art_when_processing_media, use_external_album_art_in_apis, last_fm_api_key, hide_product_name, public_custom_css, public_custom_js, internal_custom_css, backup_enabled, backup_time_code, backup_exclude_media, backup_keep_copies, backup_storage_location, backup_format, backup_last_run, backup_last_output, setup_complete_time, sync_disabled, sync_last_run, external_ip, geolite_license_key, geolite_last_run, enable_advanced_features, mail_enabled, mail_sender_name, mail_sender_email, mail_smtp_host, mail_smtp_port, mail_smtp_username, mail_smtp_password, mail_smtp_secure, avatar_service, avatar_default_url, acme_email, acme_domains: str, ip_source, _admin)

Initializes a Settings object for a radio.

Note

This class should not be initialized directly. Instead, obtain an instance via: settings().

edit(base_url: str | None = None, instance_name: str | None = None, prefer_browser_url: bool | None = None, use_radio_proxy: bool | None = None, use_high_performance_now_playing_updates: bool | None = None, history_keep_days: HistoryKeepDays | None = None, listener_analytics: AnalyticsTypes | None = None, always_use_https: bool | None = None, ip_address_source: IPAddressSources | None = None, api_access_control: str | List[str] | None = None, show_update_announcements: bool | None = None, acme_email: str | None = None, acme_domains: List[str] | None = None, enable_mail_delivery: bool | None = None, mail_sender_name: str | None = None, mail_sender_email: str | None = None, mail_smtp_host: str | None = None, mail_smtp_port: str | None = None, mail_smtp_username: str | None = None, mail_smtp_password: str | None = None, mail_smtp_secure: bool | None = None, avatar_service: RadioAvatarServices | None = None, avatar_default_url: str | None = None, check_web_services_for_album_art_for_now_playing_tracks: bool | None = None, check_web_services_for_album_art_when_uploading_media: bool | None = None, last_fm_api_key: str | None = None, public_theme: PublicThemes | None = None, hide_album_art_on_public_pages: bool | None = None, hide_azuracast_branding_on_public_pages: bool | None = None, homepage_redirect_url: str | None = None, default_album_art_url: str | None = None, public_custom_css: str | None = None, public_custom_js: str | None = None, internal_custom_css: str | None = None, enable_advanced_features: bool | None = None)

Edits the radio’s settings.

Updates all edited attributes of the current Settings object.

Parameters:
  • base_url – (Optional) The base URL where this service is located. Use either the external IP address or fully-qualified domain name (if one exists) pointing to this server. Default: None.

  • instance_name – (Optional) This name will appear as a sub-header next to the AzuraCast logo, to help identify this server. Default: None.

  • prefer_browser_url – (Optional) If this is set to True, the browser URL will be used instead of the base URL when it’s available. Default: None

  • use_radio_proxy – (Optional) Determines whether all radio will be routed through the web ports. Default: None.

  • use_high_performance_now_playing_updates – (Optional) Uses either Websockets, Server-Sent Events (SSE) or static JSON files to serve Now Playing data on public pages. This improves performance, especially with large listener volume. Disable this if you are encountering problems with the service or use multiple URLs to serve your public pages. Default: None.

  • history_keep_days – (Optional) Set longer to preserve more playback history and listener metadata for stations. Set shorter to save disk space. Default: None.

  • listener_analytics – (Optional) Full analytics are used to show station reports across the system. Limited analytics are used to view live listener tracking and may be required for royalty reports. Default: None.

  • always_use_https – (Optional) Set to True to always use “https://” secure URLs, and to automatically redirect to the secure URL when an insecure URL is visited. Default: None.

  • ip_address_source – (Optional) Customize this setting to ensure you get the correct IP address for remote users. Only change this setting if you use a reverse proxy, either within Docker or a third-party service like CloudFlare. Default: None.

  • api_access_control – (Optional) Set to "*" to allow all sources, or specify a list of origins. Default: None.

  • show_update_announcements – (Optional) Show new releases within your update channel on the AzuraCast homepage. Default: None.

  • acme_email – (Optional) E-mail address to receive updates about your certificate. Default: None.

  • acme_domains – (Optional) All listed domain names should point to this AzuraCast installation. Default: None.

  • enable_mail_delivery – (Optional) Used for “Forgot Password” functionality, web hooks and other functions. Default: None.

  • mail_sender_name – (Optional) The name of the mail sender. Default: None.

  • mail_sender_email – (Optional) The email of the mail sender. Default: None.

  • mail_smtp_host – (Optional) The SMTP host. Default: None

  • mail_smtp_port – (Optional) The SMTP port. Default: None

  • mail_smtp_username – (Optional) The SMTP username. Default: None

  • mail_smtp_password – (Optional) The SMTP password. Default: None

  • mail_smtp_secure – (Optional) Determines whether secure SMTP connection will be used. Usually enabled for port 465, disabled for ports 587 or 25. Default: None.

  • avatar_service – (Optional) Default: None

  • avatar_default_url – (Optional) Default: None

  • check_web_services_for_album_art_for_now_playing_tracks – (Optional) Default: None

  • check_web_services_for_album_art_when_uploading_media – (Optional) Default: None

  • last_fm_api_key – (Optional) This service can provide album art for tracks where none is available locally. Default: None.

  • public_theme – (Optional) The theme to be used as a base for station public pages and the login page. Default: None.

  • hide_album_art_on_public_pages – (Optional) Determines whether album will be hidden on public pages. Default: None.

  • hide_azuracast_branding_on_public_pages – (Optional) Determines whether the AzuraCast branding will be removed from public-facing pages. Default: None.

  • homepage_redirect_url – (Optional) If a visitor is not signed in and visits the AzuraCast homepage, you can automatically redirect them to the URL specified here. Leave blank to redirect them to the login screen by default. Default: None.

  • default_album_art_url – (Optional) If a song has no album art, this URL will be listed instead. Leave blank to use the standard placeholder art. Default: None.

  • public_custom_css – (Optional) This CSS will be applied to the station public pages and login page. Default: None.

  • public_custom_js – (Optional) This javascript code will be applied to the station public pages and login page. Default: None.

  • internal_custom_css – (Optional) This CSS will be applied to the main management pages. Default: None.

  • enable_advanced_features – (Optional) Determines whether advanced features in the web interface will be enabled. Default: None.

Usage:

from AzuracastPy.enums import AnalyticsTypes, PublicThemes

settings.edit(
    instance_name="newnamehehe",
    always_use_https=True,
    listener_analytics=AnalyticsTypes.LIMITED,
    public_theme=PublicThemes.SYSTEM_DEFAULT
)