def do_play_christmas(self, line): """Play seasonal Christmas songs""" logger.debug('call function do_play_christmas') profile_id = pk.en_profile_id(self.params['echonest_key']) songids = pk.en_playlist_seed_song_type(self.params['echonest_key'], profile_id, 'christmas') pk.playback_stop(self.params) pk.playlist_clear(self.params) pk.playlist_add_songs(self.params, songids) pk.playback_start(self.params)
def do_echonest_info(self, line): """ Display info about the echonest taste profile. Usage: en_info """ logger.debug('call function do_echonest_info') profile_id = pk.en_profile_id(self.params['echonest_key']) en_info = pk.en_info(self.params['echonest_key'], profile_id) pkd.en_info(en_info) print
def do_echonest_display(self, line): """ Display song details in tasteprofile Usage: echonest_display id """ logger.debug('call function do_echonest_display') songid = int(line) profile_id = pk.en_profile_id(self.params['echonest_key']) song_data = pk.en_display(self.params['echonest_key'], profile_id, songid) pkd.en_display(song_data) print
def do_play_favorite(self, line): """ Like the current song (in your echonest tasteprofile) Usage: play_favorite The echonest integration should be activated. """ logger.debug('call function do_play_favorite') songid = pk.player_songid(self.params) profile_id = pk.en_profile_id(self.params['echonest_key']) pk.en_favorite(self.params['echonest_key'], profile_id, songid) pkd.play_favorite(songid, self.songs) print
def do_play_skip(self, line): """ Skip the current song (also in your echonest tasteprofile) Usage: play_skip """ logger.debug('call function do_play_skip') songid = pk.player_songid(self.params) pk.player_next(self.params) profile_id = pk.en_profile_id(self.params['echonest_key']) pk.en_skip(self.params['echonest_key'], profile_id, songid) pkd.play_skip(songid, self.songs) print
def do_echonest_delete(self, line): """ Delete echonest taste profile. Usage: echonest_delete All information stored in the profile will be lost. """ logger.debug('call function do_echonest_delete') profile_id = pk.en_profile_id(self.params['echonest_key']) if pkd.en_sure_delete_tasteprofile(self.params['echonest_key'], profile_id): pk.en_delete(self.params['echonest_key'], profile_id) pkd.en_delete() print
def do_play_ban(self, line): """ Ban the current song (in your echonest tasteprofile) and skip Usage: play_ban The echonest integration should be activated. """ logger.debug('call function do_play_ban') songid = pk.player_songid(self.params) pk.player_next(self.params) profile_id = pk.en_profile_id(self.params['echonest_key']) pk.en_ban(self.params['echonest_key'], profile_id, songid) pkd.play_ban(songid, self.songs) print
def do_playlist_tasteprofile(self, line): """ Create a playlist from echonest taste profile Usage: playlist_tasteprofile Generate a new playlist based on echonest taste profile. The current playlist is removed before. """ logger.debug('call function do_playlist_tasteprofile') profile_id = pk.en_profile_id(self.params['echonest_key']) songids = pk.en_playlist(self.params['echonest_key'], profile_id) pk.playlist_clear(self.params) pk.playlist_add_songs(self.params, songids) pkd.songs_index(songids, self.songs) print
def do_echonest_sync(self, line): """ Sync local songs with the echonest tasteprofile Usage: echonest_sync If there is no song in the profile, a full sync is performed. Otherwise, only the play counts and the ratings are updated. """ logger.debug('call function do_echonest_sync') profile_id = pk.en_profile_id(self.params['echonest_key']) print en_songids = pk.en_sync(self.params['echonest_key'], profile_id, self.songs, self.log_level == 0) pkd.en_sync(en_songids) print
def do_playlist_taste_seed_type(self, line): """ Create a playlist from echonest taste profile seeded by a song type Usage: playlist_taste_seed christmas|live|studio Generate a new playlist based on your echonest taste, profile seeded by a song type. The current playlist is removed before. """ logger.debug('call function do_playlist_taste_seed_type') song_type = line profile_id = pk.en_profile_id(self.params['echonest_key']) songids = pk.en_playlist_seed_song_type(self.params['echonest_key'], profile_id, song_type) pk.playlist_clear(self.params) pk.playlist_add_songs(self.params, songids) pkd.songs_index(songids, self.songs) print