def do_playlist_clear(self, line):
     """
     Clear the playlist
     Usage: playlist_clear
         Remove all items from the current playlist.
     """
     logger.debug('call function do_playlist_clear')
     pk.playlist_clear(self.params)
Example #2
0
 def do_playlist_clear(self, line):
     """
     Clear the playlist
     Usage: playlist_clear
         Remove all items from the current playlist.
     """
     logger.debug('call function do_playlist_clear')
     pk.playlist_clear(self.params)
 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)
Example #4
0
 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_play_songs(self, line):
     """
     Play a given song
     Usage: play_songs id
     """
     logger.debug('call function do_play_songs')
     songids = []
     songids.append(int(line))
     pk.playback_stop(self.params)
     pk.playlist_clear(self.params)
     pk.playlist_add_songs(self.params, songids)
     pk.playback_start(self.params)
 def do_play_genres(self, line):
     """
     Play a given genre
     Usage: play_genres id
     """
     logger.debug('call function do_play_genres')
     genreids = []
     genreids.append(int(line))
     pk.playback_stop(self.params)
     pk.playlist_clear(self.params)
     pk.playlist_add_albums(self.params, genreids)
     pk.playback_start(self.params)
 def do_play_albums(self, line):
     """
     Play a given album
     Usage: play_albums id
     """
     logger.debug('call function do_play_songs')
     albumids = []
     albumids.append(int(line))
     pk.playback_stop(self.params)
     pk.playlist_clear(self.params)
     pk.playlist_add_albums(self.params, albumids)
     pk.playback_start(self.params)
Example #8
0
 def do_play_songs(self, line):
     """
     Play a given song
     Usage: play_songs id
     """
     logger.debug('call function do_play_songs')
     songids = []
     songids.append(int(line))
     pk.playback_stop(self.params)
     pk.playlist_clear(self.params)
     pk.playlist_add_songs(self.params, songids)
     pk.playback_start(self.params)
Example #9
0
 def do_play_genres(self, line):
     """
     Play a given genre
     Usage: play_genres id
     """
     logger.debug('call function do_play_genres')
     genreids = []
     genreids.append(int(line))
     pk.playback_stop(self.params)
     pk.playlist_clear(self.params)
     pk.playlist_add_albums(self.params, genreids)
     pk.playback_start(self.params)
Example #10
0
 def do_play_albums(self, line):
     """
     Play a given album
     Usage: play_albums id
     """
     logger.debug('call function do_play_songs')
     albumids = []
     albumids.append(int(line))
     pk.playback_stop(self.params)
     pk.playlist_clear(self.params)
     pk.playlist_add_albums(self.params, albumids)
     pk.playback_start(self.params)
 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
Example #12
0
 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_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
Example #14
0
 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