Пример #1
0
 def song(self):
     """
     :class:`Song` object of next song to play
     """
     song = self._connection.request('autoplayGetSong', {'weightModifierRange' : [-9,9],
                                                         'seedArtists' : dict([(artist, 'p') for artist in self._artists]),
                                                         'tagID' : self._radio, 'recentArtists' : self._recent_artists, 
                                                         'songQueueID' : self._connection.session.queue, 'secondaryArtistWeightModifier' : 0.75,
                                                         'country' : self._connection.session.country, 'seedArtistWeightRange' : [110,130],
                                                         'songIDsAlreadySeen' : self._songs_already_seen, 'maxDuration' : 1500,
                                                         'minDuration' : 60, 'frowns' : []},
                                     self._connection.header('autoplayGetSong', 'jsqueue'))[1]
     return Song(song['SongID'], song['SongName'], song['ArtistID'], song['ArtistName'], song['AlbumID'], song['AlbumName'],
                 song['CoverArtUrl'], None, song['EstimateDuration'], None, self._connection)