Package it.unipd.netmus.server.persistent

Examples of it.unipd.netmus.server.persistent.Song


     * faccio una ricerca su youtube (per Copyright legati al Country)
     */
    @Override
    public synchronized SongDTO getSongDTO(SongSummaryDTO song_summary_dto) {

        Song song = Song.loadFromDTO(song_summary_dto);

        SongDTO song_dto = null;
        if (song != null) {
            song_dto = song.toSongDTO();
        } else {
            return new SongDTO();
        }

        String ip = getThreadLocalRequest().getRemoteAddr();
        if (ip.equals("127.0.0.1"))
            ip = "";

        song_dto.setAlbumCover(Album.getAlbumCoverLastFm(song_dto.getAlbum(),
                song_dto.getArtist()));
        song_dto.setYoutubeCode(Utils.getYouTubeCode(song.getTitle() + " "
                + song.getArtist(), ip));

        return song_dto;
    }
View Full Code Here


        // Invia al database tutte le canzoni della lista

        UserAccount useraccount = UserAccount.load(user);

        for (SongDTO songDTO : new_songs) {
            Song song = Song.storeOrUpdateFromDTO(songDTO);
            if (song != null) {
                useraccount.getMusicLibrary().addSong(song);
            }
        }
View Full Code Here

TOP

Related Classes of it.unipd.netmus.server.persistent.Song

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.