Playlist Schedule Helper

class AzuracastPy.models.playlist.ScheduleHelper(_playlist)

Provides functions for working with the schedule of a playlist.

__init__(_playlist)

Initializes a ScheduleHelper instance.

Note

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

add(*args: Dict[str, Any])

Adds one or more new schedule items to the playlist of the station.

Parameters:

args – The new schedule item(s) to be added to the playlist.

Usage:

item = station.playlist.generate_schedule_item(
    start_time="12:32",
    end_time="23:10",
    start_date="2024-09-08",
    end_date="2025-07-08",
    days=["monday", "thursday"]
)

playlist.schedule.add(item)
remove(id: int)

Removes a schedule item from the playlist’s current schedule.

Parameters:

id – The ID of the schedule item to be removed.

Usage:

playlist.schedule.remove(1)