for ( MDOSong mdoSong : results ) finalResult.put( mdoSong.getSid(), mdoSong );
statistics = daoSongStatistics.getStatistics( user.getLogin(), song.getSid() ); song.setStatistics( statistics );
+ getCurrentPort() + "/messic/services/songs/" + song.getSid() + "/dlna?messic_token=" + token );
ai.setRefID( "" + song.getSid() ); ai.setRights( new String[] {} ); ai.setCreator( song.getAlbum().getAuthor().getName() ); + MessicContainer.SEPARATOR + song.getAlbum().getSid() ); ai.setId( song.getOwner().getSid() + MessicContainer.SEPARATOR + song.getAlbum().getAuthor().getSid() + MessicContainer.SEPARATOR + song.getAlbum().getSid() + MessicContainer.SEPARATOR + song.getSid() ); ai.setTitle( song.getName() ); ai.setOriginalTrackNumber( song.getTrack() ); + "/messic/services/songs/" + song.getSid() + "/dlna?messic_token=" + token );
/** * copy constructor * * @param mdosong {@link MDOSong} * @param album {@link Album} this is not an {@link MDOAlbum} to avoid cross references */ public Song( MDOSong mdosong, Album album ) { setSid( mdosong.getSid() ); setTrack( mdosong.getTrack() ); setName( mdosong.getName() ); setAlbum( album ); setFileName( mdosong.getLocation() ); setRate( mdosong.getRate() ); setVolume( mdosong.getVolume() ); }
public void playSong( String username, long sidSong, int clientQueuePosition ) throws IOException { MDOSong song = daoSong.get( username, sidSong ); if ( song != null ) { MessicRadioPlugin mrp = getPlugin(); File mp3song = new File( song.calculateAbsolutePath( daoSettings.getSettings() ) ); if ( mp3song.exists() ) { MessicRadioSong mrs = new MessicRadioSong(); mrs.songFile = mp3song; mrs.authorName = song.getAlbum().getAuthor().getName(); mrs.albumName = song.getAlbum().getName(); mrs.albumyear = song.getAlbum().getYear(); MDOAlbumResource mar = song.getAlbum().getCover(); if ( mar != null ) { mrs.coverImage = new File( mar.calculateAbsolutePath( daoSettings.getSettings() ) ); } mrs.songSid = song.getSid(); mrs.songName = song.getName(); mrs.trackNumber = song.getTrack(); mrs.albumGenre = ( song.getAlbum().getGenre() != null ? song.getAlbum().getGenre().getName() : "" ); mrs.albumComments = song.getAlbum().getComments(); mrs.clientQueuePosition = clientQueuePosition; mrp.castSong( mrs ); } } }
/** * copy constructor * * @param mdosong {@link MDOSong} */ public Song( MDOSong mdosong, boolean includeAlbumInfo, boolean includeAuthorInfo ) { if ( mdosong != null ) { setSid( mdosong.getSid() ); setTrack( mdosong.getTrack() ); setName( mdosong.getName() ); setVolume( mdosong.getVolume() ); if ( includeAlbumInfo ) { Album album = new Album( mdosong.getAlbum(), includeAuthorInfo, false, false ); setAlbum( album ); } setFileName( mdosong.getLocation() ); setRate( mdosong.getRate() ); } }