@@ -38,7 +38,20 @@ class Album(Model):
3838 release_date = None
3939
4040 @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+ """
4255 return IMG_URL .format (width = width , height = height , id = self .id , id_type = 'albumid' )
4356
4457
@@ -47,7 +60,20 @@ class Artist(Model):
4760 role = None
4861
4962 @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+ """
5177 return IMG_URL .format (width = width , height = height , id = self .id , id_type = 'artistid' )
5278
5379
@@ -62,9 +88,24 @@ class Playlist(Model):
6288 duration = - 1
6389
6490 @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+ """
66106 return IMG_URL .format (width = width , height = height , id = self .id , id_type = 'uuid' )
67107
108+
68109class Media (Model ):
69110 duration = - 1
70111 track_num = - 1
@@ -75,12 +116,15 @@ class Media(Model):
75116 album = None
76117 available = True
77118
119+
78120class Track (Media ):
79121 pass
80122
123+
81124class Video (Media ):
82125 type = None
83126
127+
84128class SearchResult (Model ):
85129 artists = []
86130 albums = []
0 commit comments