def getArtistAlbums(self, id, includeEP = False): albums = [] msg, data = self.__getItems__('artists/' + str(id) + "/albums") if msg is not None: return msg, None for item in data: albums.append(dictToModel(item, Album())) if includeEP == False: return None, albums msg, data = self.__getItems__('artists/' + str(id) + "/albums", {"filter": "EPSANDSINGLES"}) if msg is not None: return msg, None for item in data: albums.append(dictToModel(item, Album())) return None, albums
def getAlbum(self, id): msg, data = self.__get__('albums/' + str(id)) return msg, dictToModel(data, Album())
def test(self): ar = Artist() ar.name = 'yaron' ar.id = 110 album = Album() album.artist = None album.artists = [ar] album.audioModes = ['STEREO'] album.audioQuality = 'LOSSLESS' album.cover = '8203ff9a-47e3-49a0-9b44-a6dbbe9c9469' album.duration = 1140 album.explicit = False album.id = 177748204 album.numberOfTracks = 10 album.numberOfVideos = 0 album.numberOfVolumes = 1 album.releaseDate = '2021-03-16' album.title = 'Love' album.type = 'ALBUM' album.version = None self.addTaskItem(album)