Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.spotify.util Namespace Reference

Functions

str|None fetch_image_url (list[Image] images)
 
bool is_spotify_media_type (str media_content_type)
 
str resolve_spotify_media_type (str media_content_type)
 
str spotify_uri_from_media_browser_url (str media_content_id)
 

Detailed Description

Utils for Spotify.

Function Documentation

◆ fetch_image_url()

str | None homeassistant.components.spotify.util.fetch_image_url ( list[Image]  images)
Fetch image url.

Definition at line 21 of file util.py.

◆ is_spotify_media_type()

bool homeassistant.components.spotify.util.is_spotify_media_type ( str  media_content_type)
Return whether the media_content_type is a valid Spotify media_id.

Definition at line 11 of file util.py.

◆ resolve_spotify_media_type()

str homeassistant.components.spotify.util.resolve_spotify_media_type ( str  media_content_type)
Return actual spotify media_content_type.

Definition at line 16 of file util.py.

◆ spotify_uri_from_media_browser_url()

str homeassistant.components.spotify.util.spotify_uri_from_media_browser_url ( str  media_content_id)
Extract spotify URI from media browser URL.

Definition at line 28 of file util.py.