1
0
mirror of https://github.com/natekspencer/hacs-oasis_mini.git synced 2025-12-06 18:44:14 -05:00

Enhance media_player with browse/search capability

This commit is contained in:
Nathan Spencer
2025-11-25 18:33:32 +00:00
parent 8abd20a4ff
commit c1754ad959
7 changed files with 457 additions and 40 deletions

View File

@@ -200,5 +200,10 @@ def decrypt_svg_content(svg_content: dict[str, str]):
return decrypted
def get_track_ids_from_playlist(playlist: dict[str, Any]) -> list[int]:
"""Get a list of track ids from a playlist."""
return [track["id"] for track in (playlist.get("patterns") or [])]
def now() -> datetime:
return datetime.now(UTC)