mirror of
https://github.com/natekspencer/hacs-oasis_mini.git
synced 2025-12-06 18:44:14 -05:00
Address PR review
This commit is contained in:
@@ -202,7 +202,12 @@ def decrypt_svg_content(svg_content: dict[str, str]):
|
||||
|
||||
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 [])]
|
||||
return [track["id"] for track in (playlist.get("patterns") or []) if "id" in track]
|
||||
|
||||
|
||||
def get_url_for_image(image: str | None) -> str | None:
|
||||
"""Get the full URL for an image."""
|
||||
return f"https://app.grounded.so/uploads/{image}" if image else None
|
||||
|
||||
|
||||
def now() -> datetime:
|
||||
|
||||
Reference in New Issue
Block a user