sounds.models¶
Attributes¶
Classes¶
Base class for all objects with common functionality. |
|
Represents a network/brand with basic metadata. |
|
Base container for organizing content - not directly playable. |
|
Base class for actual playable content. |
|
Mixin for content with timing information. |
|
Represents a broadcast item. |
|
Represents a scheduled program item. |
|
Represents a radio/media station. |
|
Represents a search result showing a station. Keys are different enough to warrant a separate model |
|
Base class for actual playable content. |
|
Base class for actual playable content. |
|
Represents a station stream. |
|
Represents a segment within a stream. |
|
Represents a schedule for a given date. |
|
Represents a playable radio show. |
|
Represents a playable radio clip. |
|
Represents a playable podcast episode. |
|
Represents a podcast container (holds episodes). |
|
Represents a radio series container (holds episodes). |
|
Represents a collection container. |
|
Represents a content category. |
|
Represents a content category container. |
|
Represents a content collection container. |
|
Represents a menu item container. |
|
Represents a recommended menu item. |
|
Represents a menu container with items. |
|
Base container for organizing content - not directly playable. |
|
Base container for organizing content - not directly playable. |
|
Functions¶
|
Module Contents¶
- type sounds.models.SoundsTypes = models.Broadcast | models.Category | models.CategoryItemContainer | models.Container | models.Collection | models.LiveStation | models.MenuItem | models.Network | models.Podcast | models.PodcastEpisode | models.RadioClip | models.RadioSeries | models.RadioShow | models.RecommendedMenuItem | models.Segment | models.Schedule | models.ScheduleItem | models.Station | models.StationSearchResult¶
- class sounds.models.BaseObject¶
Base class for all objects with common functionality.
- class sounds.models.Network¶
Represents a network/brand with basic metadata.
- current_programme: LiveProgramme | None = None¶
- class sounds.models.Container¶
Bases:
BaseObjectBase container for organizing content - not directly playable.
- sub_items: List[SoundsTypes] | None = None¶
- property item_id¶
- class sounds.models.PlayableItem¶
Bases:
BaseObjectBase class for actual playable content.
- start: datetime.datetime | None = None¶
- end: datetime.datetime | None = None¶
- property item_id¶
- class sounds.models.TimedContent¶
Mixin for content with timing information.
- is_live(timezone: zoneinfo.ZoneInfo | pytz.tzinfo.BaseTzInfo) bool¶
- has_already_aired(timezone: zoneinfo.ZoneInfo | pytz.tzinfo.BaseTzInfo) bool¶
- class sounds.models.Broadcast¶
Represents a broadcast item.
- start: datetime.datetime¶
- end: datetime.datetime¶
- class sounds.models.ScheduleItem¶
Bases:
PlayableItemRepresents a scheduled program item.
- is_live(timezone: zoneinfo.ZoneInfo | pytz.tzinfo.BaseTzInfo) bool¶
- has_already_aired(timezone: zoneinfo.ZoneInfo | pytz.tzinfo.BaseTzInfo) bool¶
- class sounds.models.StationSearchResult¶
Represents a search result showing a station. Keys are different enough to warrant a separate model
- property item_id¶
- class sounds.models.LiveProgramme¶
Bases:
PlayableItemBase class for actual playable content.
- class sounds.models.LiveStation¶
Bases:
PlayableItemBase class for actual playable content.
- property item_id¶
- class sounds.models.Stream¶
Bases:
TimedContentRepresents a station stream.
- class sounds.models.Segment¶
Represents a segment within a stream.
- class sounds.models.Schedule¶
Bases:
ContainerRepresents a schedule for a given date.
- get_current_item(timezone: zoneinfo.ZoneInfo | pytz.tzinfo.BaseTzInfo = pytz.timezone('UTC')) ScheduleItem | None¶
Get the currently airing schedule item.
- class sounds.models.RadioShow¶
Bases:
PlayableItem,TimedContentRepresents a playable radio show.
- property item_id¶
- class sounds.models.RadioClip¶
Bases:
PlayableItem,TimedContentRepresents a playable radio clip.
- class sounds.models.PodcastEpisode¶
Bases:
PlayableItemRepresents a playable podcast episode.
- class sounds.models.RadioSeries¶
Bases:
PodcastRepresents a radio series container (holds episodes).
- class sounds.models.CategoryItemContainer¶
Represents a content category container.
- sub_items: List[SoundsTypes] | None = None¶
- class sounds.models.CollectionItemContainer¶
Bases:
CategoryItemContainerRepresents a content collection container.
- class sounds.models.Menu¶
Represents a menu container with items.
- get(key: str) MenuItem | RecommendedMenuItem | None¶
Get a menu item by ID.
- class sounds.models.DisplayItem¶
Bases:
ContainerBase container for organizing content - not directly playable.
- item: PlayableItem | None = None¶
- class sounds.models.PromoItem¶
Bases:
ContainerBase container for organizing content - not directly playable.
- item: PlayableItem¶
- class sounds.models.SearchResults¶
- stations: List[LiveStation | StationSearchResult]¶
- episodes: List[PodcastEpisode | RadioClip | RadioShow]¶
- sounds.models.model_factory(object)¶