All the things
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user