Package com.google.gwt.examples.cellview

Examples of com.google.gwt.examples.cellview.CellBrowserExample2$Playlist


        PlaylistParams params = new PlaylistParams();
        params.setType(PlaylistParams.PlaylistType.ARTIST_RADIO);
        params.addArtist("Bing Crosby");
        params.addSongType(SongType.christmas, Song.SongTypeFlag.True);
        Playlist playlist = en.createStaticPlaylist(params);
        for (Song song : playlist.getSongs()) {
            System.out.println(song.getTitle() + " by " + song.getArtistName());
        }
    }
View Full Code Here


            if (c == 's') {
                session.feedback(DynamicPlaylistSession.FeedbackType.skip_song, "last");
            }

            if (c == 'n') {
                Playlist playlist = session.next();

                for (Song song : playlist.getSongs()) {
                    System.out.println(song.getTitle());
                    System.out.println(song.getArtistName());
                    System.out.printf("Dance: %f\n", song.getDanceability());
                    System.out.printf("Energy: %f\n", song.getEnergy());
                    System.out.printf("Tempo: %f\n", song.getTempo());
View Full Code Here

        params.setType(PlaylistParams.PlaylistType.GENRE_RADIO);
        params.addGenre("metal");
        params.setMinTempo(150);
        params.setResults(10);
        params.includeAudioSummary();
        Playlist playlist = en.createStaticPlaylist(params);

        for (Song song : playlist.getSongs()) {
            System.out.println(song.toString());
        }
    }
View Full Code Here

        params.setType(PlaylistParams.PlaylistType.GENRE_RADIO);
        params.addGenre("dance pop");
        params.includeTracks();
        params.setLimit(true);
       
        Playlist playlist = en.createStaticPlaylist(params);

        for (Song song : playlist.getSongs()) {
            Track track = song.getTrack("spotify-WW");
            System.out.println(track.getForeignID() + " " + song.getTitle() + " by " + song.getArtistName());
        }
    }
View Full Code Here

        BasicPlaylistParams params = new BasicPlaylistParams();
        params.addArtist("Weezer");
        params.setType(BasicPlaylistParams.PlaylistType.ARTIST_RADIO);
        params.setResults(10);
        Playlist playlist = en.createBasicPlaylist(params);

        for (Song song : playlist.getSongs()) {
            System.out.println(song.toString());
        }
    }
View Full Code Here

                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 "";
            }
View Full Code Here

    public void createPlaylist(ArtistCatalog tp) throws EchoNestException {
        PlaylistParams p = new PlaylistParams();
        p.setType(PlaylistParams.PlaylistType.CATALOG_RADIO);
        p.addSeedCatalog(tp.getID());
        Playlist playlist = en.createStaticPlaylist(p);

        for (Song song : playlist.getSongs()) {
            System.out.println(song.getArtistName() + " " + song.getTitle());
        }
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.examples.cellview.CellBrowserExample2$Playlist

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.