Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.cast.helpers Namespace Reference

Classes

class  CastStatusListener
 
class  ChromecastInfo
 
class  ChromeCastZeroconf
 
class  PlaylistError
 
class  PlaylistItem
 
class  PlaylistSupported
 

Functions

def _fetch_playlist (hass, url, supported_content_types)
 
def _is_url (url)
 
def parse_m3u (hass, url)
 
def parse_playlist (hass, url)
 
def parse_pls (hass, url)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string _PLS_SECTION_PLAYLIST = "playlist"
 

Detailed Description

Helpers to deal with Cast devices.

Function Documentation

◆ _fetch_playlist()

def homeassistant.components.cast.helpers._fetch_playlist (   hass,
  url,
  supported_content_types 
)
private
Fetch a playlist from the given url.

Definition at line 247 of file helpers.py.

◆ _is_url()

def homeassistant.components.cast.helpers._is_url (   url)
private
Validate the URL can be parsed and at least has scheme + netloc.

Definition at line 241 of file helpers.py.

◆ parse_m3u()

def homeassistant.components.cast.helpers.parse_m3u (   hass,
  url 
)
Very simple m3u parser.

Based on https://github.com/dvndrsn/M3uParser/blob/master/m3uparser.py

Definition at line 267 of file helpers.py.

◆ parse_playlist()

def homeassistant.components.cast.helpers.parse_playlist (   hass,
  url 
)
Parse an m3u or pls playlist.

Definition at line 360 of file helpers.py.

◆ parse_pls()

def homeassistant.components.cast.helpers.parse_pls (   hass,
  url 
)
Very simple pls parser.

Based on https://github.com/mariob/plsparser/blob/master/src/plsparser.py

Definition at line 315 of file helpers.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.cast.helpers._LOGGER = logging.getLogger(__name__)
private

Definition at line 27 of file helpers.py.

◆ _PLS_SECTION_PLAYLIST

string homeassistant.components.cast.helpers._PLS_SECTION_PLAYLIST = "playlist"
private

Definition at line 29 of file helpers.py.