All the things

This commit is contained in:
2022-05-26 14:20:13 +02:00
parent ec7cb4ca57
commit e0445f621e
6 changed files with 336 additions and 6 deletions

View File

@@ -2,9 +2,16 @@ from typing import Optional
import requests
import tempfile
from uuid import UUID
class RadioTrack:
def __init__(self, data: dict) -> None:
try:
self.id = UUID(data["id"])
except ValueError:
self.id = None
self.artist = data["artist"]
self.title = data["name"]
self.cover = data["cover_url"]