PlaylistParams p = new PlaylistParams();
p.setType(PlaylistType.ARTIST_RADIO);
p.addArtist(Shell.mash(args, 1));
p.setResults(10);
p.setVariety(.5f);
Playlist playlist = en.createStaticPlaylist(p);
for (Song song : playlist.getSongs()) {
System.out.printf("%40.40s %s\n", song.getArtistName(),
song.getTitle());
}
return "";
}
public String getHelp() {
return "generates an artist radio playlist";
}
});
shell.add("bplaylist", new ShellCommand() {
public String execute(Shell ci, String[] args) throws Exception {
BasicPlaylistParams p = new BasicPlaylistParams();
p.setType(BasicPlaylistParams.PlaylistType.ARTIST_RADIO);
p.addArtist(Shell.mash(args, 1));
p.setResults(10);
Playlist playlist = en.createBasicPlaylist(p);
for (Song song : playlist.getSongs()) {
System.out.printf("%40.40s %s\n", song.getArtistName(),
song.getTitle());
}
return "";
}