@@ -38,7 +38,20 @@ class Album(Model):
38
38
release_date = None
39
39
40
40
@property
41
- def image (self , width = 512 , height = 512 ):
41
+ def image (self , width = 1280 , height = 1280 ):
42
+ return IMG_URL .format (width = width , height = height , id = self .id , id_type = 'albumid' )
43
+
44
+ def picture (self , width , height ):
45
+ """
46
+ A url to an album picture
47
+
48
+ :param width: pixel width, maximum 2000
49
+ :type width: int
50
+ :param height: pixel height, maximum 2000
51
+ :type height: int
52
+
53
+ Original sizes: 80x80, 160x160, 320x320, 640x640 and 1280x1280
54
+ """
42
55
return IMG_URL .format (width = width , height = height , id = self .id , id_type = 'albumid' )
43
56
44
57
@@ -47,7 +60,20 @@ class Artist(Model):
47
60
role = None
48
61
49
62
@property
50
- def image (self , width = 512 , height = 512 ):
63
+ def image (self , width = 1280 , height = 1280 ):
64
+ return IMG_URL .format (width = height , height = height , id = self .id , id_type = 'artistid' )
65
+
66
+ def picture (self , width , height ):
67
+ """
68
+ A url to an artist picture
69
+
70
+ :param width: pixel width, maximum 2000
71
+ :type width: int
72
+ :param height: pixel height, maximum 2000
73
+ :type height: int
74
+
75
+ Original sizes: 80x80, 160x160, 320x320, 480x480, 640x640, 1280x1280
76
+ """
51
77
return IMG_URL .format (width = width , height = height , id = self .id , id_type = 'artistid' )
52
78
53
79
@@ -62,9 +88,24 @@ class Playlist(Model):
62
88
duration = - 1
63
89
64
90
@property
65
- def image (self , width = 512 , height = 512 ):
91
+ def image (self , width = 1080 , height = 1080 ):
92
+ return IMG_URL .format (width = width , height = height , id = self .id , id_type = 'uuid' )
93
+
94
+ def picture (self , width , height ):
95
+ """
96
+ A url to a playlist picture
97
+
98
+ :param width: pixel width, maximum 2000
99
+ :type width: int
100
+ :param height: pixel height, maximum 2000
101
+ :type height: int
102
+
103
+ Original sizes: 160x160, 320x320, 480x480, 640x640, 750x750, 1080x1080
104
+
105
+ """
66
106
return IMG_URL .format (width = width , height = height , id = self .id , id_type = 'uuid' )
67
107
108
+
68
109
class Media (Model ):
69
110
duration = - 1
70
111
track_num = - 1
@@ -75,12 +116,15 @@ class Media(Model):
75
116
album = None
76
117
available = True
77
118
119
+
78
120
class Track (Media ):
79
121
pass
80
122
123
+
81
124
class Video (Media ):
82
125
type = None
83
126
127
+
84
128
class SearchResult (Model ):
85
129
artists = []
86
130
albums = []
0 commit comments