-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.py
80 lines (58 loc) · 1.1 KB
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# ! File for all boltz models
from dataclasses import dataclass
@dataclass
class BoltzUrl:
type:str
id:str
is_valid:bool
@dataclass
class BoltzImage:
width:int
height:int
url:str
@dataclass
class BoltzArtist:
name:str
uri:str
@dataclass
class BoltzItem:
album_images:list[BoltzImage]
album_name:str
release_date:str
total_tracks:int
artists: list[BoltzArtist]
id:str
name:str
track_number:int
@dataclass
class BoltzAlbum:
name:str
year:str
total_tracks:int
cover:str
artists:list[BoltzArtist]
@dataclass
class BoltzTrack:
id:int
name:str
position:int
album:BoltzAlbum
artist:str
genre:str
@dataclass
class BoltzMP3:
is_valid:bool
track:BoltzTrack
mp3_filename:str
index:int
@dataclass
class BoltzSearchTypes:
track:str = "track"
album:str = "album"
playlist:str = "playlist"
@dataclass
class BoltzSearchResult:
url: BoltzUrl
title: str
artist: str
image: BoltzImage